package org.dromara.payment.operator.domain.bo;

import org.dromara.payment.operator.domain.BusOperatorFlows;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * 运营商流水业务对象 bus_operator_flows
 *
 * @author LionLi
 * @date 2024-03-28
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = BusOperatorFlows.class, reverseConvertGenerate = false)
public class BusOperatorFlowsBo extends BaseEntity {

    /**
     * 主键
     */
    @NotNull(message = "主键不能为空", groups = { EditGroup.class })
    private Long id;

    /**
     * 运营商id
     */
    @NotNull(message = "运营商id不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long opId;

    /**
     * 业务类型（1:转账到个人、2:充值 3:转账到平台 4:转账到运营商 5:转账到服务商 6:服务商资金冻结 7:服务商资金解冻 8:运营商资金冻结 9:运营商资金解冻 10:代理商资金冻结 11:代理商资金解冻 12:转账到代理商余额）
     */
    @NotNull(message = "业务类型（1:转账到个人、2:充值 3:转账到平台 4:转账到运营商 5:转账到服务商 6:服务商资金冻结 7:服务商资金解冻 8:运营商资金冻结 9:运营商资金解冻 10:代理商资金冻结 11:代理商资金解冻 12:转账到代理商余额）不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer busType;

    /**
     * 支付通道（招行，交行，手动）
     */
    @NotBlank(message = "支付通道（招行，交行，手动）不能为空", groups = { AddGroup.class, EditGroup.class })
    private String channel;

    /**
     * 业务流水号(系统内部编号)
     */
    @NotBlank(message = "业务流水号(系统内部编号)不能为空", groups = { AddGroup.class, EditGroup.class })
    private String busNo;

    /**
     * 三方流水号(银行流水号)
     */
    @NotBlank(message = "三方流水号(银行流水号)不能为空", groups = { AddGroup.class, EditGroup.class })
    private String bankNo;

    /**
     * 交易金额(分)
     */
    @NotNull(message = "交易金额(分)不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long money;

    /**
     * 余额(分)
     */
    @NotNull(message = "余额(分)不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long balance;

    /**
     * 交易时间
     */
    @NotNull(message = "交易时间不能为空", groups = { AddGroup.class, EditGroup.class })
    private Date addTime;

    /**
     * 交易人
     */
    @NotBlank(message = "交易人不能为空", groups = { AddGroup.class, EditGroup.class })
    private String addBy;

    /**
     * 业务描述
     */
    @NotBlank(message = "业务描述不能为空", groups = { AddGroup.class, EditGroup.class })
    private String busDesc;

    /**
     * 账单批次号
     */
    @NotBlank(message = "账单批次号不能为空", groups = { AddGroup.class, EditGroup.class })
    private String billNo;

    /**
     * 账单id
     */
    @NotNull(message = "账单id不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long billId;

    /**
     * 账单明细id
     */
    @NotNull(message = "账单明细id不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long billDetailId;

    /**
     * 交易订单号
     */
    @NotBlank(message = "交易订单号不能为空", groups = { AddGroup.class, EditGroup.class })
    private String tranNo;

    /**
     * 交易类型（1:转账 2:代发 3:提现 4:退回 5:冻结 6:解冻 7:充值）
     */
    @NotNull(message = "交易类型（1:转账 2:代发 3:提现 4:退回 5:冻结 6:解冻 7:充值）不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer tranType;

    /**
     * 交易状态（2:成功 3:失败）
     */
    @NotNull(message = "交易状态（2:成功 3:失败）不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer tranStatus;

    /**
     * 付款方（5：平台 6：服务商 7：运营商 8：代理商 9：商户 10：自雇者）
     */
    @NotNull(message = "付款方（5：平台 6：服务商 7：运营商 8：代理商 9：商户 10：自雇者）不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer payerType;

    /**
     * 付款方id
     */
    @NotNull(message = "付款方id不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long payerId;

    /**
     * 付款方名称
     */
    @NotBlank(message = "付款方名称不能为空", groups = { AddGroup.class, EditGroup.class })
    private String payerName;

    /**
     * 付款方账号
     */
    @NotBlank(message = "付款方账号不能为空", groups = { AddGroup.class, EditGroup.class })
    private String payerAcc;

    /**
     * 付款方账号id
     */
    @NotNull(message = "付款方账号id不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long payerAccId;

    /**
     * 收款方（5：平台 6：服务商 7：运营商 8：代理商 9：商户 10：自雇者）
     */
    @NotNull(message = "收款方（5：平台 6：服务商 7：运营商 8：代理商 9：商户 10：自雇者）不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer payeeType;

    /**
     * 收款方id
     */
    @NotNull(message = "收款方id不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long payeeId;

    /**
     * 收款方名称
     */
    @NotBlank(message = "收款方名称不能为空", groups = { AddGroup.class, EditGroup.class })
    private String payeeName;

    /**
     * 收款方账号
     */
    @NotBlank(message = "收款方账号不能为空", groups = { AddGroup.class, EditGroup.class })
    private String payeeAcc;

    /**
     * 收款方账号id
     */
    @NotNull(message = "收款方账号id不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long payeeAccId;

    /**
     * 备注
     */
    @NotBlank(message = "备注不能为空", groups = { AddGroup.class, EditGroup.class })
    private String remark;

    /**
     * 回执单地址
     */
    @NotBlank(message = "回执单地址不能为空", groups = { AddGroup.class, EditGroup.class })
    private String payReceipt;

    /**
     * 回执单类型（1:B2B  2:B2C）
     */
    @NotNull(message = "回执单类型（1:B2B  2:B2C）不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer payReceiptType;


}
