import { IsOptional, IsString, MaxLength, MinLength } from "class-validator";

export class CreateTeamDto {
  @IsString({ message: "name must be a string" })
  @MinLength(1, { message: "name must not be empty" })
  @MaxLength(255, { message: "name must not exceed 255 characters" })
  name!: string;

  @IsOptional()
  @IsString({ message: "description must be a string" })
  @MaxLength(10000, { message: "description must not exceed 10000 characters" })
  description?: string;
}
