32 lines
1.0 KiB
TypeScript
32 lines
1.0 KiB
TypeScript
import { IsString, IsOptional, IsUUID, ValidateNested, IsArray, IsEnum, IsDateString } from 'class-validator';
|
|
import { Type } from 'class-transformer';
|
|
import { BaseDto } from '../../_core/dto/base.dto';
|
|
import { CreateAttachmentDto } from '../../attachment/dto/create_attachment.dto';
|
|
import { CreateQuestionDto } from '../../question/dto/create-question.dto';
|
|
import { CreateFormPageDto } from '../../formPage/dto/create-formPage.dto';
|
|
import { CreateParticipantDto } from '../../participant/dto/create-participant.dto';
|
|
import { CreateFormDto } from '../../form/dto/create-form.dto';
|
|
|
|
export class CreateRealmDto extends BaseDto {
|
|
@IsString()
|
|
title: string;
|
|
|
|
@IsString()
|
|
description: string;
|
|
|
|
@IsArray()
|
|
@ValidateNested({ each: true })
|
|
@Type(() => CreateFormDto)
|
|
@IsOptional()
|
|
forms?: CreateFormDto[];
|
|
|
|
@IsArray()
|
|
@ValidateNested({ each: true })
|
|
@Type(() => CreateParticipantDto)
|
|
participant: CreateParticipantDto[];
|
|
|
|
@IsArray()
|
|
@ValidateNested({ each: true })
|
|
@Type(() => CreateParticipantDto)
|
|
owner: CreateParticipantDto;
|
|
} |