package com.bohuikeji.delivery.backstage.entity;

import com.bohuikeji.frame.module.admin.annotation.TableQueryField;
import com.bohuikeji.frame.module.admin.base.EntityBase;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableField;
import com.bohuikeji.frame.module.admin.annotation.TableShowField;
import com.bohuikeji.frame.module.admin.annotation.TableNewField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 退款记录表
 * </p>
 *
 * @author 10552
 * @since 2019-12-27
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@ApiModel(value="TRefund对象", description="退款记录表")
public class TRefund extends EntityBase<TRefund> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "自增id")
    @TableId(value = "refund_id", type = IdType.AUTO)
    @TableShowField(value = "ID",id = true)
    private Integer refundId;

    @ApiModelProperty(value = "退款单号")
    @TableField("refund_num")
    @TableShowField("退款单号")
    @TableNewField(edit = false)
    @TableQueryField(show = false)
    private String refundNum;

    @ApiModelProperty(value = "支付id")
    @TableField("pay_id")
    @TableShowField(value = "支付id",show = false)
    private Integer payId;

    @ApiModelProperty(value = "支付单号号")
    @TableField("pay_num")
    @TableShowField("支付单号号")
    @TableNewField(edit = false)
    @TableQueryField(show = false)
    private String payNum;

    @ApiModelProperty(value = "订单id")
    @TableField("order_id")
    @TableShowField(value = "订单id",show = false)
    private Integer orderId;

    @ApiModelProperty(value = "订单号")
    @TableField("order_num")
    @TableShowField("订单号")
    @TableNewField(edit = false)
    @TableQueryField(show = false)
    private String orderNum;

    @ApiModelProperty(value = "实际退款金额")
    @TableField("refund_price")
    @TableShowField("实际退款金额(￥)")
    @TableNewField(edit = false)
    private BigDecimal refundPrice=new BigDecimal("0.00").setScale(2, BigDecimal.ROUND_DOWN);;

    @ApiModelProperty(value = "实际支付金额")
    @TableField("order_pay_price")
    @TableShowField("实际支付金额(￥)")
    @TableNewField(edit = false)
    private BigDecimal orderPayPrice=new BigDecimal("0.00").setScale(2, BigDecimal.ROUND_DOWN);;

    @ApiModelProperty(value = "取消时扣除金额")
    @TableField("no_load_price")
    @TableShowField("取消时扣除金额(￥)")
    @TableNewField(edit = false)
    private BigDecimal noLoadPrice=new BigDecimal("0.00").setScale(2, BigDecimal.ROUND_DOWN);;

    @ApiModelProperty(value = "退款方式(全额退款,部分退款)")
    @TableField("refund_way")
    @TableShowField("退款方式")
    @TableNewField(edit = false)
    @TableQueryField()
    private String refundWay;

    @ApiModelProperty(value = "退款模块(订单退款,入驻退款)")
    @TableField("refund_model")
    @TableShowField("退款模块")
    @TableNewField(edit = false)
    @TableQueryField()
    private String refundModel;

    @ApiModelProperty(value = "退款状态(退款中,退款成功,取消退款,退款失败)")
    @TableField("refund_status")
    @TableShowField("退款状态")
    @TableQueryField()
    @TableNewField(edit = false)
    private String refundStatus;

    @ApiModelProperty(value = "退款渠道")
    @TableField("refund_channel")
    @TableShowField(value = "退款渠道",show = false)
    @TableNewField(edit = false)
    @TableQueryField()
    private String refundChannel;

    @ApiModelProperty(value = "退款渠道商单号")
    @TableField("refund_channel_num")
    @TableShowField(value = "退款渠道商单号",show = false)
    @TableNewField(edit = false)
    private String refundChannelNum;

    @ApiModelProperty(value = "退款发起时间")
    @TableField("create_time")
    @TableShowField(value = "退款发起时间",show = false)
    @TableNewField(edit = false)
    @TableQueryField(sort = 0)
    private LocalDateTime createTime;

    @ApiModelProperty(value = "退款完成时间")
    @TableField("refund_time")
    @TableShowField("退款完成时间")
    @TableNewField(edit = false)
    private LocalDateTime refundTime;


}
