Creacion de entities y servicios

This commit is contained in:
2025-09-17 16:35:52 -06:00
parent 8cc039947f
commit 54306452ab
26 changed files with 460 additions and 39 deletions
+7 -1
View File
@@ -1,4 +1,5 @@
import { Entity, PrimaryGeneratedColumn, Column } from 'typeorm';
import { DetalleServicio } from 'src/detalle_servicio/entities/detalle_servicio.entity';
import { Entity, PrimaryGeneratedColumn, Column, OneToMany } from 'typeorm';
@Entity({ name: 'servicio' })
export class Servicio {
@@ -7,4 +8,9 @@ export class Servicio {
@Column({ type: 'varchar', length: 45, nullable: false })
servicio: string;
@OneToMany(
() => DetalleServicio,
(id_detalle_servicio) => id_detalle_servicio.id_servicio,
)
detalles_servicio: DetalleServicio[];
}