import { Transform } from 'class-transformer';
import { IsNotEmpty, IsOptional } from 'class-validator';

export class CreateCategoryDto {
  @IsNotEmpty({ message: 'Province Name Should Not be Empty.' })
  @Transform(({ value }) => value.trim().replace(/\s+/g, ' '))
  name: string;

  @IsOptional()
  media: string;

  @IsOptional()
  status: string;
}
