import { ApiProperty } from '@nestjs/swagger';
import { IsNotEmpty, IsOptional } from 'class-validator';

export class CreateNewsDto {
  @ApiProperty({ required: true })
  @IsNotEmpty()
  title: string;

  @ApiProperty({ type: 'string', format: 'binary', required: true })
  image: any;

  @ApiProperty({ required: true })
  @IsNotEmpty()
  description: string;

  @ApiProperty({ required: false })
  @IsOptional()
  metaKeywords: string;

  @ApiProperty({ required: false })
  @IsOptional()
  metaDescription: string;

  @ApiProperty({ required: false })
  @IsOptional()
  metaTitle: string;
}
