package com.jeequan.jeepay.db.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.jeequan.jeepay.core.model.BaseModel;
import com.jeequan.jeepay.core.validate.Add;
import com.jeequan.jeepay.core.validate.Update;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotEmpty;
import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 支付接口配置参数表
 * </p>
 *
 * @author [mybatis plus generator]
 * @since 2024-04-25
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_transfer_interface_config")
public class TransferInterfaceConfigEntity extends BaseModel implements Serializable {

    private static final long serialVersionUID=1L;

    public static LambdaQueryWrapper<TransferInterfaceConfigEntity> gw(){
        return new LambdaQueryWrapper<>();
    }

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


    private String isvNo;

    /**
     * 账号类型: 参考： SYS_ROLE_TYPE
     */
    @NotEmpty(groups = {Add.class, Update.class}, message = "账号类型不能为空")
    private String infoType;

    /**
     * 渠道商/服务商/用户号
     */
    @NotEmpty(groups = {Add.class, Update.class}, message = "渠道商/服务商/用户号不能为空")
    private String infoId;

    /**
     * 关联的支付接口代码
     */
    private String payIfCode;

    /**
     * 支付接口实例ID, 对应t_pay_interface_define表的id
     */
    private Integer payConfigId;

    /**
     * 转账接口代码
     */
    private String transIfCode;

    /**
     * 接口配置参数,json字符串
     */
    @NotEmpty(groups = {Add.class, Update.class}, message = "接口配置参数不能为空")
    private String transIfParams;

    /**
     * 状态: 0-停用, 1-启用
     */
    private Byte state;

    /**
     * 佣金结算周期（仅服务商配置， 用于代理商的佣金提现周期）
     */
    private Integer settHoldDay;

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

    /**
     * 创建时间
     */
    private Date createTime;
    /**
     * 更新时间
     */
    private Date updateTime;
}
