forked from Ynov/ptitspas-ynov-back
17 lines
439 B
TypeScript
17 lines
439 B
TypeScript
import { OmitType } from "@nestjs/swagger";
|
|
import { CreateUserDto } from "./create_user.dto";
|
|
import { IsNotEmpty, IsOptional, IsString, IsUUID } from "class-validator";
|
|
|
|
export class CreateParentDto extends OmitType(CreateUserDto, ['role', 'photo_url'] as const) {
|
|
@IsUUID()
|
|
@IsNotEmpty()
|
|
user_id: string;
|
|
|
|
@IsOptional()
|
|
@IsUUID()
|
|
co_parent_id?: string;
|
|
|
|
@IsString()
|
|
@IsNotEmpty()
|
|
photo_url: string;
|
|
} |