inicio passcode

This commit is contained in:
2022-10-31 12:16:34 -06:00
parent be7e3454cb
commit eb851fc5cc
12 changed files with 352 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
import {
Column,
Entity,
JoinColumn,
OneToOne,
PrimaryGeneratedColumn,
} from 'typeorm';
import { Prestamo } from '../../prestamo/entity/prestamo.entity';
@Entity()
export class Passcode {
@PrimaryGeneratedColumn()
id_passcode: number;
@Column({ type: String, nullable: false })
passcode: string;
@Column({ type: Boolean, nullable: true, default: false })
abrio: boolean;
@OneToOne(() => Prestamo, (Prestamo) => Prestamo.id_prestamo, {
eager: true,
})
@JoinColumn({ name: 'id_prestamo' })
prestamo: Prestamo;
}