diff --git a/src/routes/user/dto/create_parent.dto.ts b/src/routes/user/dto/create_parent.dto.ts index e3404a7..d6d3aa7 100644 --- a/src/routes/user/dto/create_parent.dto.ts +++ b/src/routes/user/dto/create_parent.dto.ts @@ -1,4 +1,13 @@ import { OmitType } from "@nestjs/swagger"; import { CreateUserDto } from "./create_user.dto"; +import { IsNotEmpty, IsOptional, IsUUID } from "class-validator"; -export class CreateParentDto extends OmitType(CreateUserDto, ['role'] as const) {} \ No newline at end of file +export class CreateParentDto extends OmitType(CreateUserDto, ['role'] as const) { + @IsUUID() + @IsNotEmpty() + user_id: string; + + @IsOptional() + @IsUUID() + co_parent_id?: string; +} \ No newline at end of file