package com.njcn.rdms.module.project.controller.admin.product.vo.requirement;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * 管理后台 - 产品需求编辑 Request VO
 */
@Schema(description = "管理后台 - 产品需求编辑 Request VO")
@Data
public class ProductRequirementUpdateReqVO {

    @Schema(description = "需求ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
    @NotNull(message = "需求ID不能为空")
    private Long id;

    @Schema(description = "所属产品ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
    @NotNull(message = "产品ID不能为空")
    private Long productId;

    @Schema(description = "所属模块ID（为空时归入全部需求）", example = "1024")
    private Long moduleId;

    @Schema(description = "是否需要评审（0不需要；1需要）", requiredMode = Schema.RequiredMode.REQUIRED, example = "0")
    @NotNull(message = "是否需要评审不能为空")
    private Integer reviewRequired;

    @Schema(description = "需求标题", requiredMode = Schema.RequiredMode.REQUIRED, example = "支持需求模块化管理")
    @NotBlank(message = "需求标题不能为空")
    @Size(max = 200, message = "需求标题长度不能超过200个字符")
    private String title;

    @Schema(description = "需求描述（富文本）", example = "<p>详细描述需求内容</p>")
    private String description;

    @Schema(description = "需求分类字典值", requiredMode = Schema.RequiredMode.REQUIRED, example = "function")
    @NotBlank(message = "需求分类不能为空")
    @Size(max = 64, message = "需求分类长度不能超过64个字符")
    private String category;

    @Schema(description = "优先级（0低 1中 2高 3紧急）", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @NotNull(message = "优先级不能为空")
    private Integer priority;

    @Schema(description = "提出人用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
    @NotNull(message = "提出人不能为空")
    private Long proposerId;

    @Schema(description = "当前处理人用户编号", example = "1024")
    private Long currentHandlerUserId;

    @Schema(description = "默认实现项目编号", example = "1024")
    private Long implementProjectId;

    @Schema(description = "预期完成时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "预期完成时间不能为空")
    private LocalDateTime completionDate;

    @Schema(description = "排序值（越小越靠前）", example = "0")
    private Integer sort;

}
