package cn.pluss.platform.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.util.Date;

/**
 * <p>
 * 商户订单统计表
 * </p>
 *
 * @author Djh
 * @since 2021-12-21
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("tb_pluss_merchant_order_statistics")
public class MerchantOrderStatistics implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;


    /**
     * 商户编号
     */
    @TableField("merchantCode")
    private String merchantCode;


    /**
     * 交易总金额
     */
    @TableField("totalFee")
    private BigDecimal totalFee;


    /**
     * 订单笔数
     */
    @TableField("count")
    private Integer count;


    /**
     * 退款总金额
     */
    @TableField("retFee")
    private BigDecimal retFee;


    /**
     * 退款总笔数
     */
    @TableField("retCount")
    private Integer retCount;


    /**
     * 开始日期
     */
    @TableField("startDate")
    private LocalDate startDate;


    /**
     * 截止时间
     */
    @TableField("endDate")
    private LocalDate endDate;


    /**
     * 创建时间
     */
    @TableField(value = "createTime", fill = FieldFill.INSERT)
    private Date createTime;

    /**
     * 创建时间 开始时间
     */
    @TableField(exist = false, condition = "createTime &gt; #{%s}")
    private Date createTimeStart;

    /**
     * 创建时间 截止时间
     */
    @TableField(exist = false, condition = "createTime &lt; #{%s}")
    private Date createTimeEnd;

}