listo multa
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
import {
|
||||
Column,
|
||||
Entity,
|
||||
JoinColumn,
|
||||
ManyToOne,
|
||||
OneToOne,
|
||||
PrimaryGeneratedColumn,
|
||||
} from 'typeorm';
|
||||
import { InstitucionInfraccion } from '../../institucion-infraccion/entity/institucion-infraccion.entity';
|
||||
import { Prestamo } from '../../prestamo/prestamo.entity';
|
||||
|
||||
@Entity()
|
||||
export class Multa {
|
||||
@PrimaryGeneratedColumn()
|
||||
id_multa: number;
|
||||
|
||||
@Column({ type: Boolean, nullable: false, default: true })
|
||||
activo: boolean;
|
||||
|
||||
@Column({ type: Date, nullable: false })
|
||||
fecha_fin: Date;
|
||||
|
||||
@Column({ type: Date, nullable: false })
|
||||
fecha_inicio: Date;
|
||||
|
||||
@Column({ type: Boolean, nullable: false })
|
||||
retraso: boolean;
|
||||
|
||||
@ManyToOne(
|
||||
() => InstitucionInfraccion,
|
||||
(institucionInfraccion) => institucionInfraccion.multas,
|
||||
)
|
||||
@JoinColumn({ name: 'id_institucion_infraccion' })
|
||||
institucionInfraccion: InstitucionInfraccion;
|
||||
|
||||
@OneToOne(() => Prestamo)
|
||||
@JoinColumn({ name: 'id_prestamo' })
|
||||
prestamo: Prestamo;
|
||||
}
|
||||
Reference in New Issue
Block a user