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; }