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

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

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.List;

/**
 * @Description: 人员派单档案分配参数
 * @Author: CaoZixuan
 * @Date: 2023-08-16
 */
public class UserArchivesAllocationParam implements Serializable {

    @ApiModelProperty("分配参数")
    private List<AllocationParam> allocationParams;

    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty("服务单元id")
    @NotNull(message = "请提供服务单元id")
    @Range(min = 1L, message = "请提供服务单元id")
    private Long crmDetailId;

    public UserArchivesAllocationParam() {

    }

    public UserArchivesAllocationParam(List<AllocationParam> allocationParams, Long crmDetailId) {
        this.allocationParams = allocationParams;
        this.crmDetailId = crmDetailId;
    }

    public UserArchivesAllocationParam(UserArchivesAllocationParam userArchivesAllocationParam) {
        this.allocationParams = userArchivesAllocationParam.getAllocationParams();
        this.crmDetailId = userArchivesAllocationParam.getCrmDetailId();
    }

    public List<AllocationParam> getAllocationParams() {
        return allocationParams;
    }

    public void setAllocationParams(List<AllocationParam> allocationParams) {
        this.allocationParams = allocationParams;
    }

    public Long getCrmDetailId() {
        return crmDetailId;
    }

    public void setCrmDetailId(Long crmDetailId) {
        this.crmDetailId = crmDetailId;
    }
}
