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

import cn.iocoder.yudao.module.bpm.controller.admin.oa.vo.BpmOABaseRespVO;
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.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;

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

@Schema(description = "管理后台 - 报销响应数据 Response VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class BpmOAWorkTaskRespVO extends BpmOABaseRespVO {

    @Schema(description = "任务名称", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "任务名称不能为空")
    private String taskName;

    @Schema(description = "任务内容", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "任务内容不能为空")
    private String taskContent;

    @Schema(description = "任务级别", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "任务级别不能为空")
    private Integer level;

    @Schema(description = "任务的开始时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "截止时间不能为空")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY)
    private LocalDate startTime;

    @Schema(description = "任务的截止时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "截止时间不能为空")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY)
    private LocalDate endTime;

    @Schema(description = "发起人用户ID", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "责任名称不能为空")
    private Long fromUserId;

    @Schema(description = "发起人名称", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "责任名称不能为空")
    private String fromUserName;

    @Schema(description = "责任人用户ID", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "责任名称不能为空")
    private Long receiverUserId;

    @Schema(description = "责任人名称", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "责任名称不能为空")
    private String userName;

    @Schema(description = "责任人部门名称", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "部门名称不能为空")
    private String deptName;

    @Schema(description = "任务进度百分比", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "任务进度百分比")
    private Long schedule ;

    @Schema(description = "工作任务状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1:待启动，2:进行中，3.已完成，4.延期, 5.搁置")
    @NotNull(message = "工作任务状态")
    private Integer workTaskStatus ;

    @Schema(description = "搁置或延期原因")
    private String reason;

    @Schema(description = "搁置后 任务开始日期")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY)
    private LocalDate shelveStartTime;

    @Schema(description = "搁置后 任务结束日期")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY)
    private LocalDate shelveEndTime;

    @Schema(description = "跟踪内容集合")
    private List<BpmOAWorkTaskTrackInfo> trackInfo;

    @Schema(description = "更新时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime updateTime;

    @Schema(description = "TaskId")
    private String taskId;
}
