package com.jeequan.jeepay.core.entity;

import com.jeequan.jeepay.core.model.BaseModel;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import lombok.experimental.SuperBuilder;

import java.util.Date;

/**
 * <p>
 * 特约商户进件信息表
 * </p>
 *
 * @author [mybatis plus generator]
 * @since 2023-12-05
 */
@Data
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
public class MchModifyApplyment extends BaseModel {

    private static final long serialVersionUID = 1L;

    public static final byte MODIFY_TYPE_BASE = 1;
    public static final byte MODIFY_TYPE_SETTLEMENT = 2;
    public static final byte MODIFY_TYPE_RATE = 3;

    public static final byte MODIFY_TYPE_SUPPLEMENTS = 4;
    public static final byte MODIFY_TYPE_COMMON = 5;

    public static final byte MODIFY_TYPE_SETTLEMENT_TYPE = 6;

    /**
     * 退货账户类型变更
     */
    public static final byte MODIFY_TYPE_REFUND_ACCOUNT_TYPE = 7;


    /**
     * 商户变更系统申请单号
     */
    private String modifyApplyId;

    /**
     * 系统申请单号/进件商户号
     */
    private String applyId;

    /**
     * 渠道申请单号
     */
    private String channelApplyNo;

    /**
     * 通道商户号，收单机构编号
     */
    private String channelMchNo;

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

    /**
     * 支付接口代码, 字段冗余
     */
    private String ifCode;

    /**
     * 接口名称, 字段冗余方便检索
     */
    private String ifName;

    /**
     * 商户本次变更前的数据（JSON类型）
     */
    private String originDetailInfo;

    /**
     * 商户变更详细信息（JSON类型）
     */
    private String applyDetailInfo;

    /**
     * 上游接口返回参数
     */
    private String channelVar1;


    /**
     * 1、基本资料变更; 2、结算信息变更; 3、费率信息变更; 4、身份信息补充; 5、通用变更(待定) 7:退货类型变更
     */
    private Byte modifyApplyType;

    /**
     * 1: 本地变更； 2: 变更并同步到上游通道；该字段有值则说明该条数据是运营端或者服务商端代变更的数据
     */
    private String otherOperationType;

    public static final String OPERATION_TYPE_LOCAL = "1";

    public static final String OPERATION_TYPE_SYNC = "2";

    private Byte state;

    private String remark;

    private String remainStep;

    private String applyErrorInfo;

    private String applyPageType;

    private Long createdUid;

    private String createdBy;

    private Date createdAt;

    private Date updatedAt;
}
