package com.ywt.outpatient.taihe.rpc.domain.entity.center;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * (Orders)实体类
 *
 * @author johnson lin
 * @since 2019-05-24 10:03:50
 */
@Entity
@Table(name = "orders")
public class Orders implements Serializable {
    private static final long serialVersionUID = -86511659857167035L;
    
       /**
    * 主键
    */
    @Id
    @Column(name = "id")
    private Integer id;
    
    /**
     * 订单编号
     */
    @Column(name = "order_no")
    private String orderNo;
    
    /**
     * 订单状态 (10-待付款,20-已付款,30-已退款,40-已取消,50-已结束)
     */
    @Column(name = "order_status")
    private Integer orderStatus;
    
    /**
     * 用户id
     */
    @Column(name = "user_id")
    private Integer userId;
    
    /**
     * 患者手机号
     */
    @Column(name = "patient_mobile")
    private String patientMobile;
    
    /**
     * 创建时间
     */
    @Column(name = "create_time")
    private LocalDateTime createTime;
    
    /**
     * 订单金额
     */
    @Column(name = "order_amount")
    private Double orderAmount;
    
    /**
     * 支付状态（0-待支付,1-支付处理中，2-支付成功，3-支付失败）
     */
    @Column(name = "payment_status")
    private Integer paymentStatus;
    
    /**
     * 订单备注
     */
    @Column(name = "remark")
    private String remark;
    
    /**
     * 是否删除（标识物理删除）
     */
    @Column(name = "is_deleted")
    private Integer isDeleted;
    
    /**
     * 订单类型（1-询诊，2-转诊，3-主诊）
     */
    @Column(name = "order_type")
    private Integer orderType;
    
    /**
     * 业务Id
     */
    @Column(name = "business_id")
    private Integer businessId;
    
    /**
     * 医生id
     */
    @Column(name = "doctor_id")
    private Integer doctorId;
    
    /**
     * 订单标题
     */
    @Column(name = "title")
    private String title;
    
    @Column(name = "prepay_id")
    private String prepayId;
    
    @Column(name = "deleted")
    private Integer deleted;
    
    /**
     * 订单来源
     */
    @Column(name = "terminal")
    private Integer terminal;
    
    /**
     * 支付成功后回调grpc方法
     */
    @Column(name = "payment_callback_method")
    private String paymentCallbackMethod;
    
    /**
     * 支付成功后回调rest url
     */
    @Column(name = "payment_callback_rest_url")
    private String paymentCallbackRestUrl;
    
    /**
     * 自定义数据
     */
    @Column(name = "custom")
    private String custom;
    
    /**
     * 支付代码--支付中心统一编码
     */
    @Column(name = "pay_code")
    private String payCode;
    
    /**
     * 支付明细描述
     */
    @Column(name = "pay_body")
    private String payBody;
    
    /**
     * 根据终端配置不同的支付代码（JSON格式）
     */
    @Column(name = "pay_code_with_terminal")
    private String payCodeWithTerminal;
    
    /**
     * 支付流水号
     */
    @Column(name = "payment_no")
    private String paymentNo;
    
    /**
     * 已退款总金额，单位：分
     */
    @Column(name = "refunded_amount")
    private Integer refundedAmount;
    
    /**
     * 支付完成时间
     */
    @Column(name = "pay_time")
    private LocalDateTime payTime;
    
    /**
     * 补帐
     */
    @Column(name = "fill_account")
    private Integer fillAccount;
    
    /**
     * 补帐时间
     */
    @Column(name = "fill_time")
    private LocalDateTime fillTime;
    
    /**
     * 补帐操作人
     */
    @Column(name = "fill_op_by")
    private String fillOpBy;
    


    public Integer getId() {
        return id;
    }

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

    public String getOrderNo() {
        return orderNo;
    }

    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo;
    }

    public Integer getOrderStatus() {
        return orderStatus;
    }

    public void setOrderStatus(Integer orderStatus) {
        this.orderStatus = orderStatus;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public String getPatientMobile() {
        return patientMobile;
    }

    public void setPatientMobile(String patientMobile) {
        this.patientMobile = patientMobile;
    }

    public LocalDateTime getCreateTime() {
        return createTime;
    }

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

    public Double getOrderAmount() {
        return orderAmount;
    }

    public void setOrderAmount(Double orderAmount) {
        this.orderAmount = orderAmount;
    }

    public Integer getPaymentStatus() {
        return paymentStatus;
    }

    public void setPaymentStatus(Integer paymentStatus) {
        this.paymentStatus = paymentStatus;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public Integer getIsDeleted() {
        return isDeleted;
    }

    public void setIsDeleted(Integer isDeleted) {
        this.isDeleted = isDeleted;
    }

    public Integer getOrderType() {
        return orderType;
    }

    public void setOrderType(Integer orderType) {
        this.orderType = orderType;
    }

    public Integer getBusinessId() {
        return businessId;
    }

    public void setBusinessId(Integer businessId) {
        this.businessId = businessId;
    }

    public Integer getDoctorId() {
        return doctorId;
    }

    public void setDoctorId(Integer doctorId) {
        this.doctorId = doctorId;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getPrepayId() {
        return prepayId;
    }

    public void setPrepayId(String prepayId) {
        this.prepayId = prepayId;
    }

    public Integer getDeleted() {
        return deleted;
    }

    public void setDeleted(Integer deleted) {
        this.deleted = deleted;
    }

    public Integer getTerminal() {
        return terminal;
    }

    public void setTerminal(Integer terminal) {
        this.terminal = terminal;
    }

    public String getPaymentCallbackMethod() {
        return paymentCallbackMethod;
    }

    public void setPaymentCallbackMethod(String paymentCallbackMethod) {
        this.paymentCallbackMethod = paymentCallbackMethod;
    }

    public String getPaymentCallbackRestUrl() {
        return paymentCallbackRestUrl;
    }

    public void setPaymentCallbackRestUrl(String paymentCallbackRestUrl) {
        this.paymentCallbackRestUrl = paymentCallbackRestUrl;
    }

    public String getCustom() {
        return custom;
    }

    public void setCustom(String custom) {
        this.custom = custom;
    }

    public String getPayCode() {
        return payCode;
    }

    public void setPayCode(String payCode) {
        this.payCode = payCode;
    }

    public String getPayBody() {
        return payBody;
    }

    public void setPayBody(String payBody) {
        this.payBody = payBody;
    }

    public String getPayCodeWithTerminal() {
        return payCodeWithTerminal;
    }

    public void setPayCodeWithTerminal(String payCodeWithTerminal) {
        this.payCodeWithTerminal = payCodeWithTerminal;
    }

    public String getPaymentNo() {
        return paymentNo;
    }

    public void setPaymentNo(String paymentNo) {
        this.paymentNo = paymentNo;
    }

    public Integer getRefundedAmount() {
        return refundedAmount;
    }

    public void setRefundedAmount(Integer refundedAmount) {
        this.refundedAmount = refundedAmount;
    }

    public LocalDateTime getPayTime() {
        return payTime;
    }

    public void setPayTime(LocalDateTime payTime) {
        this.payTime = payTime;
    }

    public Integer getFillAccount() {
        return fillAccount;
    }

    public void setFillAccount(Integer fillAccount) {
        this.fillAccount = fillAccount;
    }

    public LocalDateTime getFillTime() {
        return fillTime;
    }

    public void setFillTime(LocalDateTime fillTime) {
        this.fillTime = fillTime;
    }

    public String getFillOpBy() {
        return fillOpBy;
    }

    public void setFillOpBy(String fillOpBy) {
        this.fillOpBy = fillOpBy;
    }

}