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.annotation.EditKey;
import com.qmth.sop.business.bean.dto.AreaDto;
import io.swagger.annotations.ApiModelProperty;
import org.hibernate.validator.constraints.Range;

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

/**
 * @Description: 服务区域规划参数
 * @Author: CaoZixuan
 * @Date: 2023-08-09
 */
public class ServiceRegionParam {
    @EditKey
    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty("服务区域规划id")
    private Long serviceRegionId;

    @ApiModelProperty("大区名称")
    @NotBlank(message = "请提供大区名称")
    private String regionName;

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

    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty("大区经理id")
    @NotNull(message = "请提供大区经理")
    @Range(min = 1L, message = "请提供大区经理")
    private Long leadId;

    @ApiModelProperty("地区集合")
    @NotEmpty(message = "请提供区域划分")
    private List<AreaDto> areaDtoList;

    public Long getServiceRegionId() {
        return serviceRegionId;
    }

    public void setServiceRegionId(Long serviceRegionId) {
        this.serviceRegionId = serviceRegionId;
    }

    public Long getServiceUnitId() {
        return serviceUnitId;
    }

    public void setServiceUnitId(Long serviceUnitId) {
        this.serviceUnitId = serviceUnitId;
    }

    public String getRegionName() {
        return regionName;
    }

    public void setRegionName(String regionName) {
        this.regionName = regionName;
    }

    public Long getLeadId() {
        return leadId;
    }

    public void setLeadId(Long leadId) {
        this.leadId = leadId;
    }

    public List<AreaDto> getAreaDtoList() {
        return areaDtoList;
    }

    public void setAreaDtoList(List<AreaDto> areaDtoList) {
        this.areaDtoList = areaDtoList;
    }
}
