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>
 * 用户操作IP记录表
 * </p>
 *
 * @author Djh
 * @since 2021-09-13
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("tb_pluss_user_ip_record")
public class UserIpRecord implements Serializable {

    private static final long serialVersionUID = 1L;

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


    /**
     * 用户ID
     */
    @TableField("userId")
    private Integer userId;


    /**
     * 注册IP
     */
    @TableField("regIp")
    private String regIp;


    /**
     * 注册时间
     */
    @TableField("regTime")
    private Date regTime;

    /**
     * 注册时间 开始时间
     */
    @TableField(exist = false, condition = "regTime &gt; #{%s}")
    private Date regTimeStart;

    /**
     * 注册时间 截止时间
     */
    @TableField(exist = false, condition = "regTime &lt; #{%s}")
    private Date regTimeEnd;

    /**
     * 发起进件的IP
     */
    @TableField("auditIp")
    private String auditIp;


    /**
     * 发起进件的时间
     */
    @TableField("auditTime")
    private Date auditTime;

    /**
     * 发起进件的时间 开始时间
     */
    @TableField(exist = false, condition = "auditTime &gt; #{%s}")
    private Date auditTimeStart;

    /**
     * 发起进件的时间 截止时间
     */
    @TableField(exist = false, condition = "auditTime &lt; #{%s}")
    private Date auditTimeEnd;

    /**
     * 创建时间
     */
    @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;

}