import {
  ArrayUnique,
  IsArray,
  IsMongoId,
  IsNotEmptyObject,
  IsObject,
  IsOptional,
  IsString,
} from "class-validator";

export class CreateCustomGroupDto {
  @IsObject()
  @IsNotEmptyObject()
  title: Record<string, string>;

  @IsOptional()
  @IsObject()
  description: Record<string, string>;

  @IsOptional()
  @IsString()
  attachment?: string;

  @IsOptional()
  @IsArray()
  @ArrayUnique()
  @IsMongoId({ each: true })
  participants?: string[];
}
