cargamasviva
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
import { Entity, PrimaryGeneratedColumn, Column, ManyToOne } from 'typeorm'
|
||||
import { Usuario } from './Usuario'
|
||||
import { Reporte } from './Reporte'
|
||||
import { Equipo } from './Equipo'
|
||||
import { Mesa } from './Mesa'
|
||||
|
||||
@Entity()
|
||||
export class Prestamo {
|
||||
@PrimaryGeneratedColumn()
|
||||
id: number
|
||||
|
||||
@Column()
|
||||
activo: boolean
|
||||
|
||||
@Column({ type: 'date' })
|
||||
fechaInicio: string
|
||||
|
||||
@Column({ type: 'date' })
|
||||
fechaFin: string
|
||||
|
||||
@ManyToOne(
|
||||
(type) => Usuario,
|
||||
(usuario) => usuario.prestamos
|
||||
)
|
||||
usuario: Usuario
|
||||
|
||||
@ManyToOne(
|
||||
(type) => Mesa,
|
||||
(mesa) => mesa.prestamos
|
||||
)
|
||||
mesa: Mesa
|
||||
|
||||
@ManyToOne(
|
||||
(type) => Reporte,
|
||||
(reporte) => reporte.prestamos
|
||||
)
|
||||
reporte: Reporte
|
||||
|
||||
@ManyToOne(
|
||||
(type) => Equipo,
|
||||
(equipo) => equipo.prestamos
|
||||
)
|
||||
equipo: Equipo
|
||||
}
|
||||
Reference in New Issue
Block a user