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

export class CreateScoreDto {
  @IsInt()
  workId: number;

  @IsInt()
  assignmentId: number;

  @IsArray()
  @IsOptional()
  dimensionScores?: Array<{
    name: string;
    score: number;
    maxScore: number;
  }>; // 维度评分数组

  @IsNumber()
  @Min(0)
  @Max(100)
  totalScore: number;

  @IsString()
  @IsOptional()
  comments?: string;
}

