28 lines
592 B
TypeScript
28 lines
592 B
TypeScript
import {
|
|
Column,
|
|
Entity,
|
|
JoinColumn,
|
|
ManyToOne,
|
|
PrimaryGeneratedColumn,
|
|
} from 'typeorm';
|
|
import { InstitucionDia } from '../../institucion-dia/entity/institucion-dia.entity';
|
|
|
|
@Entity()
|
|
export class HoraExcepcion {
|
|
@PrimaryGeneratedColumn()
|
|
id_hora_excepcion: number;
|
|
|
|
@Column({ type: Date, nullable: false })
|
|
hora_fin: Date;
|
|
|
|
@Column({ type: Date, nullable: false })
|
|
hora_inicio: Date;
|
|
|
|
@ManyToOne(
|
|
() => InstitucionDia,
|
|
(institucionDia) => institucionDia.horasExcepcion,
|
|
)
|
|
@JoinColumn({ name: 'id_institucion_dia' })
|
|
institucionDia: InstitucionDia;
|
|
}
|