package cn.iocoder.yudao.module.system.api.project.dto;

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

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.time.LocalDate;
import java.util.Map;
import java.util.Set;

@Schema(description = "管理后台 - 项目管理新增/修改 Request VO")
@Data
public class ProjectDTO {

    @Schema(description = "项目管理表单主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    private Long id;

    @Schema(description = "项目编号")
    private String projectNo;

    @Schema(description = "项目类型 | 字典值参考system_project_type", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @NotNull(message = "项目类型 | 字典值参考system_project_type不能为空")
    private Integer type;

    @Schema(description = "项目名称", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "项目名称不能为空")
    private String name;

    @Schema(description = "责任部门", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "责任部门不能为空")
    private Long responsibleDept;

    @Schema(description = "参与部门集合", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "参与部门集合不能为空")
    private Set<Long> participationDept;

    @Schema(description = "责任人用户编号", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "责任人用户编号不能为空")
    private Long directorUserId;

    @Schema(description = "项目开始时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "项目开始时间不能为空")
    private LocalDate startDate;

    @Schema(description = "项目结束时间")
    private LocalDate endDate;

    @Schema(description = "是否长期 | 0否 1是")
    private Integer isLongTerm;

    @Schema(description = "项目预算")
    private Integer projectBudget;

    @Schema(description = "项目内容", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "项目内容不能为空")
    private String content;

    @Schema(description = "项目人员用户编号集合")
    private Set<Long> staff;

    @Schema(description = "项目额外属性")
    private Map<String, Object> dynamicAttribute;

    @Schema(description = "项目状态 | 1 进行中 2已完成", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @NotNull(message = "项目状态 | 1 进行中 2已完成不能为空")
    private Integer status;

}