package com.ywt.mg.domain.entities;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/**
 * 核酸检测订单表
 */
@Entity
@Table(name = "nat_order")
public class NatOrder implements Serializable {
  private static final long serialVersionUID = 1L;

  @Id
  @GeneratedValue(strategy = GenerationType.IDENTITY)
  @Column(name = "id", insertable = false, nullable = false)
  private Integer id;

  /**
   * 订单 id，订单表主键
   */
  @Column(name = "order_id")
  private Integer orderId;

  /**
   * 订单编码
   */
  @Column(name = "order_no")
  private String orderNo;

  /**
   * 医院 id
   */
  @Column(name = "hospital_id", nullable = false)
  private Integer hospitalId;

  /**
   * 创建时间
   */
  @Column(name = "create_time", nullable = false)
  private Date createTime;

  /**
   * 更新时间
   */
  @Column(name = "update_time", nullable = false)
  private Date updateTime;

  /**
   * 删除标识：0-未删除；1-已删除
   */
  @Column(name = "deleted", nullable = false)
  private Boolean deleted = Boolean.FALSE;

  /**
   * 费用，单位分
   */
  @Column(name = "amount", nullable = false)
  private Integer amount;

  /**
   * 患者用户 id
   */
  @Column(name = "user_id", nullable = false)
  private Integer userId;

  /**
   * 患者姓名
   */
  @Column(name = "patient_name", nullable = false)
  private String patientName;

  /**
   * 身份证号
   */
  @Column(name = "id_card", nullable = false)
  private String idCard;

  /**
   * 手机号
   */
  @Column(name = "mobile", nullable = false)
  private String mobile;

  /**
   * 预约日期
   */
  @Column(name = "reg_date", nullable = false)
  private Date regDate;

  /**
   * 预约时间段：2-上午；3-下午；
   */
  @Column(name = "reg_time_period", nullable = false)
  private Integer regTimePeriod;

  /**
   * 现住址
   */
  @Column(name = "address", nullable = false)
  private String address;

  /**
   * 订单状态：1-未支付；2-已支付/待检测；4-已完成；8-已取消；16-已退款
   */
  @Column(name = "status", nullable = false)
  private Integer status;

  /**
   * 支付状态：0-待支付；1-支付处理中；2-支付成功；3-支付失败；
   */
  @Column(name = "payment_status", nullable = false)
  private Integer paymentStatus = 0;

  /**
   * 支付时间
   */
  @Column(name = "pay_time")
  private Date payTime;

  /**
   * 退费时间
   */
  @Column(name = "refund_time")
  private Date refundTime;

  /**
   * 缴费码
   */
  @Column(name = "payment_code")
  private String paymentCode;

  /**
   * 疫苗码
   */
  @Column(name = "vaccine_code")
  private String vaccineCode;

  /**
   * 备注
   */
  @Column(name = "remark")
  private String remark;

  /**
   * 执行状态：1-确认执行；0-尚未执行；默认为0
   */
  @Column(name = "exe_status", nullable = false)
  private Integer exeStatus = 0;

  /**
   * 退款状态
   */
  @Column(name = "refund_status")
  private Integer refundStatus;

  /**
   * 退款回调时间
   */
  @Column(name = "refund_callback_time")
  private String refundCallbackTime;

  /**
   * 支付渠道
   */
  @Column(name = "payment_channel")
  private Integer paymentChannel;

  /**
   * 支付流水号
   */
  @Column(name = "payment_no")
  private String paymentNo;

  /**
   * 退款流水号
   */
  @Column(name = "refund_no")
  private String refundNo;

  /**
   * 确认执行时间
   */
  @Column(name = "confirm_time")
  private Date confirmTime;

  public Integer getId() {
    return id;
  }

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

  /**
   * 订单 id，订单表主键
   */
  public Integer getOrderId() {
    return orderId;
  }

  /**
   * 订单 id，订单表主键
   */
  public void setOrderId(Integer orderId) {
    this.orderId = orderId;
  }

