package com.sqx.modules.app.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

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

/**
 *
 * @TableName invite_achievement
 */
@TableName(value ="invite_achievement")
@Data
@EqualsAndHashCode
@ToString
public class InviteAchievement implements Serializable {
    /**
     *
     */
    @TableId(type = IdType.ID_WORKER)
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    /**
     * 邀请用户用户id -- 上级
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long userId;

    /**
     * 下级被邀请用户id 当前达标用户id
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long targetUserId;

    /**
     * 达标次数
     */
    private Integer count;

    /**
     * 是否首次达标
     */
    private Integer state;

    /**
     * 创建时间
     */
    private Date createTime;
    private Date updateTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;


}
