primera versión del autoprestamo

This commit is contained in:
Marco
2022-08-25 00:36:48 -05:00
parent 2c9af0e13e
commit 3e1a25ea1a
13 changed files with 158 additions and 22 deletions
+25
View File
@@ -0,0 +1,25 @@
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;
@OneToOne(() => Prestamo, (Prestamo) => Prestamo.id_prestamo, {
eager: true,
})
@JoinColumn({ name: 'id_prestamo' })
prestamo: Prestamo;
}