  /**
   * 订单编码
   */
  public String getOrderNo() {
    return orderNo;
  }

  /**
   * 订单编码
   */
  public void setOrderNo(String orderNo) {
    this.orderNo = orderNo;
  }

  /**
   * 医院 id
   */
  public Integer getHospitalId() {
    return hospitalId;
  }

  /**
   * 医院 id
   */
  public void setHospitalId(Integer hospitalId) {
    this.hospitalId = hospitalId;
  }

  /**
   * 创建时间
   */
  public Date getCreateTime() {
    return createTime;
  }

  /**
   * 创建时间
   */
  public void setCreateTime(Date createTime) {
    this.createTime = createTime;
  }

  /**
   * 更新时间
   */
  public Date getUpdateTime() {
    return updateTime;
  }

  /**
   * 更新时间
   */
  public void setUpdateTime(Date updateTime) {
    this.updateTime = updateTime;
  }

  /**
   * 删除标识：0-未删除；1-已删除
   */
  public Boolean isDeleted() {
    return deleted;
  }

  /**
   * 删除标识：0-未删除；1-已删除
   */
  public void setDeleted(Boolean deleted) {
    this.deleted = deleted;
  }

  /**
   * 费用，单位分
   */
  public Integer getAmount() {
    return amount;
  }

  /**
   * 费用，单位分
   */
  public void setAmount(Integer amount) {
    this.amount = amount;
  }

  /**
   * 患者用户 id
   */
  public Integer getUserId() {
    return userId;
  }

  /**
   * 患者用户 id
   */
  public void setUserId(Integer userId) {
    this.userId = userId;
  }

  /**
   * 患者姓名
   */
  public String getPatientName() {
    return patientName;
  }

  /**
   * 患者姓名
   */
  public void setPatientName(String patientName) {
    this.patientName = patientName;
  }

  /**
   * 身份证号
   */
  public String getIdCard() {
    return idCard;
  }

  /**
   * 身份证号
   */
  public void setIdCard(String idCard) {
    this.idCard = idCard;
  }

  /**
   * 手机号
   */
  public String getMobile() {
    return mobile;
  }

  /**
   * 手机号
   */
  public void setMobile(String mobile) {
    this.mobile = mobile;
  }

  /**
   * 预约日期
   */
  public Date getRegDate() {
    return regDate;
  }

  /**
   * 预约日期
   */
  public void setRegDate(Date regDate) {
    this.regDate = regDate;
  }

  /**
   * 预约时间段：2-上午；3-下午；
   */
  public Integer getRegTimePeriod() {
    return regTimePeriod;
  }

  /**
   * 预约时间段：2-上午；3-下午；
   */
  public void setRegTimePeriod(Integer regTimePeriod) {
    this.regTimePeriod = regTimePeriod;
  }

  /**
   * 现住址
   */
  public String getAddress() {
    return address;
  }

  /**
   * 现住址
   */
  public void setAddress(String address) {
    this.address = address;
  }

  /**
   * 订单状态：1-未支付；2-已支付/待检测；4-已完成；8-已取消；16-已退款
   */
  public Integer getStatus() {
    return status;
  }

  /**
   * 订单状态：1-未支付；2-已支付/待检测；4-已完成；8-已取消；16-已退款
   */
  public void setStatus(Integer status) {
    this.status = status;
  }

  /**
   * 支付状态：0-待支付；1-支付处理中；2-支付成功；3-支付失败；
   */
  public Integer getPaymentStatus() {
    return paymentStatus;
  }

  /**
   * 支付状态：0-待支付；1-支付处理中；2-支付成功；3-支付失败；
   */
  public void setPaymentStatus(Integer paymentStatus) {
    this.paymentStatus = paymentStatus;
  }

  /**
   * 支付时间
   */
  public Date getPayTime() {
    return payTime;
  }

  /**
   * 支付时间
   */
  public void setPayTime(Date payTime) {
    this.payTime = payTime;
  }

  /**
   * 退费时间
   */
  public Date getRefundTime() {
    return refundTime;
  }

