package cn.pluss.platform.entity;

import cn.pluss.platform.config.mybatis.SqlConditionExtra;
import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

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

/**
 * <p>
 * 商户费率表(新)
 * </p>
 *
 * @author Djh
 * @since 2021-08-09
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("tb_pluss_merchant_rate_new_record")
public class MerchantRateNewRecord implements Serializable {

    /**
     * 审核中
     */
    public static final String STATUS_IN_REVIEW = "0";

    /**
     * 修改成功，已生效
     */
    public static final String STATUS_SUCCESS = "1";

    /**
     * 修改失败
     */
    public static final String STATUS_FAIL = "2";

    /**
     * 修改成功，待生效
     */
    public static final String STATUS_SUCCESS_NOT_EFFECT = "3";

    private static final long serialVersionUID = 1L;

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


    /**
     * 通道id
     */
    @TableField("channel")
    private Integer channel;


    /**
     * 用户id
     */
    @TableField("merchantId")
    private String merchantId;


    /**
     * 微信费率等级，费率参考字典表wx_rate
     */
    @TableField("wxRate")
    private Integer wxRate;


    /**
     * 支付宝费率等级，费率参考字典表ali_rate
     */
    @TableField("aliRate")
    private Integer aliRate;


    /**
     * 银联费率等级，费率参考字典表bank_rate
     */
    @TableField("bankRate")
    private Integer bankRate;


    /**
     * 银联1000+费率等级，费率参考字典表bank_rate_1000+, 目前随行付不支持1000+的支付
     */
    @TableField("bankRateLarge")
    private Integer bankRateLarge;

    /**
     * 存一些备注信息
     */
    private String remark;

    /**
     * 费率变更状态, 0, 审核中；1、已修改成功；2、修改失败；3、修改成功，未生效
     */
    @TableField("status")
    private String status;

    /**
     * 创建时间
     */
    @TableField(value = "createTime", fill = FieldFill.INSERT)
    private Date createTime;

    /**
     * 创建时间 开始时间
     */
    @TableField(select = false, value = "createTime", condition = SqlConditionExtra.GT)
    private Date createTimeStart;

    /**
     * 创建时间 截止时间
     */
    @TableField(select = false, value = "createTime", condition = SqlConditionExtra.LT)
    private Date createTimeEnd;

    /**
     * 更新时间
     */
    @TableField(value = "updateTime", fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    /**
     * 更新时间 开始时间
     */
    @TableField(select = false, value = "updateTime", condition = SqlConditionExtra.GT)
    private Date updateTimeStart;

    /**
     * 更新时间 截止时间
     */
    @TableField(select = false, value = "updateTime", condition = SqlConditionExtra.LT)
    private Date updateTimeEnd;

}