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

export class CreateNewsDto {
  @IsNotEmpty({ message: 'Short Description Should Not be Empty.' })
  @Transform(({ value }) => value.trim().replace(/\s+/g, ' '))
  description_short: string;

  @Transform(({ value }) => value.trim().replace(/\s+/g, ' '))
  description_long: string;

  group_id: string[];
}
