Creacion de entities y servicios
This commit is contained in:
@@ -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[];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user