package com.emotion.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.emotion.common.BaseEntity;
import lombok.experimental.SuperBuilder;
import lombok.NoArgsConstructor;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;

/**
 * 访客用户实体类
 * 
 * @author huazhongmin
 * @date 2025-07-23
 */
@Data
@EqualsAndHashCode(callSuper = true)
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
@TableName("t_guest_user")
public class GuestUser extends BaseEntity {

    /**
     * 访客用户ID (格式: guest_xxx)
     */
    @TableField("guest_user_id")
    private String guestUserId;

    /**
     * 客户端IP地址 (支持IPv6)
     */
    @TableField("ip_address")
    private String ipAddress;

    /**
     * 用户代理信息
     */
    @TableField("user_agent")
    private String userAgent;

    /**
     * 访客昵称
     */
    @TableField("nickname")
    private String nickname;

    /**
     * 访客头像
     */
    @TableField("avatar")
    private String avatar;

    /**
     * 最后活跃时间
     */
    @TableField("last_active_time")
    private LocalDateTime lastActiveTime;

    /**
     * 会话数量
     */
    @TableField("conversation_count")
    private Integer conversationCount;

    /**
     * 消息数量
     */
    @TableField("message_count")
    private Integer messageCount;

    /**
     * IP地址的地理位置信息
     */
    @TableField("location")
    private String location;

    /**
     * 设备信息
     */
    @TableField("device_info")
    private String deviceInfo;
}
