package com.gxwebsoft.common.system.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.time.LocalDateTime;
import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * 用户推荐关系表
 *
 * @author 科技小王子
 * @since 2023-10-07 22:56:36
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Schema(name = "UserReferee对象", description = "用户推荐关系表")
@TableName("gxwebsoft_core.sys_user_referee")
public class UserReferee implements Serializable {
    private static final long serialVersionUID = 1L;

    @Schema(description = "主键ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @Schema(description = "推荐人ID")
    private Integer dealerId;

    @Schema(description = "用户id(被推荐人)")
    private Integer userId;

    @Schema(description = "推荐关系层级(1,2,3)")
    private Integer level;

    @Schema(description = "备注")
    private String comments;

    @Schema(description = "是否删除, 0否, 1是")
    @TableLogic
    private Integer deleted;

    @Schema(description = "租户id")
    private Integer tenantId;

    @Schema(description = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    @Schema(description = "修改时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;

    @TableField(exist = false)
    private User user;
}
