package com.jeequan.jeepay.db.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.jeequan.jeepay.core.model.BaseModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * 代付数据统计
 *
 * @author [mybatis plus generator]
 * @since 2024-05-22
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_stats_transfer")
public class StatsTransferEntity extends BaseModel implements Serializable {

    private static final long serialVersionUID=1L;

    /**
     * ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 统计日期
     */
    @JSONField(format = "yyyy-MM-dd")
    private Date statsDate;

    /**
     * 转账发起方ID
     */
    private String subjectId;

    /**
     * 通道编码
     */
    private String ifCode;

    /**
     * 商户号
     */
    private String mchNo;

    /**
     * 服务商号
     */
    private String agentNo;

    /**
     * 渠道号
     */
    private String isvNo;

    /**
     * 订单总笔数
     */
    private Long totalCount;

    /**
     * 订单总金额，单位分
     */
    private Long totalAmount;

    private Long wxTotalCount;

    private Long zfbTotalCount;

    private Long bankTotalCount;

    private Long wxTotalAmount;

    private Long zfbTotalAmount;

    private Long bankTotalAmount;

    /**
     * 充值订单总笔数
     */
    private Long totalChargeCount;

    /**
     * 充值订单总金额
     */
    private Long totalChargeAmount;

    /**
     * 商户手续费，单位分
     */
    private Long fee;

    /**
     * 实收金额，单位分
     */
    private Long realAmount;

    /**
     * 代理商佣金，单位分
     */
    private Long agentProfit;

    /**
     * 状态，1-完成  0-异常
     */
    private Byte state;

    /**
     * 创建时间
     */
    private Date createdAt;

    /**
     * 更新时间
     */
    private Date updatedAt;

    @TableField(exist = false)
    private String ifCodeName;
    @TableField(exist = false)
    private String mchName;
    @TableField(exist = false)
    private String agentName;
    @TableField(exist = false)
    private String isvName;
    @TableField(exist = false)
    private String subjectName;
    @TableField(exist = false)
    private String transChannelMchNo;
}
