package org.dromara.payment.channel.domain;

import org.dromara.common.mybatis.core.domain.BaseEntity;
import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;

import java.io.Serial;

/**
 * 代理商流水对象 bus_channel_flows
 *
 * @author LionLi
 * @date 2024-04-10
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("bus_channel_flows")
public class BusChannelFlows extends BaseEntity {

    @Serial
    private static final long serialVersionUID = 1L;

    public BusChannelFlows(){}

    public BusChannelFlows(Integer direction,Long channelId, Integer busType, String busNo, Long money, Date addTime, String addBy, String busDesc, String billNo, Long billId, Long billDetailId, Integer tranType, Integer payerType, Long payerId, String payerName, String payerAcc, Long payerAccId, Integer payeeType, Long payeeId, String payeeName, String payeeAcc, Long payeeAccId, String remark) {
        this.channelId = channelId;
        this.busType = busType;
        this.busNo = busNo;
        this.money = money;
        this.direction = direction;
        this.addTime = addTime;
        this.addBy = addBy;
        this.busDesc = busDesc;
        this.billNo = billNo;
        this.billId = billId;
        this.billDetailId = billDetailId;
        this.tranType = tranType;
        this.payerType = payerType;
        this.payerId = payerId;
        this.payerName = payerName;
        this.payerAcc = payerAcc;
        this.payerAccId = payerAccId;
        this.payeeType = payeeType;
        this.payeeId = payeeId;
        this.payeeName = payeeName;
        this.payeeAcc = payeeAcc;
        this.payeeAccId = payeeAccId;
        this.remark = remark;
    }

    /**
     * 主键
     */
    @TableId(value = "id")
    private Long id;

    /**
     * 代理商id
     */
    private Long channelId;

    /**
     * 业务类型（1:转账到个人、2:充值 3:转账到平台 4:转账到运营商 5:转账到服务商 6:服务商资金冻结 7:服务商资金解冻 8:运营商资金冻结 9:运营商资金解冻 10:代理商资金冻结 11:代理商资金解冻 12:转账到代理商余额）
     */
    private Integer busType;

    /**
     * 流水方向（1:收入 2:支出）
     */
    private transient Integer direction;

    /**
     * 业务流水号(系统内部编号)
     */
    private String busNo;

    /**
     * 交易金额(分)
     */
    private Long money;

    /**
     * 余额(分)
     */
    private Long balance;

    /**
     * 交易时间
     */
    private Date addTime;

    /**
     * 交易人
     */
    private String addBy;

    /**
     * 业务描述
     */
    private String busDesc;

    /**
     * 账单批次号
     */
    private String billNo;

    /**
     * 账单id
     */
    private Long billId;

    /**
     * 账单明细id
     */
    private Long billDetailId;

    /**
     * 交易类型（1:转账 2:代发 3:提现 4:退回 5:冻结 6:解冻 7:充值）
     */
    private Integer tranType;

    /**
     * 付款方（5：平台 6：服务商 7：运营商 8：代理商 9：商户 10：自雇者）
     */
    private Integer payerType;

    /**
     * 付款方id
     */
    private Long payerId;

    /**
     * 付款方名称
     */
    private String payerName;

    /**
     * 付款方账号
     */
    private String payerAcc;

    /**
     * 付款方账号id
     */
    private Long payerAccId;

    /**
     * 收款方（5：平台 6：服务商 7：运营商 8：代理商 9：商户 10：自雇者）
     */
    private Integer payeeType;

    /**
     * 收款方id
     */
    private Long payeeId;

    /**
     * 收款方名称
     */
    private String payeeName;

    /**
     * 收款方账号
     */
    private String payeeAcc;

    /**
     * 收款方账号id
     */
    private Long payeeAccId;

    /**
     * 备注
     */
    private String remark;


}
