import { IsString, IsInt, IsEnum, IsOptional, IsDateString, Min, Max } from 'class-validator';
import { NoticeType } from './create-notice.dto';

export class UpdateNoticeDto {
  @IsInt()
  @IsOptional()
  contestId?: number;

  @IsString()
  @IsOptional()
  title?: string;

  @IsString()
  @IsOptional()
  content?: string;

  @IsEnum(NoticeType)
  @IsOptional()
  noticeType?: NoticeType;

  @IsInt()
  @Min(0)
  @Max(100)
  @IsOptional()
  priority?: number;

  @IsDateString()
  @IsOptional()
  publishTime?: string | null;
}

