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

export class HomeworkFileDto {
  @IsString()
  fileName: string;

  @IsString()
  fileUrl: string;

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

export class CreateSubmissionDto {
  @IsNumber()
  homeworkId: number;

  @IsString()
  workName: string;

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

  @IsOptional()
  @IsArray()
  files?: HomeworkFileDto[];
}
