import { IsNotEmpty, IsOptional, IsString, IsBoolean, IsNumber, IsUUID, MaxLength, Min, ValidateIf } from 'class-validator';

export class CreateActivityTicketDto {
  @ValidateIf((o) => !!o.id)
  @IsUUID()
  id?: string;

  @IsString() @IsNotEmpty() @MaxLength(255)
  name: string;

  @IsString() @IsOptional() @MaxLength(100)
  internal_ref?: string;

  @IsString() @IsOptional() @MaxLength(100)
  time_slot?: string;

  @IsNumber() @IsOptional() @Min(0)
  duration_mins?: number;

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

  @IsBoolean() @IsOptional()
  is_active?: boolean;
}
