package cn.iocoder.yudao.module.bpm.controller.admin.oa.vo.project;

import cn.iocoder.yudao.framework.common.pojo.UploadUserFile;
import cn.iocoder.yudao.module.bpm.controller.admin.oa.vo.BpmOABaseRespVO;
import cn.iocoder.yudao.module.bpm.controller.admin.oa.vo.refund.BpmOARefundItems;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.util.List;
import java.util.Map;
import java.util.Set;

import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY;

/**
 * @author 符溶馨
 */
@Schema(description = "管理后台 - 项目申请  请求Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class BpmOAProjectRespVO extends BpmOABaseRespVO {

    @Schema(description = "项目类型", requiredMode = Schema.RequiredMode.REQUIRED)
    private Integer type;

    @Schema(description = "项目名称", requiredMode = Schema.RequiredMode.REQUIRED)
    private String name;

    @Schema(description = "责任部门", requiredMode = Schema.RequiredMode.REQUIRED)
    private Long responsibleDept;

    @Schema(description = "责任部门名称", requiredMode = Schema.RequiredMode.REQUIRED)
    private String responsibleDeptName;

    @Schema(description = "参与部门集合")
    private Set<Long> participationDept;

    @Schema(description = "参与部门名称集合")
    private String participationDeptName;

    @Schema(description = "责任人", requiredMode = Schema.RequiredMode.REQUIRED)
    private Long directorUserId;

    @Schema(description = "责任人名称", requiredMode = Schema.RequiredMode.REQUIRED)
    private String directorUserName;

    @Schema(description = "团队成员")
    private Set<Long> staff;

    @Schema(description = "团队成员名称")
    private String staffName;

    @Schema(description = "项目开始日期", requiredMode = Schema.RequiredMode.REQUIRED)
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY)
    private LocalDate startDate;

    @Schema(description = "项目结束日期", requiredMode = Schema.RequiredMode.REQUIRED)
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY)
    private LocalDate endDate;

    @Schema(description = "是否长期项目", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
    private Integer isLongTerm;

    @Schema(description = "项目预算", requiredMode = Schema.RequiredMode.REQUIRED)
    private BigDecimal projectBudget;

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

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

    @Schema(description = "上传文件", requiredMode = Schema.RequiredMode.REQUIRED)
    private List<UploadUserFile> fileItems;
}
