package com.njcn.rdms.module.project.controller.admin.review.vo;

import com.njcn.rdms.module.project.dal.dataobject.attachment.AttachmentItem;
import com.njcn.rdms.module.project.dal.dataobject.review.RequirementReviewAttendeeItem;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Max;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.util.List;

@Schema(description = "管理后台 - 需求评审提交 Request VO")
@Data
public class RequirementReviewSubmitReqVO {

    @Schema(description = "产品编号，产品需求评审时必填", example = "1024")
    private Long productId;

    @Schema(description = "项目编号，项目需求评审时必填", example = "2048")
    private Long projectId;

    @Schema(description = "需求编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "4096")
    @NotNull(message = "需求编号不能为空")
    private Long requirementId;

    @Schema(description = "评审操作人编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1001")
    @NotNull(message = "评审操作人不能为空")
    private Long operatorId;

    @Schema(description = "评审结论：0 通过，1 不通过", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @NotNull(message = "评审结论不能为空")
    @Min(value = 0, message = "评审结论不合法")
    @Max(value = 1, message = "评审结论不合法")
    private Integer conclusion;

    @Schema(description = "评审内容，支持富文本")
    private String reviewContent;

    @Schema(description = "需求预估工时", example = "16.5")
    private BigDecimal requirementEstimatedHours;

    @Schema(description = "参会人列表")
    private List<RequirementReviewAttendeeItem> attendees;

    @Schema(description = "会议资料附件")
    private List<AttachmentItem> attachments;

    @Schema(description = "实际评审日期", example = "2026-05-20")
    private LocalDate reviewTime;

}
