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

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.LocalDate;

@Schema(description = "管理后台 - 项目保存 Request VO")
@Data
public class ProjectSaveReqVO {

    @Schema(description = "项目编号", example = "1024")
    private Long id;

    @Schema(description = "项目编码，为空时由系统自动生成", example = "CNPJ2026001")
    @Size(max = 64, message = "项目编码长度不能超过64个字符")
    private String projectCode;

    @Schema(description = "项目名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "客户交付项目")
    @NotBlank(message = "项目名称不能为空")
    @Size(max = 200, message = "项目名称长度不能超过200个字符")
    private String projectName;

    @Schema(description = "项目类型字典值", requiredMode = Schema.RequiredMode.REQUIRED, example = "delivery")
    @NotBlank(message = "项目类型不能为空")
    @Size(max = 32, message = "项目类型长度不能超过32个字符")
    private String projectType;

    @Schema(description = "项目方向字典值；未选产品时必填，选产品时以后端产品方向为准", example = "direction_value")
    private String directionCode;

    @Schema(description = "所属项目集编号，第一期预留", example = "1001")
    private Long projectSetId;

    @Schema(description = "所属产品编号，可为空", example = "1001")
    private Long productId;

    @Schema(description = "所属产品版本编号，第一期预留", example = "1001")
    private Long productVersionId;

    @Schema(description = "项目负责人用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
    @NotNull(message = "项目负责人不能为空")
    private Long managerUserId;

    @Schema(description = "计划开始日期")
    private LocalDate plannedStartDate;

    @Schema(description = "计划结束日期")
    private LocalDate plannedEndDate;

    @Schema(description = "实际开始日期")
    private LocalDate actualStartDate;

    @Schema(description = "实际结束日期")
    private LocalDate actualEndDate;

    @Schema(description = "项目说明", example = "客户定制交付")
    @Size(max = 4000, message = "项目说明长度不能超过4000个字符")
    private String projectDesc;

}
