package com.fzm.mall.server.admin.order.model;

import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 支付订单结果表
 * </p>
 *
 * @author wulixian
 * @since 2021-04-29
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("order_pay")
@ApiModel(value="Pay对象", description="支付订单结果表")
public class Pay implements Serializable {

    private static final long serialVersionUID = 1L;

    public static final Integer PAY_STATE_TO_PAY = 6;

    public static final Integer PAY_TYPE_PLAT = 0;

    public static final Integer PAY_TYPE_WX = 2;

    @ApiModelProperty(value = "主键自增编号")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "支付子编号")
    private String payId;

    @ApiModelProperty(value = "用户编号")
    private String uid;

    @ApiModelProperty(value = "支付状态，1->成功，2->失败，3->支付中,4->待付首款，5->代付尾款\r\n\r\n支付状态，6->待付款，7->首款已付款，8->尾款待付款 ,9->已完成，10->支付失败")
    private Integer state;

    @ApiModelProperty(value = "总价")
    private BigDecimal total;

    @ApiModelProperty(value = "已支付金额")
    private BigDecimal paidAmount;

    @ApiModelProperty(value = "待支付金额")
    private BigDecimal unpaidAmount;

    @ApiModelProperty(value = "支付方式， 1->支付宝，2->微信 , 3->ccny 0：积分")
    private Integer payType;

    @ApiModelProperty(value = "订单号")
    private String oidsJson;

    @ApiModelProperty(value = "失败原因")
    private String error;

    @ApiModelProperty(value = "支付系统流水号")
    private String outBizNo;

    @ApiModelProperty(value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private Long createTime;

    @ApiModelProperty(value = "更改时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Long updateTime;

    @ApiModelProperty(value = "支付时间")
    private Long payTime;


}
