Files
zod-backend/src/junior/dtos/request/create-junior.request.dto.ts
Abdalhamid Alhamad 970a41c895 feat: create junior
2024-12-09 13:11:18 +03:00

19 lines
937 B
TypeScript

import { ApiProperty } from '@nestjs/swagger';
import { IsEnum, IsUUID } from 'class-validator';
import { i18nValidationMessage as i18n } from 'nestjs-i18n';
import { Relationship } from '~/junior/enums';
import { CreateJuniorUserRequestDto } from './create-junior-user.request.dto';
export class CreateJuniorRequestDto extends CreateJuniorUserRequestDto {
@ApiProperty({ example: Relationship.PARENT })
@IsEnum(Relationship, { message: i18n('validation.IsEnum', { path: 'general', property: 'junior.relationship' }) })
relationship!: Relationship;
@ApiProperty({ example: 'bf342-3f3f-3f3f-3f3f' })
@IsUUID('4', { message: i18n('validation.IsUUID', { path: 'general', property: 'junior.civilIdFrontId' }) })
civilIdFrontId!: string;
@ApiProperty({ example: 'bf342-3f3f-3f3f-3f3f' })
@IsUUID('4', { message: i18n('validation.IsUUID', { path: 'general', property: 'junior.civilIdBackId' }) })
civilIdBackId!: string;
}