Files
api/src/entity/Reservacion.ts
T

68 lines
1.3 KiB
TypeScript
Raw Normal View History

2020-07-24 01:32:59 -05:00
import { Entity, PrimaryGeneratedColumn, Column, ManyToOne } from 'typeorm'
import { Actividad } from './Actividad'
import { Adscripcion } from './Adscripcion'
import { Lugar } from './Lugar'
import { Carrito } from './Carrito'
2020-08-18 11:13:12 -05:00
import { Reporte } from './Reporte'
import { Usuario } from './Usuario'
2020-07-24 01:32:59 -05:00
@Entity()
export class Reservacion {
@PrimaryGeneratedColumn()
2020-08-18 11:13:12 -05:00
id: number
2020-07-24 01:32:59 -05:00
@Column({ type: 'date' })
2020-08-18 11:13:12 -05:00
fechaInicio: string
2020-07-24 01:32:59 -05:00
@Column({ type: 'date' })
2020-08-18 11:13:12 -05:00
fechaFin: string
2020-07-24 01:32:59 -05:00
@Column()
2020-08-18 11:13:12 -05:00
descripcion: string
2020-07-24 01:32:59 -05:00
@Column({ type: 'boolean' })
2020-08-18 11:13:12 -05:00
uso: boolean
2020-07-24 01:32:59 -05:00
@Column({ type: 'boolean' })
2020-08-18 11:13:12 -05:00
cancelado: boolean
2020-07-24 01:32:59 -05:00
@Column({ type: 'boolean' })
2020-08-18 11:13:12 -05:00
aceptado: boolean
2020-07-24 01:32:59 -05:00
@ManyToOne(
(type) => Actividad,
(actividad) => actividad.reservaciones
)
2020-08-18 11:13:12 -05:00
actividad: Actividad
2020-07-24 01:32:59 -05:00
@ManyToOne(
(type) => Adscripcion,
(adscripcion) => adscripcion.reservaciones
)
2020-08-18 11:13:12 -05:00
adscripcion: Adscripcion
2020-07-24 01:32:59 -05:00
@ManyToOne(
(type) => Lugar,
(lugar) => lugar.reservaciones
)
2020-08-18 11:13:12 -05:00
lugar: Lugar
2020-07-24 01:32:59 -05:00
@ManyToOne(
(type) => Carrito,
(carrito) => carrito.reservaciones
)
2020-08-18 11:13:12 -05:00
carrito: Carrito
@ManyToOne(
(type) => Reporte,
(reporte) => reporte.reservaciones
)
reporte: Reporte
@ManyToOne(
(type) => Usuario,
(reporte) => reporte.reservaciones
)
usuario: Usuario
2020-07-24 01:32:59 -05:00
}