Files
pcpuma_unam_api/src/passcode/entity/passcode.entity.ts
T

28 lines
599 B
TypeScript
Raw Normal View History

2022-08-25 00:36:48 -05:00
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;
2022-09-07 17:29:42 -05:00
@Column({ type: Boolean, nullable: true, default: false })
2022-08-31 18:17:08 -05:00
abrio: boolean
2022-09-07 17:29:42 -05:00
2022-08-25 00:36:48 -05:00
@OneToOne(() => Prestamo, (Prestamo) => Prestamo.id_prestamo, {
eager: true,
})
@JoinColumn({ name: 'id_prestamo' })
prestamo: Prestamo;
}