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

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.qmth.sop.common.enums.ProductTypeEnum;
import com.qmth.sop.common.enums.WarnTypeEnum;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.util.Objects;

/**
 * @Description: 工作台预警待办result
 * @Param:
 * @return:
 * @Author: wangliang
 * @Date: 2023/8/10
 */
@JsonInclude(JsonInclude.Include.NON_NULL)
public class WorkWarnResult implements Serializable {

    @ApiModelProperty(value = "主键")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    @ApiModelProperty(value = "流程编号")
    private String code;

    @ApiModelProperty(value = "sop单号")
    private String sopNo;

    @ApiModelProperty(value = "crm单号")
    private String crmNo;

    @ApiModelProperty(value = "crm名称")
    private String crmName;

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

    @ApiModelProperty(value = "服务单元名称")
    private String serviceName;

    @ApiModelProperty(value = "服务单元类型，OFFICE：教务处，CLOUD_MARK：研究生")
    private ProductTypeEnum serviceType;

    @ApiModelProperty(value = "服务单元类型str")
    private String serviceTypeStr;

    @ApiModelProperty(value = "客户id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long customId;

    @ApiModelProperty(value = "客户名称")
    private String customName;

    @ApiModelProperty(value = "发起人id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long createId;

    @ApiModelProperty(value = "发起人真实姓名")
    private String createRealName;

    @ApiModelProperty(value = "客户类型")
    private ProductTypeEnum customType;

    @ApiModelProperty(value = "客户类型str")
    private String customTypeStr;

    @ApiModelProperty(value = "创建时间")
    private Long createTime;

    @ApiModelProperty(value = "预警类型")
    private WarnTypeEnum warnType;

    public WarnTypeEnum getWarnType() {
        return warnType;
    }

    public void setWarnType(WarnTypeEnum warnType) {
        this.warnType = warnType;
    }

    public ProductTypeEnum getCustomType() {
        return customType;
    }

    public void setCustomType(ProductTypeEnum customType) {
        this.customType = customType;
    }

    public String getCustomTypeStr() {
        if (Objects.nonNull(customType)) {
            return customType.getTitle();
        } else {
            return customTypeStr;
        }
    }

    public void setCustomTypeStr(String customTypeStr) {
        this.customTypeStr = customTypeStr;
    }

    public String getCrmNo() {
        return crmNo;
    }

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

    public String getCrmName() {
        return crmName;
    }

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

    public Long getServiceId() {
        return serviceId;
    }

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

    public String getServiceName() {
        return serviceName;
    }

    public void setServiceName(String serviceName) {
        this.serviceName = serviceName;
    }

    public ProductTypeEnum getServiceType() {
        return serviceType;
    }

    public void setServiceType(ProductTypeEnum serviceType) {
        this.serviceType = serviceType;
    }

    public String getServiceTypeStr() {
        if (Objects.nonNull(serviceType)) {
            return serviceType.getTitle();
        } else {
            return serviceTypeStr;
        }
    }

    public void setServiceTypeStr(String serviceTypeStr) {
        this.serviceTypeStr = serviceTypeStr;
    }

    public Long getCustomId() {
        return customId;
    }

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

    public String getCustomName() {
        return customName;
    }

    public void setCustomName(String customName) {
        this.customName = customName;
    }

    public Long getCreateId() {
        return createId;
    }

    public void setCreateId(Long createId) {
        this.createId = createId;
    }

    public String getCreateRealName() {
        return createRealName;
    }

    public void setCreateRealName(String createRealName) {
        this.createRealName = createRealName;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public Long getId() {
        return id;
    }

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

    public String getSopNo() {
        return sopNo;
    }

    public void setSopNo(String sopNo) {
        this.sopNo = sopNo;
    }

    public Long getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Long createTime) {
        this.createTime = createTime;
    }
}
