2022-03-30 18:04:19 -06:00
|
|
|
import {
|
|
|
|
|
Entity,
|
|
|
|
|
Column,
|
|
|
|
|
PrimaryGeneratedColumn,
|
|
|
|
|
OneToOne,
|
|
|
|
|
ManyToOne,
|
|
|
|
|
JoinColumn,
|
|
|
|
|
} from 'typeorm';
|
|
|
|
|
import { InstitucionInfraccion } from '../institucion-infraccion/institucion-infraccion.entity';
|
|
|
|
|
import { Prestamo } from '../prestamo/prestamo.entity';
|
2022-03-29 22:50:04 -06:00
|
|
|
|
|
|
|
|
@Entity()
|
|
|
|
|
export class Multa {
|
|
|
|
|
@PrimaryGeneratedColumn()
|
2022-03-30 11:42:14 -06:00
|
|
|
id_multa: number;
|
|
|
|
|
|
|
|
|
|
@Column()
|
|
|
|
|
activo: boolean;
|
|
|
|
|
|
|
|
|
|
@Column()
|
|
|
|
|
fecha_inicio: Date;
|
|
|
|
|
|
|
|
|
|
@Column()
|
|
|
|
|
fecha_fin: Date;
|
2022-03-30 18:04:19 -06:00
|
|
|
|
|
|
|
|
@Column()
|
|
|
|
|
retraso: boolean;
|
|
|
|
|
|
|
|
|
|
@ManyToOne(
|
|
|
|
|
() => InstitucionInfraccion,
|
|
|
|
|
(institucionInfraccion) => institucionInfraccion.multas,
|
|
|
|
|
)
|
|
|
|
|
@JoinColumn({ name: 'id_institucion_infraccion' })
|
|
|
|
|
institucionInfraccion: InstitucionInfraccion;
|
|
|
|
|
|
|
|
|
|
@OneToOne(() => Prestamo)
|
|
|
|
|
@JoinColumn({ name: 'id_prestamo' })
|
|
|
|
|
prestamo: Prestamo;
|
2022-03-29 22:50:04 -06:00
|
|
|
}
|