package com.lesingle.creation.dto.work;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import java.util.List;

/**
 * 提交作品请求 DTO
 */
@Data
@Schema(description = "提交作品请求")
public class SubmitWorkDTO {

    @NotNull(message = "报名 ID 不能为空")
    @Schema(description = "报名 ID")
    private Long registrationId;

    @NotBlank(message = "作品标题不能为空")
    @Schema(description = "作品标题", example = "我的创意绘画")
    private String title;

    @Schema(description = "作品描述")
    private String description;

    @Schema(description = "文件列表（JSON 数组）")
    private String files;

    @Schema(description = "预览图 URL")
    private String previewUrl;

    @Schema(description = "预览图 URL 数组（JSON）")
    private String previewUrls;

    @Schema(description = "AI 模型元数据（JSON）")
    private String aiModelMeta;

    @Schema(description = "附件列表")
    private List<AttachmentDTO> attachments;

    @Data
    @Schema(description = "附件信息")
    public static class AttachmentDTO {
        @Schema(description = "文件名称")
        private String fileName;

        @Schema(description = "文件 URL")
        private String fileUrl;

        @Schema(description = "文件类型")
        private String fileType;

        @Schema(description = "文件大小（字节）")
        private Long size;
    }
}
