package com.zcloud.safetyDutyList.dto.tasklist;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.time.YearMonth;

/**
 * 安全责任清单下发命令
 * <p>
 * 用于下发清单到指定执行企业和执行人，设置执行周期起止时间
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class TaskListIssueCmd implements Serializable {
    @ApiModelProperty(value = "清单UUID（业务主键）", required = true)
    @NotEmpty(message = "清单ID不能为空")
    private String taskListId;

    @ApiModelProperty(value = "执行公司ID", required = true)
    @NotNull(message = "执行公司ID不能为空")
    private Long executeCorpId;

    @ApiModelProperty(value = "执行部门ID", required = true)
    @NotNull(message = "执行部门ID不能为空")
    private Long executeDepartmentId;

    @ApiModelProperty(value = "执行人员ID", required = true)
    @NotNull(message = "执行人员ID不能为空")
    private Long executeUserId;

    @ApiModelProperty(value = "执行周期开始时间", required = true)
    @NotNull(message = "执行周期开始时间不能为空")
    @JsonFormat(pattern = "yyyy-MM")
    private YearMonth periodStartTime;

    @ApiModelProperty(value = "执行周期结束时间", required = true)
    @NotNull(message = "执行周期结束时间不能为空")
    @JsonFormat(pattern = "yyyy-MM")
    private YearMonth periodEndTime;
}
