inicio passcode
This commit is contained in:
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user