package com.fs.store.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fs.common.annotation.Excel;
import com.fs.common.core.domain.BaseEntity;
import com.vdurmont.emoji.EmojiParser;
import org.apache.commons.lang3.StringUtils;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 问诊订单对象 fs_inquiry_order
 *
 * @author fs
 * @date 2023-09-15
 */
public class FsInquiryOrder extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** ID */
    private Long orderId;

    /** 订单号 */
    @Excel(name = "订单号")
    private String orderSn;

    /** 问诊标题 */
    @Excel(name = "问诊标题")
    private String title;

    /** 病例组图 */
    @Excel(name = "病例组图")
    private String imgs;

    /** 会员ID */
    @Excel(name = "会员ID")
    private Long userId;

    /** 病人ID */
    @Excel(name = "病人ID")
    private Long patientId;

    /** 订单类型 1图文 2语音 */
    @Excel(name = "订单类型 1图文 2语音")
    private Integer orderType;

    /** 订单金额 */
    @Excel(name = "订单金额")
    private BigDecimal money;

    /** 支付金额 */
    @Excel(name = "支付金额")
    private BigDecimal payMoney;

    /** 支付类型 1微信支付 */
    @Excel(name = "支付类型 1微信支付")
    private Integer payType;

    /** 是否支付 */
    @Excel(name = "是否支付")
    private Integer isPay;

    /** 医生ID */
    @Excel(name = "医生ID")
    private Long doctorId;

    /** 支付时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "支付时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date payTime;

    /** 状态 1待支付 2已支付 3已完成  -1已关闭 -2已退款 */
    @Excel(name = "状态 1待支付 2已支付 3已完成  -1已关闭 -2已退款")
    private Integer status;

    /** 问诊开始时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "问诊开始时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date startTime;

    /** 结束时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date finishTime;

    /** 是否评价 */
    @Excel(name = "是否评价")
    private Integer isPing;

    /** 科室ID */
    @Excel(name = "科室ID")
    private Long departmentId;

    /** 问诊类型  1专家 2极速 3开药问诊 */
    @Excel(name = "问诊类型  1专家 2极速 3开药问诊")
    private Integer inquiryType;

    /** 问诊子类型 1凯蒙名医 2健康草本 3御君方 3不良反应 */
    @Excel(name = "问诊子类型 1凯蒙名医 2健康草本 3御君方 3不良反应")
    private Integer inquirySubType;

    /** 患者信息 */
    @Excel(name = "患者信息")
    private String patientJson;

    /** $column.columnComment */
    @Excel(name = "患者信息")
    private Integer isReceive;

    /** 支付订单号 */
    @Excel(name = "支付订单号")
    private String tradeNo;

    /** 是否审核 */
    @Excel(name = "是否审核")
    private Integer isAudit;

    /** 审核人 */
    @Excel(name = "审核人")
    private Long auditUserId;

    /** 审核时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "审核时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date auditTime;

    private Long userCouponId;

    private BigDecimal discountMoney;

    private Long packageOrderId;
    private String doctorRemark;

    private Long companyId;
    private Long companyUserId;
    private Long deptId;
    private BigDecimal companyDeductMoney;

    private String companyUserRemark; //销售备注

    private Integer isSendSms; //是否发送短信
    private Integer source;//订单来源

    private Long triageUserId;

    public Long getTriageUserId() {
        return triageUserId;
    }

    public void setTriageUserId(Long triageUserId) {
        this.triageUserId = triageUserId;
    }

    public Integer getSource() {
        return source;
    }

    public void setSource(Integer source) {
        this.source = source;
    }

    public String getDoctorRemark() {
        return doctorRemark;
    }

    public void setDoctorRemark(String doctorRemark) {
        this.doctorRemark = doctorRemark;
    }

    public Integer getIsSendSms() {
        return isSendSms;
    }

    public void setIsSendSms(Integer isSendSms) {
        this.isSendSms = isSendSms;
    }

    public String getCompanyUserRemark() {
        return companyUserRemark;
    }

    public void setCompanyUserRemark(String companyUserRemark) {
        this.companyUserRemark = companyUserRemark;
    }

    public Long getDeptId() {
        return deptId;
    }

    public void setDeptId(Long deptId) {
        this.deptId = deptId;
    }

    public BigDecimal getCompanyDeductMoney() {
        return companyDeductMoney;
    }

    public void setCompanyDeductMoney(BigDecimal companyDeductMoney) {
        this.companyDeductMoney = companyDeductMoney;
    }

    public Long getCompanyId() {
        return companyId;
    }

    public void setCompanyId(Long companyId) {
        this.companyId = companyId;
    }

    public Long getCompanyUserId() {
        return companyUserId;
    }

    public void setCompanyUserId(Long companyUserId) {
        this.companyUserId = companyUserId;
    }

    public Long getPackageOrderId() {
        return packageOrderId;
    }

    public void setPackageOrderId(Long packageOrderId) {
        this.packageOrderId = packageOrderId;
    }

    public Long getUserCouponId() {
        return userCouponId;
    }

    public void setUserCouponId(Long userCouponId) {
        this.userCouponId = userCouponId;
    }

    public BigDecimal getDiscountMoney() {
        return discountMoney;
    }

    public void setDiscountMoney(BigDecimal discountMoney) {
        this.discountMoney = discountMoney;
    }

    public void setOrderId(Long orderId)
    {
        this.orderId = orderId;
    }

    public Long getOrderId()
    {
        return orderId;
    }
    public void setOrderSn(String orderSn)
    {
        this.orderSn = orderSn;
    }

    public String getOrderSn()
    {
        return orderSn;
    }
    public void setTitle(String title)
    {
        if(StringUtils.isNotEmpty(title)){
            this.title= EmojiParser.parseToHtmlDecimal(title);
        }
        else{
            this.title= title;
        }
    }

    public String getTitle()
    {
        if(StringUtils.isNotEmpty(title)){
            return EmojiParser.parseToUnicode(title);
        }
        else{
            return title;
        }
    }
    public void setImgs(String imgs)
    {
        this.imgs = imgs;
    }

    public String getImgs()
    {
        return imgs;
    }
    public void setUserId(Long userId)
    {
        this.userId = userId;
    }

    public Long getUserId()
    {
        return userId;
    }
    public void setPatientId(Long patientId)
    {
        this.patientId = patientId;
    }

    public Long getPatientId()
    {
        return patientId;
    }
    public void setOrderType(Integer orderType)
    {
        this.orderType = orderType;
    }

    public Integer getOrderType()
    {
        return orderType;
    }
    public void setMoney(BigDecimal money)
    {
        this.money = money;
    }

    public BigDecimal getMoney()
    {
        return money;
    }
    public void setPayMoney(BigDecimal payMoney)
    {
        this.payMoney = payMoney;
    }

    public BigDecimal getPayMoney()
    {
        return payMoney;
    }
    public void setPayType(Integer payType)
    {
        this.payType = payType;
    }

    public Integer getPayType()
    {
        return payType;
    }
    public void setIsPay(Integer isPay)
    {
        this.isPay = isPay;
    }

    public Integer getIsPay()
    {
        return isPay;
    }
    public void setDoctorId(Long doctorId)
    {
        this.doctorId = doctorId;
    }

    public Long getDoctorId()
    {
        return doctorId;
    }
    public void setPayTime(Date payTime)
    {
        this.payTime = payTime;
    }

    public Date getPayTime()
    {
        return payTime;
    }
    public void setStatus(Integer status)
    {
        this.status = status;
    }

    public Integer getStatus()
    {
        return status;
    }
    public void setStartTime(Date startTime)
    {
        this.startTime = startTime;
    }

    public Date getStartTime()
    {
        return startTime;
    }
    public void setFinishTime(Date finishTime)
    {
        this.finishTime = finishTime;
    }

    public Date getFinishTime()
    {
        return finishTime;
    }
    public void setIsPing(Integer isPing)
    {
        this.isPing = isPing;
    }

    public Integer getIsPing()
    {
        return isPing;
    }
    public void setDepartmentId(Long departmentId)
    {
        this.departmentId = departmentId;
    }

    public Long getDepartmentId()
    {
        return departmentId;
    }
    public void setInquiryType(Integer inquiryType)
    {
        this.inquiryType = inquiryType;
    }

    public Integer getInquiryType()
    {
        return inquiryType;
    }
    public void setInquirySubType(Integer inquirySubType)
    {
        this.inquirySubType = inquirySubType;
    }

    public Integer getInquirySubType()
    {
        return inquirySubType;
    }
    public void setPatientJson(String patientJson)
    {
        if(StringUtils.isNotEmpty(patientJson)){
            this.patientJson= EmojiParser.parseToHtmlDecimal(patientJson);
        }
        else{
            this.patientJson= patientJson;
        }

    }

    public String getPatientJson()
    {
        if(StringUtils.isNotEmpty(patientJson)){
            return EmojiParser.parseToUnicode(patientJson);
        }
        else{
            return patientJson;
        }
    }
    public void setIsReceive(Integer isReceive)
    {
        this.isReceive = isReceive;
    }

    public Integer getIsReceive()
    {
        return isReceive;
    }
    public void setTradeNo(String tradeNo)
    {
        this.tradeNo = tradeNo;
    }

    public String getTradeNo()
    {
        return tradeNo;
    }
    public void setIsAudit(Integer isAudit)
    {
        this.isAudit = isAudit;
    }

    public Integer getIsAudit()
    {
        return isAudit;
    }
    public void setAuditUserId(Long auditUserId)
    {
        this.auditUserId = auditUserId;
    }

    public Long getAuditUserId()
    {
        return auditUserId;
    }
    public void setAuditTime(Date auditTime)
    {
        this.auditTime = auditTime;
    }

    public Date getAuditTime()
    {
        return auditTime;
    }

    @Override
    public String toString() {
        return "FsInquiryOrder{" +
                "orderId=" + orderId +
                ", orderSn='" + orderSn + '\'' +
                ", title='" + title + '\'' +
                ", imgs='" + imgs + '\'' +
                ", userId=" + userId +
                ", patientId=" + patientId +
                ", orderType=" + orderType +
                ", money=" + money +
                ", payMoney=" + payMoney +
                ", payType=" + payType +
                ", isPay=" + isPay +
                ", doctorId=" + doctorId +
                ", payTime=" + payTime +
                ", status=" + status +
                ", startTime=" + startTime +
                ", finishTime=" + finishTime +
                ", isPing=" + isPing +
                ", departmentId=" + departmentId +
                ", inquiryType=" + inquiryType +
                ", inquirySubType=" + inquirySubType +
                ", patientJson='" + patientJson + '\'' +
                ", isReceive=" + isReceive +
                ", tradeNo='" + tradeNo + '\'' +
                ", isAudit=" + isAudit +
                ", auditUserId=" + auditUserId +
                ", auditTime=" + auditTime +
                ", userCouponId=" + userCouponId +
                ", discountMoney=" + discountMoney +
                ", packageOrderId=" + packageOrderId +
                ", doctorRemark='" + doctorRemark + '\'' +
                ", companyId=" + companyId +
                ", companyUserId=" + companyUserId +
                ", deptId=" + deptId +
                ", companyDeductMoney=" + companyDeductMoney +
                ", companyUserRemark='" + companyUserRemark + '\'' +
                ", isSendSms=" + isSendSms +
                ", source=" + source +
                ", triageUserId=" + triageUserId +
                '}';
    }
}
