import { IsString, IsInt, IsEnum, IsOptional, Min, Max } from 'class-validator';

export enum NoticeType {
  SYSTEM = 'system',
  MANUAL = 'manual',
  URGENT = 'urgent',
}

export class CreateNoticeDto {
  @IsInt()
  contestId: number;

  @IsString()
  title: string;

  @IsString()
  content: string;

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

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

