package com.gxwebsoft.shop.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.baomidou.mybatisplus.annotation.TableLogic;
import java.io.Serializable;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 用户推荐关系表
 *
 * @author 科技小王子
 * @since 2025-08-11 23:51:41
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Schema(name = "ShopUserReferee对象", description = "用户推荐关系表")
public class ShopUserReferee 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 = "分销商名称")
    @TableField(exist = false)
    private String dealerName;

    @Schema(description = "分销商头像")
    @TableField(exist = false)
    private String dealerAvatar;

    @Schema(description = "分销商手机号")
    @TableField(exist = false)
    private String dealerPhone;

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

    @Schema(description = "昵称")
    @TableField(exist = false)
    private String nickname;

    @Schema(description = "头像")
    @TableField(exist = false)
    private String avatar;

    @Schema(description = "手机号")
    @TableField(exist = false)
    private String phone;

    @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;

}
