mirror of
https://github.com/HamzaSha1/zod-backend.git
synced 2026-10-25 20:27:57 +00:00
feat: create junior
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { Column, Entity, OneToOne, PrimaryGeneratedColumn, UpdateDateColumn } from 'typeorm';
|
||||
import { User } from '~/auth/entities';
|
||||
import { Junior } from '~/junior/entities';
|
||||
import { DocumentType } from '../enums';
|
||||
|
||||
@Entity('documents')
|
||||
@@ -19,6 +20,12 @@ export class Document {
|
||||
@OneToOne(() => User, (user) => user.profilePicture, { onDelete: 'CASCADE' })
|
||||
user!: User;
|
||||
|
||||
@OneToOne(() => Junior, (junior) => junior.civilIdFront, { onDelete: 'CASCADE' })
|
||||
juniorCivilIdFront!: User;
|
||||
|
||||
@OneToOne(() => Junior, (junior) => junior.civilIdBack, { onDelete: 'CASCADE' })
|
||||
juniorCivilIdBack!: User;
|
||||
|
||||
@UpdateDateColumn({ name: 'updated_at', type: 'timestamp', default: () => 'CURRENT_TIMESTAMP' })
|
||||
updatedAt!: Date;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user