package com.qmth.sop.business.bean.params;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.qmth.sop.common.enums.SopRoleTypeEnum;
import io.swagger.annotations.ApiModelProperty;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * @Description: 分配参数
 * @Author: CaoZixuan
 * @Date: 2023-08-16
 */
public class AllocationParam {

    @ApiModelProperty("角色id")
    @JsonSerialize(using = ToStringSerializer.class)
    @NotNull(message = "请提供调配的身份")
    @Range(min = 1L, message = "请提供调配的身份")
    private SopRoleTypeEnum sopRoleType;

    @ApiModelProperty("档案id集合")
    @NotEmpty(message = "请提供调配的档案id")
    private List<Long> userIdList;

    @ApiModelProperty("备注（为同批次新增全部人员赋值备注信息）")
    private String remark;

    public AllocationParam() {

    }

    public AllocationParam(SopRoleTypeEnum sopRoleType, List<Long> userIdList, String remark) {
        this.sopRoleType = sopRoleType;
        this.userIdList = userIdList;
        this.remark = remark;
    }

    public AllocationParam(SopRoleTypeEnum sopRoleType, List<Long> userIdList) {
        this.sopRoleType = sopRoleType;
        this.userIdList = userIdList;
    }

    public SopRoleTypeEnum getSopRoleType() {
        return sopRoleType;
    }

    public void setSopRoleType(SopRoleTypeEnum sopRoleType) {
        this.sopRoleType = sopRoleType;
    }

    public List<Long> getUserIdList() {
        return userIdList;
    }

    public void setUserIdList(List<Long> userIdList) {
        this.userIdList = userIdList;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }
}
