package cn.pluss.platform.entity;

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 2022-05-31
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("tb_pluss_user_extra")
public class UserExtra implements Serializable {

    private static final long serialVersionUID = 1L;

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


    /**
     * 用户id
     */
    @TableField("`userId`")
    private Long userId;


    /**
     * 状态key
     */
    @TableField("`key`")
    private String key;


    /**
     * 状态值
     */
    @TableField("`value`")
    private String value;


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

    /**
     * 创建时间 开始时间
     */
    @TableField(exist = false, condition = "createTime &gt; #{%s}")
    private Date createTimeStart;

    /**
     * 创建时间 截止时间
     */
    @TableField(exist = false, condition = "createTime &lt; #{%s}")
    private Date createTimeEnd;

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

    /**
     * 更新时间 开始时间
     */
    @TableField(exist = false, condition = "updateTime &gt; #{%s}")
    private Date updateTimeStart;

    /**
     * 更新时间 截止时间
     */
    @TableField(exist = false, condition = "updateTime &lt; #{%s}")
    private Date updateTimeEnd;

}