package com.ywt.domain.entity.glasses;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;

/**
 * 商品订单表
 */
@Table(name = "goods_orders")
@Entity
public class GoodsOrders implements Serializable {
    private static final long serialVersionUID = 1L;

    @Id
    @Column(name = "id", insertable = false, nullable = false)
    private Integer id;


    /**
     * 店铺 id，shop 表主键
     */
    @Column(name = "shop_id", nullable = false)
    private Integer shopId;

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

    /**
     * 镜片参数
     */
    @Column(name = "glasses_param")
    private String glassesParam = "";

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

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

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

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

    /**
     * 年龄
     */
    @Column(name = "age", nullable = false)
    private Integer age;

    /**
     * 性别，1-男，2-女，0-未知
     */
    @Column(name = "sex", nullable = false)
    private Integer sex = 0;

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

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

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

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

    /**
     * 支付方式：1-微信，2-支付宝，3-现金，4-诊疗卡，5-pos机，6-无须支付，7-医保，8-...
     */
    @Column(name = "payment_channel")
    private Integer paymentChannel;

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

    /**
     * 退款状态： 0：处理中，1: 退款成功，2: 退款异常，3: 退款关闭
     */
    @Column(name = "refund_status")
    private Integer refundStatus;

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

    /**
     * 支付金额，单位：分
     */
    @Column(name = "pay_amount")
    private Integer payAmount;

    /**
     * 订单状态：0-待支付；1-已支付；2-已退款
     */
    @Column(name = "status", nullable = false)
    private Integer status;

    /**
     * 取货方式：0-自取，1邮寄
     */
    @Column(name = "get_channel")
    private Integer getChannel;

    /**
     * 邮寄地址id，对应 glasses_address 主键ID
     */
    @Column(name = "address_id", nullable = false)
    private Integer addressId = 0;

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

    /**
     * 是否删除
     */
    @Column(name = "deleted", nullable = false)
    private Integer deleted = 0;

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

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

    /**
     * 操作人，对应mg_admin表的account
     */
    @Column(name = "op_by")
    private String opBy;

    /**
     * 退款备注
     */
    @Column(name = "refund_remark")
    private String refundRemark;

    /**
     * 退款操作人，对应mg_admin表的account
     */
    @Column(name = "refund_op_by")
    private String refundOpBy;

    public Integer getId() {
        return id;
    }

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

    public Integer getShopId() {
        return shopId;
    }

    public void setShopId(Integer shopId) {
        this.shopId = shopId;
    }

    public Integer getHospitalId() {
        return hospitalId;
    }

    public void setHospitalId(Integer hospitalId) {
        this.hospitalId = hospitalId;
    }

    /**
     * 镜片参数
     */
    public String getGlassesParam() {
        return glassesParam;
    }

    /**
     * 镜片参数
     */
    public void setGlassesParam(String glassesParam) {
        this.glassesParam = glassesParam;
    }

    /**
     * 订单 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 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 Integer getAge() {
        return age;
    }

    /**
     * 年龄
     */
    public void setAge(Integer age) {
        this.age = age;
    }

    /**
     * 性别，1-男，2-女，0-未知
     */
    public Integer getSex() {
        return sex;
    }

    /**
     * 性别，1-男，2-女，0-未知
     */
    public void setSex(Integer sex) {
        this.sex = sex;
    }

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

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

    /**
     * 支付时间
     */
    public Date getPaymentTime() {
        return paymentTime;
    }

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

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

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

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

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

    /**
     * 支付方式：1-微信，2-支付宝，3-现金，4-诊疗卡，5-pos机，6-无须支付，7-医保，8-...
     */
    public Integer getPaymentChannel() {
        return paymentChannel;
    }

    /**
     * 支付方式：1-微信，2-支付宝，3-现金，4-诊疗卡，5-pos机，6-无须支付，7-医保，8-...
     */
    public void setPaymentChannel(Integer paymentChannel) {
        this.paymentChannel = paymentChannel;
    }

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

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

    /**
     * 退款状态： 0：处理中，1: 退款成功，2: 退款异常，3: 退款关闭
     */
    public Integer getRefundStatus() {
        return refundStatus;
    }

    /**
     * 退款状态： 0：处理中，1: 退款成功，2: 退款异常，3: 退款关闭
     */
    public void setRefundStatus(Integer refundStatus) {
        this.refundStatus = refundStatus;
    }

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

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

    /**
     * 支付金额，单位：分
     */
    public Integer getPayAmount() {
        return payAmount;
    }

    /**
     * 支付金额，单位：分
     */
    public void setPayAmount(Integer payAmount) {
        this.payAmount = payAmount;
    }

    /**
     * 订单状态：0-待支付；1-已支付；2-已退款
     */
    public Integer getStatus() {
        return status;
    }

    /**
     * 订单状态：0-待支付；1-已支付；2-已退款
     */
    public void setStatus(Integer status) {
        this.status = status;
    }

    /**
     * 取货方式：0-自取，1邮寄
     */
    public Integer getGetChannel() {
        return getChannel;
    }

    /**
     * 取货方式：0-自取，1邮寄
     */
    public void setGetChannel(Integer getChannel) {
        this.getChannel = getChannel;
    }

    /**
     * 邮寄地址id，对应 glasses_address 主键ID
     */
    public Integer getAddressId() {
        return addressId;
    }

    /**
     * 邮寄地址id，对应 glasses_address 主键ID
     */
    public void setAddressId(Integer addressId) {
        this.addressId = addressId;
    }

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

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

    /**
     * 是否删除
     */
    public Integer getDeleted() {
        return deleted;
    }

    /**
     * 是否删除
     */
    public void setDeleted(Integer deleted) {
        this.deleted = deleted;
    }

    /**
     * 创建时间
     */
    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;
    }

    /**
     * 操作人，对应mg_admin表的account
     */
    public String getOpBy() {
        return opBy;
    }

    /**
     * 操作人，对应mg_admin表的account
     */
    public void setOpBy(String opBy) {
        this.opBy = opBy;
    }

    /**
     * 退款备注
     */
    public String getRefundRemark() {
        return refundRemark;
    }

    /**
     * 退款备注
     */
    public void setRefundRemark(String refundRemark) {
        this.refundRemark = refundRemark;
    }

    /**
     * 退款操作人，对应mg_admin表的account
     */
    public String getRefundOpBy() {
        return refundOpBy;
    }

    /**
     * 退款操作人，对应mg_admin表的account
     */
    public void setRefundOpBy(String refundOpBy) {
        this.refundOpBy = refundOpBy;
    }

    public String toString() {
        return "GoodsOrders{id=" + id +
                ", glassesParam=" + glassesParam +
                ", orderId=" + orderId +
                ", orderNo=" + orderNo +
                ", userId=" + userId +
                ", patientName=" + patientName +
                ", age=" + age +
                ", sex=" + sex +
                ", mobile=" + mobile +
                ", paymentTime=" + paymentTime +
                ", paymentStatus=" + paymentStatus +
                ", paymentNo=" + paymentNo +
                ", paymentChannel=" + paymentChannel +
                ", refundTime=" + refundTime +
                ", refundStatus=" + refundStatus +
                ", refundNo=" + refundNo +
                ", payAmount=" + payAmount +
                ", status=" + status +
                ", getChannel=" + getChannel +
                ", addressId=" + addressId +
                ", remark=" + remark +
                ", deleted=" + deleted +
                ", createTime=" + createTime +
                ", updateTime=" + updateTime +
                ", opBy=" + opBy +
                ", refundRemark=" + refundRemark +
                ", refundOpBy=" + refundOpBy +
                "}";
    }
}