import { IsBoolean, IsNotEmpty, IsOptional, IsString, MaxLength } from 'class-validator';
import { Trim, TrimOrNull } from '../../../common/dto/field-transforms';

/** A service the organization sells; leads pick their service interest from this list. */
export class CreateServiceDto {
  @Trim()
  @IsString()
  @IsNotEmpty({ message: 'Enter the service name' })
  @MaxLength(120)
  name!: string;

  @TrimOrNull()
  @IsOptional()
  @IsString()
  @MaxLength(2000)
  description?: string | null;

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