feat: registration jounrey for parents

This commit is contained in:
Abdalhamid Alhamad
2024-12-05 11:20:50 +03:00
parent e4b69a406f
commit 2577f2dcac
97 changed files with 2269 additions and 17 deletions
@@ -8,7 +8,7 @@ import { DocumentMetaResponseDto } from '../dtos/response';
import { DocumentType } from '../enums';
import { DocumentService } from '../services';
@Controller('document')
@ApiTags('document')
@ApiTags('Document')
export class DocumentController {
constructor(private readonly documentService: DocumentService) {}
+5 -1
View File
@@ -1,4 +1,5 @@
import { Column, Entity, PrimaryGeneratedColumn, UpdateDateColumn } from 'typeorm';
import { Column, Entity, OneToOne, PrimaryGeneratedColumn, UpdateDateColumn } from 'typeorm';
import { User } from '~/auth/entities';
import { DocumentType } from '../enums';
@Entity('documents')
@@ -15,6 +16,9 @@ export class Document {
@Column({ type: 'varchar', length: 255 })
documentType!: DocumentType;
@OneToOne(() => User, (user) => user.profilePicture, { onDelete: 'CASCADE' })
user!: User;
@UpdateDateColumn({ name: 'updated_at', type: 'timestamp', default: () => 'CURRENT_TIMESTAMP' })
updatedAt!: Date;