package com.ruoyi.business.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 订单对象 tb_order
 * 
 * @author xiatao
 * @date 2022-01-18
 */
public class TbOrder extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键 */
    private Long id;

    /** 用户编号 */
    @Excel(name = "用户编号")
    private Long userId;

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

    /** 订单状态(0：初始；1：待付款；2：已取消；3：已失败；4：已过期；5：已付款；6：已退款；7：已发货；8：已收货；9：完成；) */
    @Excel(name = "订单状态(0：初始；1：待付款；2：已取消；3：已失败；4：已过期；5：已付款；6：已退款；7：已发货；8：已收货；9：完成；)")
    private Integer orderState;

    /** 套餐类型(0信用分，1会员，2导出) */
    @Excel(name = "套餐类型(0信用分，1会员，2导出)")
    private Integer type;

    /** 子类型（0无意义，1月度，2季度，3年度，导出对应数量） */
    @Excel(name = "子类型", readConverterExp = "0=无意义，1月度，2季度，3年度，导出对应数量")
    private Integer subType;

    /** 支付渠道(WECHAT：微信；ALIPAY：支付宝；APPLE:苹果) */
    @Excel(name = "支付渠道(WECHAT：微信；ALIPAY：支付宝；APPLE:苹果)")
    private String payChannel;

    /** 会员到期时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "会员到期时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date vipExpireTime;

    /** 支付宝交易号（支付宝小程序用） */
    @Excel(name = "支付宝交易号", readConverterExp = "支=付宝小程序用")
    private String tradeNo;

    /** 商品编号（例如：会员id memberId）企业信用业务id为0 */
    @Excel(name = "商品编号", readConverterExp = "例=如：会员id,m=emberId")
    private Long goodsId;

    /** 商品描述 */
    @Excel(name = "商品描述")
    private String goodsDesc;

    /** 用户手机号码 */
    @Excel(name = "用户手机号码")
    private String userPhone;

    /** 订单失效时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "订单失效时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date exprireTime;

    /** 订单金额 */
    @Excel(name = "订单金额")
    private Integer amt;

    /** 订单原始金额 */
    @Excel(name = "订单原始金额")
    private Integer orignalAmt;

    /** 附加数据 */
    @Excel(name = "附加数据")
    private String attach;

    /** 应用ID */
    @Excel(name = "应用ID")
    private String appId;

    /** 商户编号 */
    @Excel(name = "商户编号")
    private String mchId;

    /** 设备号 */
    @Excel(name = "设备号")
    private String deviceInfo;

    /** 统一下单接口返回码，微信：SUCCESS/FAIL */
    @Excel(name = "统一下单接口返回码，微信：SUCCESS/FAIL")
    private String returnCode;

    /** 统一下单接口返回码信息 */
    @Excel(name = "统一下单接口返回码信息")
    private String returnMsg;

    /** 交易类型 */
    @Excel(name = "交易类型")
    private String tradeType;

    /** 微信返回的随机字符串 */
    @Excel(name = "微信返回的随机字符串")
    private String nonceStr;

    /** 预支付交易会话标识 */
    @Excel(name = "预支付交易会话标识")
    private String prepayId;

    /** 关联ID */
    @Excel(name = "关联ID")
    private String subsId;

    /** 查询条件（用于导出中） */
    @Excel(name = "查询条件", readConverterExp = "用=于导出中")
    private String queryParam;

    /** 导出excel地址 */
    @Excel(name = "导出excel地址")
    private String url;

    /** 公司名称 */
    @Excel(name = "公司名称")
    private String companyName;

    /** 解锁记录id */
    @Excel(name = "解锁记录id")
    private Long recordId;

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

    public Long getId() 
    {
        return id;
    }
    public void setUserId(Long userId) 
    {
        this.userId = userId;
    }

    public Long getUserId() 
    {
        return userId;
    }
    public void setOrderId(String orderId) 
    {
        this.orderId = orderId;
    }

    public String getOrderId() 
    {
        return orderId;
    }
    public void setOrderState(Integer orderState) 
    {
        this.orderState = orderState;
    }

    public Integer getOrderState() 
    {
        return orderState;
    }
    public void setType(Integer type) 
    {
        this.type = type;
    }

    public Integer getType() 
    {
        return type;
    }
    public void setSubType(Integer subType) 
    {
        this.subType = subType;
    }

    public Integer getSubType() 
    {
        return subType;
    }
    public void setPayChannel(String payChannel) 
    {
        this.payChannel = payChannel;
    }

    public String getPayChannel() 
    {
        return payChannel;
    }
    public void setVipExpireTime(Date vipExpireTime) 
    {
        this.vipExpireTime = vipExpireTime;
    }

    public Date getVipExpireTime() 
    {
        return vipExpireTime;
    }
    public void setTradeNo(String tradeNo) 
    {
        this.tradeNo = tradeNo;
    }

    public String getTradeNo() 
    {
        return tradeNo;
    }
    public void setGoodsId(Long goodsId) 
    {
        this.goodsId = goodsId;
    }

    public Long getGoodsId() 
    {
        return goodsId;
    }
    public void setGoodsDesc(String goodsDesc) 
    {
        this.goodsDesc = goodsDesc;
    }

    public String getGoodsDesc() 
    {
        return goodsDesc;
    }
    public void setUserPhone(String userPhone) 
    {
        this.userPhone = userPhone;
    }

    public String getUserPhone() 
    {
        return userPhone;
    }
    public void setExprireTime(Date exprireTime) 
    {
        this.exprireTime = exprireTime;
    }

    public Date getExprireTime() 
    {
        return exprireTime;
    }
    public void setAmt(Integer amt) 
    {
        this.amt = amt;
    }

    public Integer getAmt() 
    {
        return amt;
    }
    public void setOrignalAmt(Integer orignalAmt) 
    {
        this.orignalAmt = orignalAmt;
    }

    public Integer getOrignalAmt() 
    {
        return orignalAmt;
    }
    public void setAttach(String attach) 
    {
        this.attach = attach;
    }

    public String getAttach() 
    {
        return attach;
    }
    public void setAppId(String appId) 
    {
        this.appId = appId;
    }

    public String getAppId() 
    {
        return appId;
    }
    public void setMchId(String mchId) 
    {
        this.mchId = mchId;
    }

    public String getMchId() 
    {
        return mchId;
    }
    public void setDeviceInfo(String deviceInfo) 
    {
        this.deviceInfo = deviceInfo;
    }

    public String getDeviceInfo() 
    {
        return deviceInfo;
    }
    public void setReturnCode(String returnCode) 
    {
        this.returnCode = returnCode;
    }

    public String getReturnCode() 
    {
        return returnCode;
    }
    public void setReturnMsg(String returnMsg) 
    {
        this.returnMsg = returnMsg;
    }

    public String getReturnMsg() 
    {
        return returnMsg;
    }
    public void setTradeType(String tradeType) 
    {
        this.tradeType = tradeType;
    }

    public String getTradeType() 
    {
        return tradeType;
    }
    public void setNonceStr(String nonceStr) 
    {
        this.nonceStr = nonceStr;
    }

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

    public String getPrepayId() 
    {
        return prepayId;
    }
    public void setSubsId(String subsId) 
    {
        this.subsId = subsId;
    }

    public String getSubsId() 
    {
        return subsId;
    }
    public void setQueryParam(String queryParam) 
    {
        this.queryParam = queryParam;
    }

    public String getQueryParam() 
    {
        return queryParam;
    }
    public void setUrl(String url) 
    {
        this.url = url;
    }

    public String getUrl() 
    {
        return url;
    }
    public void setCompanyName(String companyName) 
    {
        this.companyName = companyName;
    }

    public String getCompanyName() 
    {
        return companyName;
    }
    public void setRecordId(Long recordId) 
    {
        this.recordId = recordId;
    }

    public Long getRecordId() 
    {
        return recordId;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("userId", getUserId())
            .append("orderId", getOrderId())
            .append("orderState", getOrderState())
            .append("type", getType())
            .append("subType", getSubType())
            .append("payChannel", getPayChannel())
            .append("vipExpireTime", getVipExpireTime())
            .append("tradeNo", getTradeNo())
            .append("goodsId", getGoodsId())
            .append("goodsDesc", getGoodsDesc())
            .append("userPhone", getUserPhone())
            .append("exprireTime", getExprireTime())
            .append("amt", getAmt())
            .append("orignalAmt", getOrignalAmt())
            .append("attach", getAttach())
            .append("appId", getAppId())
            .append("mchId", getMchId())
            .append("deviceInfo", getDeviceInfo())
            .append("returnCode", getReturnCode())
            .append("returnMsg", getReturnMsg())
            .append("tradeType", getTradeType())
            .append("nonceStr", getNonceStr())
            .append("prepayId", getPrepayId())
            .append("subsId", getSubsId())
            .append("queryParam", getQueryParam())
            .append("url", getUrl())
            .append("remark", getRemark())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .append("companyName", getCompanyName())
            .append("recordId", getRecordId())
            .toString();
    }
}
