package com.qmth.sop.business.entity;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.qmth.sop.common.base.BaseEntity;
import com.qmth.sop.common.enums.CrmStatusEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * <p>
 * 派单信息表
 * </p>
 *
 * @author wangliang
 * @since 2023-08-01
 */
@ApiModel(value="TBCrm对象", description="派单信息表")
public class TBCrm extends BaseEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "项目单号")
    @NotBlank(message = "项目单号不能为空")
    private String crmNo;

    @ApiModelProperty(value = "项目名称")
    @NotBlank(message = "项目名称不能为空")
    private String name;

    @ApiModelProperty(value = "派单时间")
    @NotNull(message = "派单时间不能为空")
    private Long beginTime;

    @ApiModelProperty(value = "服务单元id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long serviceId;

    @ApiModelProperty(value = "派单人id")
    @JsonSerialize(using = ToStringSerializer.class)
    @NotNull(message = "派单人id不能为空")
    private Long crmUserId;

    @ApiModelProperty(value = "客户id")
    @JsonSerialize(using = ToStringSerializer.class)
    @NotNull(message = "客户id不能为空")
    private Long customId;

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

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

    @ApiModelProperty(value = "产品id")
    @JsonSerialize(using = ToStringSerializer.class)
    @NotNull(message = "产品id不能为空")
    private Long productId;

    @ApiModelProperty(value = "大区经理id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long leadId;

    @ApiModelProperty(value = "大区经理id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long regionId;

    @ApiModelProperty(value = "服务区域规划id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long regionDetailId;

    @ApiModelProperty(value = "服务区域规划明细id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long regionCoordinatorId;

    @ApiModelProperty(value = "是否crm同步，false：否，true：是")
    private Boolean sync;

    @ApiModelProperty(value = "是否启用，0：停用，1：启用")
    private Boolean enable;

    @ApiModelProperty(value = "派单状态(UN_PUBLISH(\"未发布\"),PUBLISH(\"已发布\"),FINISH(\"已完成\");)")
    private CrmStatusEnum status;

    @ApiModelProperty(value = "派单发布人")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long publishUserId;

    @ApiModelProperty(value = "派单发布时间")
    private Long publishTime;

    public String getCrmNo() {
        return crmNo;
    }

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

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Long getBeginTime() {
        return beginTime;
    }

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

    public Long getServiceId() {
        return serviceId;
    }

    public void setServiceId(Long serviceId) {
        this.serviceId = serviceId;
    }

    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;
    }

    public Long getLeadId() {
        return leadId;
    }

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

    public Long getRegionId() {
        return regionId;
    }

    public void setRegionId(Long regionId) {
        this.regionId = regionId;
    }

    public Long getRegionDetailId() {
        return regionDetailId;
    }

    public void setRegionDetailId(Long regionDetailId) {
        this.regionDetailId = regionDetailId;
    }

    public Long getRegionCoordinatorId() {
        return regionCoordinatorId;
    }

    public void setRegionCoordinatorId(Long regionCoordinatorId) {
        this.regionCoordinatorId = regionCoordinatorId;
    }

    public Boolean getSync() {
        return sync;
    }

    public void setSync(Boolean sync) {
        this.sync = sync;
    }

    public Boolean getEnable() {
        return enable;
    }

    public void setEnable(Boolean enable) {
        this.enable = enable;
    }

    public CrmStatusEnum getStatus() {
        return status;
    }

    public void setStatus(CrmStatusEnum status) {
        this.status = status;
    }

    public Long getPublishUserId() {
        return publishUserId;
    }

    public void setPublishUserId(Long publishUserId) {
        this.publishUserId = publishUserId;
    }

    public Long getPublishTime() {
        return publishTime;
    }

    public void setPublishTime(Long publishTime) {
        this.publishTime = publishTime;
    }
}
