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 io.swagger.annotations.ApiModelProperty;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * @Description: 派单参数
 * @Author: CaoZixuan
 * @Date: 2024-05-16
 */
public class TBCrmParam {

    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "派单id")
    @EditKey
    private Long id;

    @ApiModelProperty(value = "项目名称")
    @NotNull(message = "缺少项目名称")
    @NotBlank(message = "缺少项目名称")
    private String crmName;

    @ApiModelProperty(value = "项目单号")
    @NotNull(message = "缺少项目单号")
    @NotBlank(message = "缺少项目单号")
    private String crmNo;

    @ApiModelProperty(value = "派单时间")
    @NotNull(message = "派单时间不能为空")
    @Range(min = 1L, message = "请提供派单时间")
    private Long beginTime;

    @ApiModelProperty(value = "客户经理id")
    @JsonSerialize(using = ToStringSerializer.class)
    @NotNull(message = "客户经理不能为空")
    @Range(min = 1L, message = "请提供客户经理")
    private Long crmUserId;

    @ApiModelProperty(value = "客户id")
    @JsonSerialize(using = ToStringSerializer.class)
    @NotNull(message = "客户不能为空")
    @Range(min = 1L, message = "请提供客户")
    private Long customId;

    @ApiModelProperty(value = "考试开始时间")
    private Long examStartTime;

    @ApiModelProperty(value = "考试结束时间")
    private Long examEndTime;

    @ApiModelProperty(value = "产品id")
    @JsonSerialize(using = ToStringSerializer.class)
    @NotNull(message = "产品不能为空")
    @Range(min = 1L, message = "请提供产品")
    private Long productId;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getCrmName() {
        return crmName;
    }

    public void setCrmName(String crmName) {
        this.crmName = crmName;
    }

    public String getCrmNo() {
        return crmNo;
    }

    public void setCrmNo(String crmNo) {
        this.crmNo = crmNo;
    }

    public Long getBeginTime() {
        return beginTime;
    }

    public void setBeginTime(Long beginTime) {
        this.beginTime = beginTime;
    }

    public Long getCrmUserId() {
        return crmUserId;
    }

    public void setCrmUserId(Long crmUserId) {
        this.crmUserId = crmUserId;
    }

    public Long getCustomId() {
        return customId;
    }

    public void setCustomId(Long customId) {
        this.customId = customId;
    }

    public Long getExamStartTime() {
        return examStartTime;
    }

    public void setExamStartTime(Long examStartTime) {
        this.examStartTime = examStartTime;
    }

    public Long getExamEndTime() {
        return examEndTime;
    }

    public void setExamEndTime(Long examEndTime) {
        this.examEndTime = examEndTime;
    }

    public Long getProductId() {
        return productId;
    }

    public void setProductId(Long productId) {
        this.productId = productId;
    }
}