  /**
   * 退费时间
   */
  public void setRefundTime(Date refundTime) {
    this.refundTime = refundTime;
  }

  /**
   * 缴费码
   */
  public String getPaymentCode() {
    return paymentCode;
  }

  /**
   * 缴费码
   */
  public void setPaymentCode(String paymentCode) {
    this.paymentCode = paymentCode;
  }

  /**
   * 疫苗码
   */
  public String getVaccineCode() {
    return vaccineCode;
  }

  /**
   * 疫苗码
   */
  public void setVaccineCode(String vaccineCode) {
    this.vaccineCode = vaccineCode;
  }

  /**
   * 备注
   */
  public String getRemark() {
    return remark;
  }

  /**
   * 备注
   */
  public void setRemark(String remark) {
    this.remark = remark;
  }

  /**
   * 执行状态：1-确认执行；0-尚未执行；默认为0
   */
  public Integer getExeStatus() {
    return exeStatus;
  }

  /**
   * 执行状态：1-确认执行；0-尚未执行；默认为0
   */
  public void setExeStatus(Integer exeStatus) {
    this.exeStatus = exeStatus;
  }

  /**
   * 退款状态
   */
  public Integer getRefundStatus() {
    return refundStatus;
  }

  /**
   * 退款状态
   */
  public void setRefundStatus(Integer refundStatus) {
    this.refundStatus = refundStatus;
  }

  /**
   * 退款回调时间
   */
  public String getRefundCallbackTime() {
    return refundCallbackTime;
  }

  /**
   * 退款回调时间
   */
  public void setRefundCallbackTime(String refundCallbackTime) {
    this.refundCallbackTime = refundCallbackTime;
  }

  /**
   * 支付渠道
   */
  public Integer getPaymentChannel() {
    return paymentChannel;
  }

  /**
   * 支付渠道
   */
  public void setPaymentChannel(Integer paymentChannel) {
    this.paymentChannel = paymentChannel;
  }

  /**
   * 支付流水号
   */
  public String getPaymentNo() {
    return paymentNo;
  }

  /**
   * 支付流水号
   */
  public void setPaymentNo(String paymentNo) {
    this.paymentNo = paymentNo;
  }

  /**
   * 退款流水号
   */
  public String getRefundNo() {
    return refundNo;
  }

  /**
   * 退款流水号
   */
  public void setRefundNo(String refundNo) {
    this.refundNo = refundNo;
  }

  /**
   * 确认执行时间
   */
  public Date getConfirmTime() {
    return confirmTime;
  }

  /**
   * 确认执行时间
   */
  public void setConfirmTime(Date confirmTime) {
    this.confirmTime = confirmTime;
  }

  public String toString() {
    return "NatOrder{id=" + id + 
      ", orderId=" + orderId + 
      ", orderNo=" + orderNo + 
      ", hospitalId=" + hospitalId + 
      ", createTime=" + createTime + 
      ", updateTime=" + updateTime + 
      ", deleted=" + deleted + 
      ", amount=" + amount + 
      ", userId=" + userId + 
      ", patientName=" + patientName + 
      ", idCard=" + idCard + 
      ", mobile=" + mobile + 
      ", regDate=" + regDate + 
      ", regTimePeriod=" + regTimePeriod + 
      ", address=" + address + 
      ", status=" + status + 
      ", paymentStatus=" + paymentStatus + 
      ", payTime=" + payTime + 
      ", refundTime=" + refundTime + 
      ", paymentCode=" + paymentCode + 
      ", vaccineCode=" + vaccineCode + 
      ", remark=" + remark + 
      ", exeStatus=" + exeStatus + 
      ", refundStatus=" + refundStatus + 
      ", refundCallbackTime=" + refundCallbackTime + 
      ", paymentChannel=" + paymentChannel + 
      ", paymentNo=" + paymentNo + 
      ", refundNo=" + refundNo + 
      ", confirmTime=" + confirmTime + 
      "}";
  }
}