import { ArrayUnique, IsArray, IsEnum, IsOptional, IsString } from 'class-validator'; import { ChatChannelType } from '@prisma/client'; export class CreateChannelDto { @IsEnum(ChatChannelType) type!: ChatChannelType; @IsOptional() @IsString() gemeindeId?: string; /// Display name; used for GRUPPE channels. @IsOptional() @IsString() name?: string; /// Initial participants for a GRUPPE channel (team users). More can be /// added/removed later via the participants endpoints. @IsOptional() @IsArray() @ArrayUnique() @IsString({ each: true }) participantUserIds?: string[]; /// Initial guest/Konfi participants for a GRUPPE channel. @IsOptional() @IsArray() @ArrayUnique() @IsString({ each: true }) participantGuestIds?: string[]; }