68 lines
1.3 KiB
TypeScript
68 lines
1.3 KiB
TypeScript
import { Entity, PrimaryGeneratedColumn, Column, ManyToOne } from 'typeorm'
|
|
import { Actividad } from './Actividad'
|
|
import { Adscripcion } from './Adscripcion'
|
|
import { Lugar } from './Lugar'
|
|
import { Carrito } from './Carrito'
|
|
import { Reporte } from './Reporte'
|
|
import { Usuario } from './Usuario'
|
|
|
|
@Entity()
|
|
export class Reservacion {
|
|
@PrimaryGeneratedColumn()
|
|
id: number
|
|
|
|
@Column({ type: 'date' })
|
|
fechaInicio: string
|
|
|
|
@Column({ type: 'date' })
|
|
fechaFin: string
|
|
|
|
@Column()
|
|
descripcion: string
|
|
|
|
@Column({ type: 'boolean' })
|
|
uso: boolean
|
|
|
|
@Column({ type: 'boolean' })
|
|
cancelado: boolean
|
|
|
|
@Column({ type: 'boolean' })
|
|
aceptado: boolean
|
|
|
|
@ManyToOne(
|
|
(type) => Actividad,
|
|
(actividad) => actividad.reservaciones
|
|
)
|
|
actividad: Actividad
|
|
|
|
@ManyToOne(
|
|
(type) => Adscripcion,
|
|
(adscripcion) => adscripcion.reservaciones
|
|
)
|
|
adscripcion: Adscripcion
|
|
|
|
@ManyToOne(
|
|
(type) => Lugar,
|
|
(lugar) => lugar.reservaciones
|
|
)
|
|
lugar: Lugar
|
|
|
|
@ManyToOne(
|
|
(type) => Carrito,
|
|
(carrito) => carrito.reservaciones
|
|
)
|
|
carrito: Carrito
|
|
|
|
@ManyToOne(
|
|
(type) => Reporte,
|
|
(reporte) => reporte.reservaciones
|
|
)
|
|
reporte: Reporte
|
|
|
|
@ManyToOne(
|
|
(type) => Usuario,
|
|
(reporte) => reporte.reservaciones
|
|
)
|
|
usuario: Usuario
|
|
}
|