mirror of
https://github.com/HamzaSha1/zod-backend.git
synced 2025-11-26 00:24:54 +00:00
19 lines
937 B
TypeScript
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;
|
|
}
|