mirror of
https://github.com/HamzaSha1/zod-backend.git
synced 2026-10-25 21:57:57 +00:00
feat: registration jounrey for parents
This commit is contained in:
@@ -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) {}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user