refactor: 重命名 backend-single 目录为 server
This commit is contained in:
@@ -0,0 +1,93 @@
|
||||
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.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 成就实体类
|
||||
*
|
||||
* @author huazhongmin
|
||||
* @date 2025-07-23
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@TableName("t_achievement")
|
||||
public class Achievement extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 成就标题
|
||||
*/
|
||||
@TableField("title")
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
@TableField("description")
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 分类
|
||||
*/
|
||||
@TableField("category")
|
||||
private String category;
|
||||
|
||||
/**
|
||||
* 图标
|
||||
*/
|
||||
@TableField("icon")
|
||||
private String icon;
|
||||
|
||||
/**
|
||||
* 稀有度
|
||||
*/
|
||||
@TableField("rarity")
|
||||
private String rarity;
|
||||
|
||||
/**
|
||||
* 条件类型
|
||||
*/
|
||||
@TableField("condition_type")
|
||||
private String conditionType;
|
||||
|
||||
/**
|
||||
* 条件值
|
||||
*/
|
||||
@TableField("condition_value")
|
||||
private String conditionValue;
|
||||
|
||||
/**
|
||||
* 奖励
|
||||
*/
|
||||
@TableField("rewards")
|
||||
private String rewards;
|
||||
|
||||
/**
|
||||
* 解锁时间
|
||||
*/
|
||||
@TableField("unlocked_time")
|
||||
private LocalDateTime unlockedTime;
|
||||
|
||||
/**
|
||||
* 进度
|
||||
*/
|
||||
@TableField("progress")
|
||||
private BigDecimal progress;
|
||||
|
||||
/**
|
||||
* 是否隐藏
|
||||
*/
|
||||
@TableField("is_hidden")
|
||||
private Integer isHidden;
|
||||
}
|
||||
@@ -0,0 +1,110 @@
|
||||
package com.emotion.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.emotion.common.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 管理员用户实体类
|
||||
*
|
||||
* @author huazhongmin
|
||||
* @date 2025-10-27
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@TableName("t_admin")
|
||||
public class Admin extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 管理员账号
|
||||
*/
|
||||
@TableField("account")
|
||||
private String account;
|
||||
|
||||
/**
|
||||
* 密码(加密后)
|
||||
*/
|
||||
@TableField("password")
|
||||
private String password;
|
||||
|
||||
/**
|
||||
* 管理员姓名
|
||||
*/
|
||||
@TableField("username")
|
||||
private String username;
|
||||
|
||||
/**
|
||||
* 邮箱
|
||||
*/
|
||||
@TableField("email")
|
||||
private String email;
|
||||
|
||||
/**
|
||||
* 手机号
|
||||
*/
|
||||
@TableField("phone")
|
||||
private String phone;
|
||||
|
||||
/**
|
||||
* 头像URL
|
||||
*/
|
||||
@TableField("avatar")
|
||||
private String avatar;
|
||||
|
||||
/**
|
||||
* 角色: super_admin-超级管理员, admin-管理员, operator-运营
|
||||
*/
|
||||
@TableField("role")
|
||||
private String role;
|
||||
|
||||
/**
|
||||
* 权限列表
|
||||
*/
|
||||
@TableField("permissions")
|
||||
private String permissions;
|
||||
|
||||
/**
|
||||
* 状态: 0-禁用, 1-正常
|
||||
*/
|
||||
@TableField("status")
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 最后登录时间
|
||||
*/
|
||||
@TableField("last_login_time")
|
||||
private LocalDateTime lastLoginTime;
|
||||
|
||||
/**
|
||||
* 最后登录IP
|
||||
*/
|
||||
@TableField("last_login_ip")
|
||||
private String lastLoginIp;
|
||||
|
||||
/**
|
||||
* 登录次数
|
||||
*/
|
||||
@TableField("login_count")
|
||||
private Integer loginCount;
|
||||
|
||||
/**
|
||||
* 所属部门
|
||||
*/
|
||||
@TableField("department")
|
||||
private String department;
|
||||
|
||||
/**
|
||||
* 职位
|
||||
*/
|
||||
@TableField("position")
|
||||
private String position;
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.emotion.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.emotion.common.BaseEntity;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@TableName("t_ai_call_log")
|
||||
public class AiCallLog extends BaseEntity {
|
||||
|
||||
@TableField("scene_code")
|
||||
private String sceneCode;
|
||||
|
||||
@TableField("provider_code")
|
||||
private String providerCode;
|
||||
|
||||
@TableField("endpoint_code")
|
||||
private String endpointCode;
|
||||
|
||||
@TableField("user_id")
|
||||
private String userId;
|
||||
|
||||
@TableField("user_name")
|
||||
private String userName;
|
||||
|
||||
@TableField("request_id")
|
||||
private String requestId;
|
||||
|
||||
@TableField("status")
|
||||
private String status;
|
||||
|
||||
@TableField("input_text")
|
||||
private String inputText;
|
||||
|
||||
@TableField("output_text")
|
||||
private String outputText;
|
||||
|
||||
@TableField("error_code")
|
||||
private String errorCode;
|
||||
|
||||
@TableField("error_message")
|
||||
private String errorMessage;
|
||||
|
||||
@TableField("first_token_ms")
|
||||
private Long firstTokenMs;
|
||||
|
||||
@TableField("duration_ms")
|
||||
private Long durationMs;
|
||||
|
||||
@TableField("stream_chunks")
|
||||
private Integer streamChunks;
|
||||
}
|
||||
@@ -0,0 +1,273 @@
|
||||
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.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* AI配置实体类
|
||||
*
|
||||
* @author system
|
||||
* @date 2025-10-30
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@TableName("t_ai_config")
|
||||
public class AiConfig extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 配置名称
|
||||
*/
|
||||
@TableField("config_name")
|
||||
private String configName;
|
||||
|
||||
/**
|
||||
* 配置键值 (唯一标识)
|
||||
*/
|
||||
@TableField("config_key")
|
||||
private String configKey;
|
||||
|
||||
/**
|
||||
* 配置类型: coze-扣子, openai-OpenAI, claude-Claude, gemini-Gemini等
|
||||
*/
|
||||
@TableField("config_type")
|
||||
private String configType;
|
||||
|
||||
/**
|
||||
* 服务提供商: coze, openai, anthropic, google等
|
||||
*/
|
||||
@TableField("provider")
|
||||
private String provider;
|
||||
|
||||
/**
|
||||
* API完整URL(包含完整的接口路径,不需要再拼接任何后缀)
|
||||
* 例如:https://api.coze.cn/v3/chat
|
||||
*/
|
||||
@TableField("api_base_url")
|
||||
private String apiBaseUrl;
|
||||
|
||||
/**
|
||||
* API访问令牌 (加密存储)
|
||||
*/
|
||||
@TableField("api_token")
|
||||
private String apiToken;
|
||||
|
||||
/**
|
||||
* API版本
|
||||
*/
|
||||
@TableField("api_version")
|
||||
private String apiVersion;
|
||||
|
||||
/**
|
||||
* 客户端ID (OAuth认证)
|
||||
*/
|
||||
@TableField("client_id")
|
||||
private String clientId;
|
||||
|
||||
/**
|
||||
* 客户端密钥 (OAuth认证,加密存储)
|
||||
*/
|
||||
@TableField("client_secret")
|
||||
private String clientSecret;
|
||||
|
||||
/**
|
||||
* 授权类型: client_credentials, authorization_code, password等
|
||||
*/
|
||||
@TableField("grant_type")
|
||||
private String grantType;
|
||||
|
||||
/**
|
||||
* 模型名称
|
||||
*/
|
||||
@TableField("model_name")
|
||||
private String modelName;
|
||||
|
||||
/**
|
||||
* Bot ID (Coze专用)
|
||||
*/
|
||||
@TableField("bot_id")
|
||||
private String botId;
|
||||
|
||||
/**
|
||||
* Workflow ID (Coze专用)
|
||||
*/
|
||||
@TableField("workflow_id")
|
||||
private String workflowId;
|
||||
|
||||
/**
|
||||
* 超时时间(毫秒)
|
||||
*/
|
||||
@TableField("timeout_ms")
|
||||
private Integer timeoutMs;
|
||||
|
||||
/**
|
||||
* 重试次数
|
||||
*/
|
||||
@TableField("retry_count")
|
||||
private Integer retryCount;
|
||||
|
||||
/**
|
||||
* 重试延迟(毫秒)
|
||||
*/
|
||||
@TableField("retry_delay_ms")
|
||||
private Integer retryDelayMs;
|
||||
|
||||
/**
|
||||
* 最大Token数
|
||||
*/
|
||||
@TableField("max_tokens")
|
||||
private Integer maxTokens;
|
||||
|
||||
/**
|
||||
* 温度参数 (0.0-2.0)
|
||||
*/
|
||||
@TableField("temperature")
|
||||
private BigDecimal temperature;
|
||||
|
||||
/**
|
||||
* Top-p参数 (0.0-1.0)
|
||||
*/
|
||||
@TableField("top_p")
|
||||
private BigDecimal topP;
|
||||
|
||||
/**
|
||||
* 是否支持流式输出: 0-不支持, 1-支持
|
||||
*/
|
||||
@TableField("support_stream")
|
||||
private Integer supportStream;
|
||||
|
||||
/**
|
||||
* 是否支持函数调用: 0-不支持, 1-支持
|
||||
*/
|
||||
@TableField("support_function_call")
|
||||
private Integer supportFunctionCall;
|
||||
|
||||
/**
|
||||
* 是否支持视觉理解: 0-不支持, 1-支持
|
||||
*/
|
||||
@TableField("support_vision")
|
||||
private Integer supportVision;
|
||||
|
||||
/**
|
||||
* 是否支持文件上传: 0-不支持, 1-支持
|
||||
*/
|
||||
@TableField("support_file_upload")
|
||||
private Integer supportFileUpload;
|
||||
|
||||
/**
|
||||
* 使用场景: chat-聊天, summary-总结, emotion_analysis-情绪分析, content_generation-内容生成等
|
||||
*/
|
||||
@TableField("usage_scenario")
|
||||
private String usageScenario;
|
||||
|
||||
/**
|
||||
* 优先级 (数值越大优先级越高)
|
||||
*/
|
||||
@TableField("priority")
|
||||
private Integer priority;
|
||||
|
||||
/**
|
||||
* 输入Token价格(每1K)
|
||||
*/
|
||||
@TableField("input_price_per_1k")
|
||||
private BigDecimal inputPricePer1k;
|
||||
|
||||
/**
|
||||
* 输出Token价格(每1K)
|
||||
*/
|
||||
@TableField("output_price_per_1k")
|
||||
private BigDecimal outputPricePer1k;
|
||||
|
||||
/**
|
||||
* 货币单位
|
||||
*/
|
||||
@TableField("currency")
|
||||
private String currency;
|
||||
|
||||
/**
|
||||
* 每分钟请求限制
|
||||
*/
|
||||
@TableField("rate_limit_per_minute")
|
||||
private Integer rateLimitPerMinute;
|
||||
|
||||
/**
|
||||
* 每小时请求限制
|
||||
*/
|
||||
@TableField("rate_limit_per_hour")
|
||||
private Integer rateLimitPerHour;
|
||||
|
||||
/**
|
||||
* 每日请求限制
|
||||
*/
|
||||
@TableField("rate_limit_per_day")
|
||||
private Integer rateLimitPerDay;
|
||||
|
||||
/**
|
||||
* 是否启用: 0-禁用, 1-启用
|
||||
*/
|
||||
@TableField("is_enabled")
|
||||
private Integer isEnabled;
|
||||
|
||||
/**
|
||||
* 是否为默认配置: 0-否, 1-是
|
||||
*/
|
||||
@TableField("is_default")
|
||||
private Integer isDefault;
|
||||
|
||||
/**
|
||||
* 环境: development-开发, testing-测试, production-生产
|
||||
*/
|
||||
@TableField("environment")
|
||||
private String environment;
|
||||
|
||||
/**
|
||||
* 自定义请求头
|
||||
*/
|
||||
@TableField("custom_headers")
|
||||
private String customHeaders;
|
||||
|
||||
/**
|
||||
* 自定义参数
|
||||
*/
|
||||
@TableField("custom_params")
|
||||
private String customParams;
|
||||
|
||||
/**
|
||||
* Webhook回调地址
|
||||
*/
|
||||
@TableField("webhook_url")
|
||||
private String webhookUrl;
|
||||
|
||||
/**
|
||||
* 健康检查URL
|
||||
*/
|
||||
@TableField("health_check_url")
|
||||
private String healthCheckUrl;
|
||||
|
||||
/**
|
||||
* 健康检查间隔(分钟)
|
||||
*/
|
||||
@TableField("health_check_interval_minutes")
|
||||
private Integer healthCheckIntervalMinutes;
|
||||
|
||||
/**
|
||||
* 配置描述
|
||||
*/
|
||||
@TableField("description")
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 使用说明
|
||||
*/
|
||||
@TableField("usage_notes")
|
||||
private String usageNotes;
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
package com.emotion.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.emotion.common.BaseEntity;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@TableName("t_ai_endpoint_config")
|
||||
public class AiEndpointConfig extends BaseEntity {
|
||||
|
||||
@TableField("endpoint_code")
|
||||
private String endpointCode;
|
||||
|
||||
@TableField("endpoint_name")
|
||||
private String endpointName;
|
||||
|
||||
@TableField("provider_id")
|
||||
private String providerId;
|
||||
|
||||
@TableField("endpoint_type")
|
||||
private String endpointType;
|
||||
|
||||
@TableField("api_path")
|
||||
private String apiPath;
|
||||
|
||||
@TableField("workflow_id")
|
||||
private String workflowId;
|
||||
|
||||
@TableField("bot_id")
|
||||
private String botId;
|
||||
|
||||
@TableField("model_name")
|
||||
private String modelName;
|
||||
|
||||
@TableField("response_mode")
|
||||
private String responseMode;
|
||||
|
||||
@TableField("request_template")
|
||||
private String requestTemplate;
|
||||
|
||||
@TableField("default_inputs")
|
||||
private String defaultInputs;
|
||||
|
||||
@TableField("custom_headers")
|
||||
private String customHeaders;
|
||||
|
||||
@TableField("timeout_ms")
|
||||
private Integer timeoutMs;
|
||||
|
||||
@TableField("support_stream")
|
||||
private Integer supportStream;
|
||||
|
||||
@TableField("is_enabled")
|
||||
private Integer isEnabled;
|
||||
|
||||
@TableField("description")
|
||||
private String description;
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.emotion.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.emotion.common.BaseEntity;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@TableName("t_ai_provider")
|
||||
public class AiProvider extends BaseEntity {
|
||||
|
||||
@TableField("provider_code")
|
||||
private String providerCode;
|
||||
|
||||
@TableField("provider_name")
|
||||
private String providerName;
|
||||
|
||||
@TableField("provider_type")
|
||||
private String providerType;
|
||||
|
||||
@TableField("base_url")
|
||||
private String baseUrl;
|
||||
|
||||
@TableField("api_key")
|
||||
private String apiKey;
|
||||
|
||||
@TableField("auth_type")
|
||||
private String authType;
|
||||
|
||||
@TableField("default_headers")
|
||||
private String defaultHeaders;
|
||||
|
||||
@TableField("timeout_ms")
|
||||
private Integer timeoutMs;
|
||||
|
||||
@TableField("is_enabled")
|
||||
private Integer isEnabled;
|
||||
|
||||
@TableField("description")
|
||||
private String description;
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.emotion.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.emotion.common.BaseEntity;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@TableName("t_ai_scene_binding")
|
||||
public class AiSceneBinding extends BaseEntity {
|
||||
|
||||
@TableField("scene_code")
|
||||
private String sceneCode;
|
||||
|
||||
@TableField("scene_name")
|
||||
private String sceneName;
|
||||
|
||||
@TableField("endpoint_id")
|
||||
private String endpointId;
|
||||
|
||||
@TableField("input_schema")
|
||||
private String inputSchema;
|
||||
|
||||
@TableField("prompt_template")
|
||||
private String promptTemplate;
|
||||
|
||||
@TableField("required_stream")
|
||||
private Integer requiredStream;
|
||||
|
||||
@TableField("priority")
|
||||
private Integer priority;
|
||||
|
||||
@TableField("is_enabled")
|
||||
private Integer isEnabled;
|
||||
|
||||
@TableField("version")
|
||||
private String version;
|
||||
|
||||
@TableField("description")
|
||||
private String description;
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
package com.emotion.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
|
||||
import com.emotion.common.BaseEntity;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Map;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@TableName(value = "t_analytics_event", autoResultMap = true)
|
||||
public class AnalyticsEvent extends BaseEntity {
|
||||
|
||||
@TableField("user_id")
|
||||
private String userId;
|
||||
|
||||
@TableField("anonymous_id")
|
||||
private String anonymousId;
|
||||
|
||||
@TableField("session_id")
|
||||
private String sessionId;
|
||||
|
||||
@TableField("event_name")
|
||||
private String eventName;
|
||||
|
||||
@TableField("event_type")
|
||||
private String eventType;
|
||||
|
||||
@TableField("page_path")
|
||||
private String pagePath;
|
||||
|
||||
@TableField("referrer_path")
|
||||
private String referrerPath;
|
||||
|
||||
@TableField(value = "properties", typeHandler = JacksonTypeHandler.class)
|
||||
private Map<String, Object> properties;
|
||||
|
||||
@TableField(value = "device_info", typeHandler = JacksonTypeHandler.class)
|
||||
private Map<String, Object> deviceInfo;
|
||||
|
||||
@TableField("duration_ms")
|
||||
private Long durationMs;
|
||||
|
||||
@TableField("occurred_at")
|
||||
private LocalDateTime occurredAt;
|
||||
|
||||
@TableField("server_time")
|
||||
private LocalDateTime serverTime;
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
package com.emotion.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.emotion.common.BaseEntity;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
/**
|
||||
* 接口端点实体,继承 BaseEntity 字段
|
||||
*
|
||||
* @author Peanut
|
||||
* @date 2026-05-23
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@TableName("api_endpoint")
|
||||
public class ApiEndpoint extends BaseEntity {
|
||||
|
||||
@TableField("path")
|
||||
private String path;
|
||||
|
||||
@TableField("method")
|
||||
private String method;
|
||||
|
||||
@TableField("operation_id")
|
||||
private String operationId;
|
||||
|
||||
@TableField("summary")
|
||||
private String summary;
|
||||
|
||||
@TableField("description")
|
||||
private String description;
|
||||
|
||||
@TableField("tags")
|
||||
private String tags;
|
||||
|
||||
@TableField("deprecated")
|
||||
private Integer deprecated;
|
||||
|
||||
@TableField("request_schema")
|
||||
private String requestSchema;
|
||||
|
||||
@TableField("response_schema")
|
||||
private String responseSchema;
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
package com.emotion.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.emotion.common.BaseEntity;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
/**
|
||||
* 接口参数实体
|
||||
*
|
||||
* @author Peanut
|
||||
* @date 2026-05-23
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@TableName("api_param")
|
||||
public class ApiParam extends BaseEntity {
|
||||
|
||||
@TableField("endpoint_id")
|
||||
private String endpointId;
|
||||
|
||||
@TableField("param_type")
|
||||
private String paramType;
|
||||
|
||||
@TableField("name")
|
||||
private String name;
|
||||
|
||||
@TableField("required")
|
||||
private Integer required;
|
||||
|
||||
@TableField("param_type_def")
|
||||
private String paramTypeDef;
|
||||
|
||||
@TableField("description")
|
||||
private String description;
|
||||
|
||||
@TableField("default_value")
|
||||
private String defaultValue;
|
||||
|
||||
@TableField("enum_values")
|
||||
private String enumValues;
|
||||
|
||||
@TableField("example")
|
||||
private String example;
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
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;
|
||||
|
||||
/**
|
||||
* 评论实体类
|
||||
*
|
||||
* @author huazhongmin
|
||||
* @date 2025-07-23
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@TableName("t_comment")
|
||||
public class Comment extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 帖子ID
|
||||
*/
|
||||
@TableField("post_id")
|
||||
private String postId;
|
||||
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
@TableField("user_id")
|
||||
private String userId;
|
||||
|
||||
/**
|
||||
* 评论内容
|
||||
*/
|
||||
@TableField("content")
|
||||
private String content;
|
||||
|
||||
/**
|
||||
* 回复的评论ID
|
||||
*/
|
||||
@TableField("reply_to_id")
|
||||
private String replyToId;
|
||||
|
||||
/**
|
||||
* 点赞数
|
||||
*/
|
||||
@TableField("likes")
|
||||
private Integer likes;
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
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;
|
||||
|
||||
/**
|
||||
* 社区帖子实体类
|
||||
*
|
||||
* @author huazhongmin
|
||||
* @date 2025-07-23
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@TableName("t_community_post")
|
||||
public class CommunityPost extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
@TableField("user_id")
|
||||
private String userId;
|
||||
|
||||
/**
|
||||
* 地点ID
|
||||
*/
|
||||
@TableField("location_id")
|
||||
private String locationId;
|
||||
|
||||
/**
|
||||
* 标题
|
||||
*/
|
||||
@TableField("title")
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 内容
|
||||
*/
|
||||
@TableField("content")
|
||||
private String content;
|
||||
|
||||
/**
|
||||
* 帖子类型
|
||||
*/
|
||||
@TableField("type")
|
||||
private String type;
|
||||
|
||||
/**
|
||||
* 图片列表
|
||||
*/
|
||||
@TableField("images")
|
||||
private String images;
|
||||
|
||||
/**
|
||||
* 标签
|
||||
*/
|
||||
@TableField("tags")
|
||||
private String tags;
|
||||
|
||||
/**
|
||||
* 点赞数
|
||||
*/
|
||||
@TableField("likes")
|
||||
private Integer likes;
|
||||
|
||||
/**
|
||||
* 浏览数
|
||||
*/
|
||||
@TableField("view_count")
|
||||
private Integer viewCount;
|
||||
|
||||
/**
|
||||
* 评论数
|
||||
*/
|
||||
@TableField("comment_count")
|
||||
private Integer commentCount;
|
||||
|
||||
/**
|
||||
* 是否私密
|
||||
*/
|
||||
@TableField("is_private")
|
||||
private Integer isPrivate;
|
||||
}
|
||||
@@ -0,0 +1,189 @@
|
||||
package com.emotion.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.emotion.common.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 对话实体
|
||||
*
|
||||
* @author huazhongmin
|
||||
* @date 2025-07-23
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@TableName("t_conversation")
|
||||
public class Conversation extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 用户ID (关联user.id)
|
||||
*/
|
||||
@TableField("user_id")
|
||||
private String userId;
|
||||
|
||||
/**
|
||||
* 用户类型: registered-注册用户, guest-访客用户
|
||||
*/
|
||||
@TableField("user_type")
|
||||
private String userType;
|
||||
|
||||
/**
|
||||
* 对话标题
|
||||
*/
|
||||
@TableField("title")
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 对话类型
|
||||
*/
|
||||
@TableField("type")
|
||||
private String type;
|
||||
|
||||
/**
|
||||
* 状态: active-活跃, ended-结束, archived-归档
|
||||
*/
|
||||
@TableField("status")
|
||||
private String conversationStatus;
|
||||
|
||||
/**
|
||||
* Coze对话ID
|
||||
*/
|
||||
@TableField("coze_conversation_id")
|
||||
private String cozeConversationId;
|
||||
|
||||
/**
|
||||
* 使用的Bot ID
|
||||
*/
|
||||
@TableField("bot_id")
|
||||
private String botId;
|
||||
|
||||
/**
|
||||
* 使用的Workflow ID
|
||||
*/
|
||||
@TableField("workflow_id")
|
||||
private String workflowId;
|
||||
|
||||
/**
|
||||
* 初始消息
|
||||
*/
|
||||
@TableField("initial_message")
|
||||
private String initialMessage;
|
||||
|
||||
/**
|
||||
* 上下文信息
|
||||
*/
|
||||
@TableField("context")
|
||||
private String context;
|
||||
|
||||
/**
|
||||
* 主要情绪
|
||||
*/
|
||||
@TableField("primary_emotion")
|
||||
private String primaryEmotion;
|
||||
|
||||
/**
|
||||
* 情绪强度
|
||||
*/
|
||||
@TableField("emotion_intensity")
|
||||
private BigDecimal emotionIntensity;
|
||||
|
||||
/**
|
||||
* 情绪趋势
|
||||
*/
|
||||
@TableField("emotion_trend")
|
||||
private String emotionTrend;
|
||||
|
||||
/**
|
||||
* 关键词
|
||||
*/
|
||||
@TableField("keywords")
|
||||
private String keywords;
|
||||
|
||||
/**
|
||||
* AI洞察
|
||||
*/
|
||||
@TableField("ai_insights")
|
||||
private String aiInsights;
|
||||
|
||||
/**
|
||||
* 分析置信度
|
||||
*/
|
||||
@TableField("confidence")
|
||||
private BigDecimal confidence;
|
||||
|
||||
/**
|
||||
* 开始时间
|
||||
*/
|
||||
@TableField("start_time")
|
||||
private LocalDateTime startTime;
|
||||
|
||||
/**
|
||||
* 结束时间
|
||||
*/
|
||||
@TableField("end_time")
|
||||
private LocalDateTime endTime;
|
||||
|
||||
/**
|
||||
* 最后活跃时间
|
||||
*/
|
||||
@TableField("last_active_time")
|
||||
private LocalDateTime lastActiveTime;
|
||||
|
||||
/**
|
||||
* 消息数量
|
||||
*/
|
||||
@TableField("message_count")
|
||||
private Integer messageCount;
|
||||
|
||||
/**
|
||||
* 总Token使用量
|
||||
*/
|
||||
@TableField("total_tokens")
|
||||
private Integer totalTokens;
|
||||
|
||||
/**
|
||||
* 总费用
|
||||
*/
|
||||
@TableField("total_cost")
|
||||
private BigDecimal totalCost;
|
||||
|
||||
/**
|
||||
* 客户端IP地址 (支持IPv6)
|
||||
*/
|
||||
@TableField("client_ip")
|
||||
private String clientIp;
|
||||
|
||||
/**
|
||||
* 用户代理信息
|
||||
*/
|
||||
@TableField("user_agent")
|
||||
private String userAgent;
|
||||
|
||||
/**
|
||||
* 对话摘要
|
||||
*/
|
||||
@TableField("summary")
|
||||
private String summary;
|
||||
|
||||
/**
|
||||
* 标签
|
||||
*/
|
||||
@TableField("tags")
|
||||
private String tags;
|
||||
|
||||
/**
|
||||
* 扩展元数据
|
||||
*/
|
||||
@TableField("metadata")
|
||||
private String metadata;
|
||||
}
|
||||
@@ -0,0 +1,261 @@
|
||||
package com.emotion.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.emotion.common.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* Coze API调用记录实体类
|
||||
*
|
||||
* @author huazhongmin
|
||||
* @date 2025-07-23
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@TableName("t_coze_api_call")
|
||||
public class CozeApiCall extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 对话ID
|
||||
*/
|
||||
@TableField("conversation_id")
|
||||
private String conversationId;
|
||||
|
||||
/**
|
||||
* 消息ID
|
||||
*/
|
||||
@TableField("message_id")
|
||||
private String messageId;
|
||||
|
||||
/**
|
||||
* Coze聊天ID
|
||||
*/
|
||||
@TableField("coze_chat_id")
|
||||
private String cozeChatId;
|
||||
|
||||
/**
|
||||
* Coze对话ID
|
||||
*/
|
||||
@TableField("coze_conversation_id")
|
||||
private String cozeConversationId;
|
||||
|
||||
/**
|
||||
* Bot ID
|
||||
*/
|
||||
@TableField("bot_id")
|
||||
private String botId;
|
||||
|
||||
/**
|
||||
* Workflow ID
|
||||
*/
|
||||
@TableField("workflow_id")
|
||||
private String workflowId;
|
||||
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
@TableField("user_id")
|
||||
private String userId;
|
||||
|
||||
/**
|
||||
* 请求类型: chat/stream/retrieve/messages
|
||||
*/
|
||||
@TableField("request_type")
|
||||
private String requestType;
|
||||
|
||||
/**
|
||||
* 请求URL
|
||||
*/
|
||||
@TableField("request_url")
|
||||
private String requestUrl;
|
||||
|
||||
/**
|
||||
* 请求体
|
||||
*/
|
||||
@TableField("request_body")
|
||||
private String requestBody;
|
||||
|
||||
/**
|
||||
* 请求头
|
||||
*/
|
||||
@TableField("request_headers")
|
||||
private String requestHeaders;
|
||||
|
||||
/**
|
||||
* 用户输入的消息内容
|
||||
*/
|
||||
@TableField("user_message")
|
||||
private String userMessage;
|
||||
|
||||
/**
|
||||
* 用户消息类型: text/image/file
|
||||
*/
|
||||
@TableField("user_message_type")
|
||||
private String userMessageType;
|
||||
|
||||
/**
|
||||
* AI回复的消息内容
|
||||
*/
|
||||
@TableField("ai_reply")
|
||||
private String aiReply;
|
||||
|
||||
/**
|
||||
* AI回复类型: text/image/file
|
||||
*/
|
||||
@TableField("ai_reply_type")
|
||||
private String aiReplyType;
|
||||
|
||||
/**
|
||||
* HTTP状态码
|
||||
*/
|
||||
@TableField("response_status")
|
||||
private Integer responseStatus;
|
||||
|
||||
/**
|
||||
* 响应体
|
||||
*/
|
||||
@TableField("response_body")
|
||||
private String responseBody;
|
||||
|
||||
/**
|
||||
* 响应头
|
||||
*/
|
||||
@TableField("response_headers")
|
||||
private String responseHeaders;
|
||||
|
||||
/**
|
||||
* 轮询次数
|
||||
*/
|
||||
@TableField("poll_count")
|
||||
private Integer pollCount;
|
||||
|
||||
/**
|
||||
* 轮询开始时间
|
||||
*/
|
||||
@TableField("poll_start_time")
|
||||
private LocalDateTime pollStartTime;
|
||||
|
||||
/**
|
||||
* 轮询结束时间
|
||||
*/
|
||||
@TableField("poll_end_time")
|
||||
private LocalDateTime pollEndTime;
|
||||
|
||||
/**
|
||||
* 最终状态: completed/failed/timeout
|
||||
*/
|
||||
@TableField("final_status")
|
||||
private String finalStatus;
|
||||
|
||||
/**
|
||||
* 调用状态: pending/success/failed/timeout
|
||||
*/
|
||||
@TableField("status")
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 开始时间
|
||||
*/
|
||||
@TableField("start_time")
|
||||
private LocalDateTime startTime;
|
||||
|
||||
/**
|
||||
* 结束时间
|
||||
*/
|
||||
@TableField("end_time")
|
||||
private LocalDateTime endTime;
|
||||
|
||||
/**
|
||||
* 耗时(毫秒)
|
||||
*/
|
||||
@TableField("duration_ms")
|
||||
private Integer durationMs;
|
||||
|
||||
/**
|
||||
* 输入Token数
|
||||
*/
|
||||
@TableField("prompt_tokens")
|
||||
private Integer promptTokens;
|
||||
|
||||
/**
|
||||
* 输出Token数
|
||||
*/
|
||||
@TableField("completion_tokens")
|
||||
private Integer completionTokens;
|
||||
|
||||
/**
|
||||
* 总Token数
|
||||
*/
|
||||
@TableField("total_tokens")
|
||||
private Integer totalTokens;
|
||||
|
||||
/**
|
||||
* 费用
|
||||
*/
|
||||
@TableField("cost")
|
||||
private BigDecimal cost;
|
||||
|
||||
/**
|
||||
* 函数调用记录
|
||||
*/
|
||||
@TableField("function_calls")
|
||||
private String functionCalls;
|
||||
|
||||
/**
|
||||
* 函数调用结果
|
||||
*/
|
||||
@TableField("function_results")
|
||||
private String functionResults;
|
||||
|
||||
/**
|
||||
* 错误代码
|
||||
*/
|
||||
@TableField("error_code")
|
||||
private String errorCode;
|
||||
|
||||
/**
|
||||
* 错误信息
|
||||
*/
|
||||
@TableField("error_message")
|
||||
private String errorMessage;
|
||||
|
||||
/**
|
||||
* 客户端IP
|
||||
*/
|
||||
@TableField("client_ip")
|
||||
private String clientIp;
|
||||
|
||||
/**
|
||||
* 用户代理
|
||||
*/
|
||||
@TableField("user_agent")
|
||||
private String userAgent;
|
||||
|
||||
/**
|
||||
* 会话ID
|
||||
*/
|
||||
@TableField("session_id")
|
||||
private String sessionId;
|
||||
|
||||
/**
|
||||
* 追踪ID
|
||||
*/
|
||||
@TableField("trace_id")
|
||||
private String traceId;
|
||||
|
||||
/**
|
||||
* 扩展元数据
|
||||
*/
|
||||
@TableField("metadata")
|
||||
private String metadata;
|
||||
}
|
||||
@@ -0,0 +1,129 @@
|
||||
package com.emotion.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.emotion.common.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 日记评论实体类
|
||||
*
|
||||
* @author huazhongmin
|
||||
* @date 2025-07-23
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@TableName("t_diary_comment")
|
||||
public class DiaryComment extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 日记ID
|
||||
*/
|
||||
@TableField("diary_id")
|
||||
private String diaryId;
|
||||
|
||||
/**
|
||||
* 评论用户ID
|
||||
*/
|
||||
@TableField("user_id")
|
||||
private String userId;
|
||||
|
||||
/**
|
||||
* 父评论ID (用于回复功能)
|
||||
*/
|
||||
@TableField("parent_comment_id")
|
||||
private String parentCommentId;
|
||||
|
||||
/**
|
||||
* 评论内容
|
||||
*/
|
||||
@TableField("content")
|
||||
private String content;
|
||||
|
||||
/**
|
||||
* 评论图片 (存储图片URL数组)
|
||||
*/
|
||||
@TableField("images")
|
||||
private String images;
|
||||
|
||||
/**
|
||||
* 评论类型: user-用户评论, ai-AI评论, system-系统评论
|
||||
*/
|
||||
@TableField("comment_type")
|
||||
private String commentType;
|
||||
|
||||
/**
|
||||
* AI评论来源 (如: emotion_analysis, sentiment_analysis)
|
||||
*/
|
||||
@TableField("ai_comment_source")
|
||||
private String aiCommentSource;
|
||||
|
||||
/**
|
||||
* 点赞数
|
||||
*/
|
||||
@TableField("like_count")
|
||||
private Integer likeCount;
|
||||
|
||||
/**
|
||||
* 回复数
|
||||
*/
|
||||
@TableField("reply_count")
|
||||
private Integer replyCount;
|
||||
|
||||
/**
|
||||
* 是否匿名评论: 0-实名, 1-匿名
|
||||
*/
|
||||
@TableField("is_anonymous")
|
||||
private Integer isAnonymous;
|
||||
|
||||
/**
|
||||
* 是否置顶: 0-普通, 1-置顶
|
||||
*/
|
||||
@TableField("is_top")
|
||||
private Integer isTop;
|
||||
|
||||
/**
|
||||
* 状态: published-已发布, hidden-隐藏, deleted-已删除
|
||||
*/
|
||||
@TableField("status")
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 发布时间
|
||||
*/
|
||||
@TableField("publish_time")
|
||||
private LocalDateTime publishTime;
|
||||
|
||||
/**
|
||||
* 最后回复时间
|
||||
*/
|
||||
@TableField("last_reply_time")
|
||||
private LocalDateTime lastReplyTime;
|
||||
|
||||
/**
|
||||
* 情绪评分
|
||||
*/
|
||||
@TableField("emotion_score")
|
||||
private BigDecimal emotionScore;
|
||||
|
||||
/**
|
||||
* 情感评分
|
||||
*/
|
||||
@TableField("sentiment_score")
|
||||
private BigDecimal sentimentScore;
|
||||
|
||||
/**
|
||||
* 扩展元数据
|
||||
*/
|
||||
@TableField("metadata")
|
||||
private String metadata;
|
||||
}
|
||||
@@ -0,0 +1,207 @@
|
||||
package com.emotion.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.emotion.common.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 用户日记实体类
|
||||
*
|
||||
* @author huazhongmin
|
||||
* @date 2025-07-23
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@TableName("t_diary_post")
|
||||
public class DiaryPost extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
@TableField("user_id")
|
||||
private String userId;
|
||||
|
||||
/**
|
||||
* 日记标题
|
||||
*/
|
||||
@TableField("title")
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 日记内容
|
||||
*/
|
||||
@TableField("content")
|
||||
private String content;
|
||||
|
||||
/**
|
||||
* 图片列表 (存储图片URL数组)
|
||||
*/
|
||||
@TableField("images")
|
||||
private String images;
|
||||
|
||||
/**
|
||||
* 视频列表 (存储视频URL数组)
|
||||
*/
|
||||
@TableField("videos")
|
||||
private String videos;
|
||||
|
||||
/**
|
||||
* 发布地点
|
||||
*/
|
||||
@TableField("location")
|
||||
private String location;
|
||||
|
||||
/**
|
||||
* 纬度
|
||||
*/
|
||||
@TableField("latitude")
|
||||
private BigDecimal latitude;
|
||||
|
||||
/**
|
||||
* 经度
|
||||
*/
|
||||
@TableField("longitude")
|
||||
private BigDecimal longitude;
|
||||
|
||||
/**
|
||||
* 天气信息
|
||||
*/
|
||||
@TableField("weather")
|
||||
private String weather;
|
||||
|
||||
/**
|
||||
* 心情状态
|
||||
*/
|
||||
@TableField("mood")
|
||||
private String mood;
|
||||
|
||||
/**
|
||||
* 心情评分 (0-10)
|
||||
*/
|
||||
@TableField("mood_score")
|
||||
private BigDecimal moodScore;
|
||||
|
||||
/**
|
||||
* 标签列表
|
||||
*/
|
||||
@TableField("tags")
|
||||
private String tags;
|
||||
|
||||
/**
|
||||
* 是否公开: 0-仅自己可见, 1-公开
|
||||
*/
|
||||
@TableField("is_public")
|
||||
private Integer isPublic;
|
||||
|
||||
/**
|
||||
* 是否匿名发布: 0-实名, 1-匿名
|
||||
*/
|
||||
@TableField("is_anonymous")
|
||||
private Integer isAnonymous;
|
||||
|
||||
/**
|
||||
* 浏览数
|
||||
*/
|
||||
@TableField("view_count")
|
||||
private Integer viewCount;
|
||||
|
||||
/**
|
||||
* 点赞数
|
||||
*/
|
||||
@TableField("like_count")
|
||||
private Integer likeCount;
|
||||
|
||||
/**
|
||||
* 评论数
|
||||
*/
|
||||
@TableField("comment_count")
|
||||
private Integer commentCount;
|
||||
|
||||
/**
|
||||
* 分享数
|
||||
*/
|
||||
@TableField("share_count")
|
||||
private Integer shareCount;
|
||||
|
||||
/**
|
||||
* AI评论内容
|
||||
*/
|
||||
@TableField("ai_comment")
|
||||
private String aiComment;
|
||||
|
||||
/**
|
||||
* AI评论时间
|
||||
*/
|
||||
@TableField("ai_comment_time")
|
||||
private LocalDateTime aiCommentTime;
|
||||
|
||||
/**
|
||||
* AI情绪分析结果
|
||||
*/
|
||||
@TableField("ai_emotion_analysis")
|
||||
private String aiEmotionAnalysis;
|
||||
|
||||
/**
|
||||
* AI情感评分 (-1到1)
|
||||
*/
|
||||
@TableField("ai_sentiment_score")
|
||||
private BigDecimal aiSentimentScore;
|
||||
|
||||
/**
|
||||
* AI提取的关键词
|
||||
*/
|
||||
@TableField("ai_keywords")
|
||||
private String aiKeywords;
|
||||
|
||||
/**
|
||||
* AI建议
|
||||
*/
|
||||
@TableField("ai_suggestions")
|
||||
private String aiSuggestions;
|
||||
|
||||
/**
|
||||
* 发布时间
|
||||
*/
|
||||
@TableField("publish_time")
|
||||
private LocalDateTime publishTime;
|
||||
|
||||
/**
|
||||
* 最后评论时间
|
||||
*/
|
||||
@TableField("last_comment_time")
|
||||
private LocalDateTime lastCommentTime;
|
||||
|
||||
/**
|
||||
* 状态: draft-草稿, published-已发布, hidden-隐藏, deleted-已删除
|
||||
*/
|
||||
@TableField("status")
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 优先级 (用于置顶功能)
|
||||
*/
|
||||
@TableField("priority")
|
||||
private Integer priority;
|
||||
|
||||
/**
|
||||
* 是否精选: 0-普通, 1-精选
|
||||
*/
|
||||
@TableField("featured")
|
||||
private Integer featured;
|
||||
|
||||
/**
|
||||
* 扩展元数据
|
||||
*/
|
||||
@TableField("metadata")
|
||||
private String metadata;
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.emotion.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.emotion.common.BaseEntity;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
/**
|
||||
* 字典实体类
|
||||
*
|
||||
* @author huazhongmin
|
||||
* @date 2025-12-22
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@TableName("t_dictionary")
|
||||
public class Dictionary extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 字典类型 (如: city, constellation, mbti)
|
||||
*/
|
||||
@TableField("dict_type")
|
||||
private String dictType;
|
||||
|
||||
/**
|
||||
* 字典编码
|
||||
*/
|
||||
@TableField("dict_code")
|
||||
private String dictCode;
|
||||
|
||||
/**
|
||||
* 字典名称
|
||||
*/
|
||||
@TableField("dict_name")
|
||||
private String dictName;
|
||||
|
||||
/**
|
||||
* 字典值
|
||||
*/
|
||||
@TableField("dict_value")
|
||||
private String dictValue;
|
||||
|
||||
/**
|
||||
* 排序顺序
|
||||
*/
|
||||
@TableField("sort_order")
|
||||
private Integer sortOrder;
|
||||
|
||||
/**
|
||||
* 状态: 0-禁用, 1-启用
|
||||
*/
|
||||
@TableField("status")
|
||||
private Integer status;
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
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.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 情绪分析实体类
|
||||
*
|
||||
* @author huazhongmin
|
||||
* @date 2025-07-23
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@TableName("t_emotion_analysis")
|
||||
public class EmotionAnalysis extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
@TableField("user_id")
|
||||
private String userId;
|
||||
|
||||
/**
|
||||
* 关联消息ID
|
||||
*/
|
||||
@TableField("message_id")
|
||||
private String messageId;
|
||||
|
||||
/**
|
||||
* 分析文本
|
||||
*/
|
||||
@TableField("text")
|
||||
private String text;
|
||||
|
||||
/**
|
||||
* 主要情绪
|
||||
*/
|
||||
@TableField("primary_emotion")
|
||||
private String primaryEmotion;
|
||||
|
||||
/**
|
||||
* 情绪强度
|
||||
*/
|
||||
@TableField("intensity")
|
||||
private BigDecimal intensity;
|
||||
|
||||
/**
|
||||
* 情绪极性: positive-积极, negative-消极, neutral-中性
|
||||
*/
|
||||
@TableField("polarity")
|
||||
private String polarity;
|
||||
|
||||
/**
|
||||
* 置信度
|
||||
*/
|
||||
@TableField("confidence")
|
||||
private BigDecimal confidence;
|
||||
|
||||
/**
|
||||
* 情绪分布详情
|
||||
*/
|
||||
@TableField("emotions")
|
||||
private String emotions;
|
||||
|
||||
/**
|
||||
* 关键词列表
|
||||
*/
|
||||
@TableField("keywords")
|
||||
private String keywords;
|
||||
|
||||
/**
|
||||
* 建议
|
||||
*/
|
||||
@TableField("suggestion")
|
||||
private String suggestion;
|
||||
|
||||
/**
|
||||
* 分析时间
|
||||
*/
|
||||
@TableField("analysis_time")
|
||||
private LocalDateTime analysisTime;
|
||||
|
||||
/**
|
||||
* 扩展元数据
|
||||
*/
|
||||
@TableField("metadata")
|
||||
private String metadata;
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
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.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
|
||||
/**
|
||||
* 情绪记录实体类
|
||||
*
|
||||
* @author huazhongmin
|
||||
* @date 2025-07-23
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@TableName("t_emotion_record")
|
||||
public class EmotionRecord extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
@TableField("user_id")
|
||||
private String userId;
|
||||
|
||||
/**
|
||||
* 记录日期
|
||||
*/
|
||||
@TableField("record_date")
|
||||
private LocalDate recordDate;
|
||||
|
||||
/**
|
||||
* 情绪类型
|
||||
*/
|
||||
@TableField("emotion_type")
|
||||
private String emotionType;
|
||||
|
||||
/**
|
||||
* 情绪强度
|
||||
*/
|
||||
@TableField("intensity")
|
||||
private BigDecimal intensity;
|
||||
|
||||
/**
|
||||
* 触发因素
|
||||
*/
|
||||
@TableField("triggers")
|
||||
private String triggers;
|
||||
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
@TableField("description")
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 标签
|
||||
*/
|
||||
@TableField("tags")
|
||||
private String tags;
|
||||
|
||||
/**
|
||||
* 天气
|
||||
*/
|
||||
@TableField("weather")
|
||||
private String weather;
|
||||
|
||||
/**
|
||||
* 地点
|
||||
*/
|
||||
@TableField("location")
|
||||
private String location;
|
||||
|
||||
/**
|
||||
* 活动
|
||||
*/
|
||||
@TableField("activity")
|
||||
private String activity;
|
||||
|
||||
/**
|
||||
* 相关人物
|
||||
*/
|
||||
@TableField("people")
|
||||
private String people;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@TableField("notes")
|
||||
private String notes;
|
||||
}
|
||||
@@ -0,0 +1,95 @@
|
||||
package com.emotion.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
|
||||
import com.emotion.common.BaseEntity;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 爽文剧本实体类
|
||||
* 存储用户生成的爽文剧本,包括主题、风格、剧情章节等
|
||||
*
|
||||
* @author huazhongmin
|
||||
* @date 2025-12-22
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@TableName(value = "t_epic_script", autoResultMap = true)
|
||||
public class EpicScript extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 用户ID (关联t_user.id)
|
||||
*/
|
||||
@TableField("user_id")
|
||||
private String userId;
|
||||
|
||||
/**
|
||||
* 剧本标题
|
||||
*/
|
||||
@TableField("title")
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 剧本主题/渴望
|
||||
*/
|
||||
@TableField("theme")
|
||||
private String theme;
|
||||
|
||||
/**
|
||||
* 剧本风格: career-职场逆袭, love-情感圆满, fantasy-玄幻觉醒
|
||||
*/
|
||||
@TableField("style")
|
||||
private String style;
|
||||
|
||||
/**
|
||||
* 篇幅长度: medium-标准篇, long-长篇
|
||||
*/
|
||||
@TableField("length")
|
||||
private String length;
|
||||
|
||||
/**
|
||||
* 序幕:低谷回响
|
||||
*/
|
||||
@TableField("plot_intro")
|
||||
private String plotIntro;
|
||||
|
||||
/**
|
||||
* 转折:契机出现
|
||||
*/
|
||||
@TableField("plot_turning")
|
||||
private String plotTurning;
|
||||
|
||||
/**
|
||||
* 高潮:命运抉择
|
||||
*/
|
||||
@TableField("plot_climax")
|
||||
private String plotClimax;
|
||||
|
||||
/**
|
||||
* 结局:新的开始
|
||||
*/
|
||||
@TableField("plot_ending")
|
||||
private String plotEnding;
|
||||
|
||||
/**
|
||||
* 完整剧情JSON结构
|
||||
*/
|
||||
@TableField(value = "plot_json", typeHandler = JacksonTypeHandler.class)
|
||||
private Map<String, Object> plotJson;
|
||||
|
||||
/**
|
||||
* 是否当前选中: 0-否, 1-是
|
||||
*/
|
||||
@TableField("is_selected")
|
||||
private Integer isSelected;
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
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.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 成长课题实体类
|
||||
*
|
||||
* @author huazhongmin
|
||||
* @date 2025-07-23
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@TableName("t_growth_topic")
|
||||
public class GrowthTopic extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 课题标题
|
||||
*/
|
||||
@TableField("title")
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 分类
|
||||
*/
|
||||
@TableField("category")
|
||||
private String category;
|
||||
|
||||
/**
|
||||
* 难度: easy-简单, medium-中等, hard-困难
|
||||
*/
|
||||
@TableField("difficulty")
|
||||
private String difficulty;
|
||||
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
@TableField("description")
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 内容
|
||||
*/
|
||||
@TableField("content")
|
||||
private String content;
|
||||
|
||||
/**
|
||||
* 持续天数
|
||||
*/
|
||||
@TableField("duration_days")
|
||||
private Integer durationDays;
|
||||
|
||||
/**
|
||||
* 解锁条件
|
||||
*/
|
||||
@TableField("unlock_conditions")
|
||||
private String unlockConditions;
|
||||
|
||||
/**
|
||||
* 是否解锁
|
||||
*/
|
||||
@TableField("is_unlocked")
|
||||
private Integer isUnlocked;
|
||||
|
||||
/**
|
||||
* 进度百分比
|
||||
*/
|
||||
@TableField("progress")
|
||||
private BigDecimal progress;
|
||||
|
||||
/**
|
||||
* 完成时间
|
||||
*/
|
||||
@TableField("completed_time")
|
||||
private LocalDateTime completedTime;
|
||||
|
||||
/**
|
||||
* 奖励
|
||||
*/
|
||||
@TableField("rewards")
|
||||
private String rewards;
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
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;
|
||||
}
|
||||
@@ -0,0 +1,103 @@
|
||||
package com.emotion.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
|
||||
import com.emotion.common.BaseEntity;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 生命事件实体类
|
||||
* 存储用户的人生轨迹事件,包括日期、标题、内容、AI回复等
|
||||
*
|
||||
* @author huazhongmin
|
||||
* @date 2025-12-22
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@TableName(value = "t_life_event", autoResultMap = true)
|
||||
public class LifeEvent extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 用户ID (关联t_user.id)
|
||||
*/
|
||||
@TableField("user_id")
|
||||
private String userId;
|
||||
|
||||
/**
|
||||
* 事件类型: daily_log-日常记录, milestone-里程碑
|
||||
*/
|
||||
@TableField("event_type")
|
||||
private String eventType;
|
||||
|
||||
/**
|
||||
* 事件日期
|
||||
*/
|
||||
@TableField("event_date")
|
||||
private LocalDateTime eventDate;
|
||||
|
||||
/**
|
||||
* 时间模式: date-具体日期, month-年月, season-季节, range-时间范围
|
||||
*/
|
||||
@TableField("time_mode")
|
||||
private String timeMode;
|
||||
|
||||
/**
|
||||
* 原始时间文本: 2025-05, 2025-spring 等
|
||||
*/
|
||||
@TableField("event_date_text")
|
||||
private String eventDateText;
|
||||
|
||||
/**
|
||||
* 结束日期,仅时间范围使用
|
||||
*/
|
||||
@TableField("event_end_date")
|
||||
private LocalDateTime eventEndDate;
|
||||
|
||||
/**
|
||||
* 事件标题
|
||||
*/
|
||||
@TableField("title")
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 事件内容
|
||||
*/
|
||||
@TableField("content")
|
||||
private String content;
|
||||
|
||||
/**
|
||||
* AI疗愈回复
|
||||
*/
|
||||
@TableField("ai_reply")
|
||||
private String aiReply;
|
||||
|
||||
/**
|
||||
* 情绪类型
|
||||
*/
|
||||
@TableField("emotion_type")
|
||||
private String emotionType;
|
||||
|
||||
/**
|
||||
* 情绪评分
|
||||
*/
|
||||
@TableField("emotion_score")
|
||||
private BigDecimal emotionScore;
|
||||
|
||||
/**
|
||||
* 标签列表
|
||||
*/
|
||||
@TableField(value = "tags", typeHandler = JacksonTypeHandler.class)
|
||||
private List<String> tags;
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
package com.emotion.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
|
||||
import com.emotion.common.BaseEntity;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 实现路径实体类
|
||||
* 存储基于剧本生成的实现路径规划
|
||||
*
|
||||
* @author huazhongmin
|
||||
* @date 2025-12-22
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@TableName(value = "t_life_path", autoResultMap = true)
|
||||
public class LifePath extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 用户ID (关联t_user.id)
|
||||
*/
|
||||
@TableField("user_id")
|
||||
private String userId;
|
||||
|
||||
/**
|
||||
* 关联剧本ID (关联t_epic_script.id)
|
||||
*/
|
||||
@TableField("script_id")
|
||||
private String scriptId;
|
||||
|
||||
/**
|
||||
* 路径标题
|
||||
*/
|
||||
@TableField("title")
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 路径描述
|
||||
*/
|
||||
@TableField("description")
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 路径步骤列表 (JSON数组)
|
||||
* 每个步骤包含: phase, time, content, action, resources, habit
|
||||
*/
|
||||
@TableField(value = "steps", typeHandler = JacksonTypeHandler.class)
|
||||
private List<Map<String, Object>> steps;
|
||||
|
||||
/**
|
||||
* 状态: active-进行中, completed-已完成, archived-已归档
|
||||
*/
|
||||
@TableField("status")
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 完成进度百分比
|
||||
*/
|
||||
@TableField("progress")
|
||||
private BigDecimal progress;
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
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.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 地点标记实体类
|
||||
*
|
||||
* @author huazhongmin
|
||||
* @date 2025-07-23
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@TableName("t_location_pin")
|
||||
public class LocationPin extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 地点名称
|
||||
*/
|
||||
@TableField("name")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 地点类型
|
||||
*/
|
||||
@TableField("type")
|
||||
private String type;
|
||||
|
||||
/**
|
||||
* 地点分类
|
||||
*/
|
||||
@TableField("category")
|
||||
private String category;
|
||||
|
||||
/**
|
||||
* 纬度
|
||||
*/
|
||||
@TableField("latitude")
|
||||
private BigDecimal latitude;
|
||||
|
||||
/**
|
||||
* 经度
|
||||
*/
|
||||
@TableField("longitude")
|
||||
private BigDecimal longitude;
|
||||
|
||||
/**
|
||||
* 地址
|
||||
*/
|
||||
@TableField("address")
|
||||
private String address;
|
||||
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
@TableField("description")
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 创建者
|
||||
*/
|
||||
@TableField("created_by")
|
||||
private String createdBy;
|
||||
|
||||
/**
|
||||
* 点赞数
|
||||
*/
|
||||
@TableField("likes")
|
||||
private Integer likes;
|
||||
|
||||
/**
|
||||
* 访问数
|
||||
*/
|
||||
@TableField("visits")
|
||||
private Integer visits;
|
||||
|
||||
/**
|
||||
* 是否收藏
|
||||
*/
|
||||
@TableField("is_bookmarked")
|
||||
private Integer isBookmarked;
|
||||
|
||||
/**
|
||||
* 最后访问时间
|
||||
*/
|
||||
@TableField("last_visit_time")
|
||||
private LocalDateTime lastVisitTime;
|
||||
}
|
||||
@@ -0,0 +1,178 @@
|
||||
package com.emotion.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.emotion.common.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 消息实体类
|
||||
*
|
||||
* @author huazhongmin
|
||||
* @date 2025-07-23
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@TableName("t_message")
|
||||
public class Message extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 对话ID
|
||||
*/
|
||||
@TableField("conversation_id")
|
||||
private String conversationId;
|
||||
|
||||
/**
|
||||
* 消息内容
|
||||
*/
|
||||
@TableField("content")
|
||||
private String content;
|
||||
|
||||
/**
|
||||
* 消息类型
|
||||
*/
|
||||
@TableField("type")
|
||||
private String type;
|
||||
|
||||
/**
|
||||
* 发送者: user-用户, assistant-AI助手
|
||||
*/
|
||||
@TableField("sender")
|
||||
private String sender;
|
||||
|
||||
/**
|
||||
* 消息时间戳
|
||||
*/
|
||||
@TableField("timestamp")
|
||||
private LocalDateTime timestamp;
|
||||
|
||||
/**
|
||||
* Coze平台的聊天ID
|
||||
*/
|
||||
@TableField("coze_chat_id")
|
||||
private String cozeChatId;
|
||||
|
||||
/**
|
||||
* Coze平台的消息ID
|
||||
*/
|
||||
@TableField("coze_message_id")
|
||||
private String cozeMessageId;
|
||||
|
||||
/**
|
||||
* 消息状态: sending/sent/failed/processing
|
||||
*/
|
||||
@TableField("status")
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 错误信息
|
||||
*/
|
||||
@TableField("error_message")
|
||||
private String errorMessage;
|
||||
|
||||
/**
|
||||
* 情绪评分
|
||||
*/
|
||||
@TableField("emotion_score")
|
||||
private BigDecimal emotionScore;
|
||||
|
||||
/**
|
||||
* 情绪类型
|
||||
*/
|
||||
@TableField("emotion_type")
|
||||
private String emotionType;
|
||||
|
||||
/**
|
||||
* 情绪分析置信度
|
||||
*/
|
||||
@TableField("emotion_confidence")
|
||||
private BigDecimal emotionConfidence;
|
||||
|
||||
/**
|
||||
* 输入Token数
|
||||
*/
|
||||
@TableField("prompt_tokens")
|
||||
private Integer promptTokens;
|
||||
|
||||
/**
|
||||
* 输出Token数
|
||||
*/
|
||||
@TableField("completion_tokens")
|
||||
private Integer completionTokens;
|
||||
|
||||
/**
|
||||
* 总Token数
|
||||
*/
|
||||
@TableField("total_tokens")
|
||||
private Integer totalTokens;
|
||||
|
||||
/**
|
||||
* API调用费用
|
||||
*/
|
||||
@TableField("api_cost")
|
||||
private BigDecimal apiCost;
|
||||
|
||||
/**
|
||||
* 是否已读: 0-未读, 1-已读
|
||||
*/
|
||||
@TableField("is_read")
|
||||
private Integer isRead;
|
||||
|
||||
/**
|
||||
* 父消息ID(用于回复链)
|
||||
*/
|
||||
@TableField("parent_message_id")
|
||||
private String parentMessageId;
|
||||
|
||||
/**
|
||||
* 情绪分析结果
|
||||
*/
|
||||
@TableField("emotion_analysis")
|
||||
private String emotionAnalysis;
|
||||
|
||||
/**
|
||||
* 扩展元数据
|
||||
*/
|
||||
@TableField("metadata")
|
||||
private String metadata;
|
||||
|
||||
/**
|
||||
* 用户ID (注册用户或访客用户)
|
||||
*/
|
||||
@TableField("user_id")
|
||||
private String userId;
|
||||
|
||||
/**
|
||||
* 用户类型 (registered/guest)
|
||||
*/
|
||||
@TableField("user_type")
|
||||
private String userType;
|
||||
|
||||
/**
|
||||
* Coze消息角色 (user/assistant/system)
|
||||
*/
|
||||
@TableField("coze_role")
|
||||
private String cozeRole;
|
||||
|
||||
/**
|
||||
* Coze消息内容类型 (text/image/file等)
|
||||
*/
|
||||
@TableField("coze_content_type")
|
||||
private String cozeContentType;
|
||||
|
||||
/**
|
||||
* 消息顺序 - 在同一个会话中递增,用于确保消息展示顺序
|
||||
*/
|
||||
@TableField("message_order")
|
||||
private Long messageOrder;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
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_reward")
|
||||
public class Reward extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 课题ID
|
||||
*/
|
||||
@TableField("topic_id")
|
||||
private String topicId;
|
||||
|
||||
/**
|
||||
* 成就ID
|
||||
*/
|
||||
@TableField("achievement_id")
|
||||
private String achievementId;
|
||||
|
||||
/**
|
||||
* 奖励类型
|
||||
*/
|
||||
@TableField("type")
|
||||
private String type;
|
||||
|
||||
/**
|
||||
* 奖励名称
|
||||
*/
|
||||
@TableField("name")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
@TableField("description")
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 图标
|
||||
*/
|
||||
@TableField("icon")
|
||||
private String icon;
|
||||
|
||||
/**
|
||||
* 稀有度
|
||||
*/
|
||||
@TableField("rarity")
|
||||
private String rarity;
|
||||
|
||||
/**
|
||||
* 奖励值
|
||||
*/
|
||||
@TableField("value")
|
||||
private String value;
|
||||
|
||||
/**
|
||||
* 获得时间
|
||||
*/
|
||||
@TableField("earned_time")
|
||||
private LocalDateTime earnedTime;
|
||||
|
||||
/**
|
||||
* 是否新获得
|
||||
*/
|
||||
@TableField("is_new")
|
||||
private Integer isNew;
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
package com.emotion.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
|
||||
import com.emotion.common.BaseEntity;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Social content voluntarily imported by a user.
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@TableName(value = "t_social_content_item", autoResultMap = true)
|
||||
public class SocialContentItem extends BaseEntity {
|
||||
|
||||
@TableField("user_id")
|
||||
private String userId;
|
||||
|
||||
@TableField("platform")
|
||||
private String platform;
|
||||
|
||||
@TableField("source_type")
|
||||
private String sourceType;
|
||||
|
||||
@TableField("source_url")
|
||||
private String sourceUrl;
|
||||
|
||||
@TableField("title")
|
||||
private String title;
|
||||
|
||||
@TableField("content")
|
||||
private String content;
|
||||
|
||||
@TableField(value = "image_urls", typeHandler = JacksonTypeHandler.class)
|
||||
private List<String> imageUrls;
|
||||
|
||||
@TableField("published_at")
|
||||
private LocalDateTime publishedAt;
|
||||
|
||||
@TableField("import_status")
|
||||
private String importStatus;
|
||||
|
||||
@TableField("approved_for_ai")
|
||||
private Integer approvedForAi;
|
||||
|
||||
@TableField("content_hash")
|
||||
private String contentHash;
|
||||
|
||||
@TableField(value = "raw_metadata", typeHandler = JacksonTypeHandler.class)
|
||||
private Map<String, Object> rawMetadata;
|
||||
|
||||
@TableField("deleted_at")
|
||||
private LocalDateTime deletedAt;
|
||||
}
|
||||
@@ -0,0 +1,58 @@
|
||||
package com.emotion.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.emotion.common.BaseEntity;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* User-reviewable insight extracted from imported social content.
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@TableName("t_social_profile_insight")
|
||||
public class SocialProfileInsight extends BaseEntity {
|
||||
|
||||
@TableField("user_id")
|
||||
private String userId;
|
||||
|
||||
@TableField("source_item_id")
|
||||
private String sourceItemId;
|
||||
|
||||
@TableField("insight_type")
|
||||
private String insightType;
|
||||
|
||||
@TableField("label")
|
||||
private String label;
|
||||
|
||||
@TableField("summary")
|
||||
private String summary;
|
||||
|
||||
@TableField("evidence_excerpt")
|
||||
private String evidenceExcerpt;
|
||||
|
||||
@TableField("confidence")
|
||||
private BigDecimal confidence;
|
||||
|
||||
@TableField("status")
|
||||
private String status;
|
||||
|
||||
@TableField("user_edited")
|
||||
private Integer userEdited;
|
||||
|
||||
@TableField("confirmed_at")
|
||||
private LocalDateTime confirmedAt;
|
||||
|
||||
@TableField("deleted_at")
|
||||
private LocalDateTime deletedAt;
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
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;
|
||||
|
||||
/**
|
||||
* 系统配置实体
|
||||
*
|
||||
* @author system
|
||||
* @date 2026-06-27
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@TableName("t_system_config")
|
||||
public class SystemConfig extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 配置唯一标识
|
||||
*/
|
||||
@TableField("config_key")
|
||||
private String configKey;
|
||||
|
||||
/**
|
||||
* 配置值
|
||||
*/
|
||||
@TableField("config_value")
|
||||
private String configValue;
|
||||
|
||||
/**
|
||||
* 值类型: boolean/string/number/json
|
||||
*/
|
||||
@TableField("value_type")
|
||||
private String valueType;
|
||||
|
||||
/**
|
||||
* 配置分组: system/login/notification
|
||||
*/
|
||||
@TableField("config_group")
|
||||
private String configGroup;
|
||||
|
||||
/**
|
||||
* 显示名称
|
||||
*/
|
||||
@TableField("config_name")
|
||||
private String configName;
|
||||
|
||||
/**
|
||||
* 配置说明
|
||||
*/
|
||||
@TableField("description")
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 排序号
|
||||
*/
|
||||
@TableField("sort_order")
|
||||
private Integer sortOrder;
|
||||
|
||||
/**
|
||||
* 是否在管理后台可见: 0-隐藏, 1-显示
|
||||
*/
|
||||
@TableField("is_visible")
|
||||
private Integer isVisible;
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
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_topic_interaction")
|
||||
public class TopicInteraction extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 课题ID
|
||||
*/
|
||||
@TableField("topic_id")
|
||||
private String topicId;
|
||||
|
||||
/**
|
||||
* 互动类型
|
||||
*/
|
||||
@TableField("type")
|
||||
private String type;
|
||||
|
||||
/**
|
||||
* 内容
|
||||
*/
|
||||
@TableField("content")
|
||||
private String content;
|
||||
|
||||
/**
|
||||
* 用户输入
|
||||
*/
|
||||
@TableField("user_input")
|
||||
private String userInput;
|
||||
|
||||
/**
|
||||
* AI回应
|
||||
*/
|
||||
@TableField("ai_response")
|
||||
private String aiResponse;
|
||||
|
||||
/**
|
||||
* 评分
|
||||
*/
|
||||
@TableField("rating")
|
||||
private Integer rating;
|
||||
|
||||
/**
|
||||
* 反馈
|
||||
*/
|
||||
@TableField("feedback")
|
||||
private String feedback;
|
||||
|
||||
/**
|
||||
* 完成时间
|
||||
*/
|
||||
@TableField("completed_time")
|
||||
private LocalDateTime completedTime;
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
package com.emotion.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.emotion.common.BaseEntity;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@TableName("t_tts_task")
|
||||
public class TtsTask extends BaseEntity {
|
||||
|
||||
@TableField("user_id")
|
||||
private String userId;
|
||||
|
||||
@TableField("source_type")
|
||||
private String sourceType;
|
||||
|
||||
@TableField("source_id")
|
||||
private String sourceId;
|
||||
|
||||
@TableField("text_hash")
|
||||
private String textHash;
|
||||
|
||||
@TableField("text_length")
|
||||
private Integer textLength;
|
||||
|
||||
@TableField("voice")
|
||||
private String voice;
|
||||
|
||||
@TableField("status")
|
||||
private String status;
|
||||
|
||||
@TableField("audio_url")
|
||||
private String audioUrl;
|
||||
|
||||
@TableField("audio_path")
|
||||
private String audioPath;
|
||||
|
||||
@TableField("duration_ms")
|
||||
private Long durationMs;
|
||||
|
||||
@TableField("error_message")
|
||||
private String errorMessage;
|
||||
|
||||
@TableField("request_count")
|
||||
private Integer requestCount;
|
||||
}
|
||||
@@ -0,0 +1,162 @@
|
||||
package com.emotion.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.emotion.common.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.AllArgsConstructor;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 用户实体类
|
||||
*
|
||||
* @author huazhongmin
|
||||
* @date 2025-07-23
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@TableName("t_user")
|
||||
public class User extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 账号
|
||||
*/
|
||||
@TableField("account")
|
||||
private String account;
|
||||
|
||||
/**
|
||||
* 密码(加密后)
|
||||
*/
|
||||
@TableField("password")
|
||||
private String password;
|
||||
|
||||
/**
|
||||
* 用户名
|
||||
*/
|
||||
@TableField("username")
|
||||
private String username;
|
||||
|
||||
/**
|
||||
* 邮箱
|
||||
*/
|
||||
@TableField("email")
|
||||
private String email;
|
||||
|
||||
/**
|
||||
* 手机号
|
||||
*/
|
||||
@TableField("phone")
|
||||
private String phone;
|
||||
|
||||
/**
|
||||
* 头像URL
|
||||
*/
|
||||
@TableField("avatar")
|
||||
private String avatar;
|
||||
|
||||
/**
|
||||
* 昵称
|
||||
*/
|
||||
@TableField("nickname")
|
||||
private String nickname;
|
||||
|
||||
/**
|
||||
* 生日
|
||||
*/
|
||||
@TableField("birth_date")
|
||||
private LocalDate birthDate;
|
||||
|
||||
/**
|
||||
* 所在地
|
||||
*/
|
||||
@TableField("location")
|
||||
private String location;
|
||||
|
||||
/**
|
||||
* 个人简介
|
||||
*/
|
||||
@TableField("bio")
|
||||
private String bio;
|
||||
|
||||
/**
|
||||
* 会员等级
|
||||
*/
|
||||
@TableField("member_level")
|
||||
private String memberLevel;
|
||||
|
||||
/**
|
||||
* 使用天数
|
||||
*/
|
||||
@TableField("total_days")
|
||||
private Integer totalDays;
|
||||
|
||||
/**
|
||||
* 自我感知
|
||||
*/
|
||||
@TableField("self_awareness")
|
||||
private BigDecimal selfAwareness;
|
||||
|
||||
/**
|
||||
* 情绪韧性
|
||||
*/
|
||||
@TableField("emotional_resilience")
|
||||
private BigDecimal emotionalResilience;
|
||||
|
||||
/**
|
||||
* 行动力
|
||||
*/
|
||||
@TableField("action_power")
|
||||
private BigDecimal actionPower;
|
||||
|
||||
/**
|
||||
* 共情力
|
||||
*/
|
||||
@TableField("empathy")
|
||||
private BigDecimal empathy;
|
||||
|
||||
/**
|
||||
* 生活热度
|
||||
*/
|
||||
@TableField("life_enthusiasm")
|
||||
private BigDecimal lifeEnthusiasm;
|
||||
|
||||
/**
|
||||
* 状态: 0-禁用, 1-正常
|
||||
*/
|
||||
@TableField("status")
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 是否已验证: 0-未验证, 1-已验证
|
||||
*/
|
||||
@TableField("is_verified")
|
||||
private Integer isVerified;
|
||||
|
||||
/**
|
||||
* 最后活跃时间
|
||||
*/
|
||||
@TableField("last_active_time")
|
||||
private LocalDateTime lastActiveTime;
|
||||
|
||||
/**
|
||||
* 第三方平台ID
|
||||
*/
|
||||
@TableField("third_party_id")
|
||||
private String thirdPartyId;
|
||||
|
||||
/**
|
||||
* 第三方平台类型
|
||||
*/
|
||||
@TableField("third_party_type")
|
||||
private String thirdPartyType;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
package com.emotion.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
|
||||
import com.emotion.common.BaseEntity;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Consent and revocation audit record for user data usage.
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@TableName(value = "t_user_consent_log", autoResultMap = true)
|
||||
public class UserConsentLog extends BaseEntity {
|
||||
|
||||
@TableField("user_id")
|
||||
private String userId;
|
||||
|
||||
@TableField("platform")
|
||||
private String platform;
|
||||
|
||||
@TableField("consent_type")
|
||||
private String consentType;
|
||||
|
||||
@TableField("consent_version")
|
||||
private String consentVersion;
|
||||
|
||||
@TableField("scope")
|
||||
private String scope;
|
||||
|
||||
@TableField("purpose")
|
||||
private String purpose;
|
||||
|
||||
@TableField("status")
|
||||
private String status;
|
||||
|
||||
@TableField("granted_at")
|
||||
private LocalDateTime grantedAt;
|
||||
|
||||
@TableField("revoked_at")
|
||||
private LocalDateTime revokedAt;
|
||||
|
||||
@TableField("client_ip")
|
||||
private String clientIp;
|
||||
|
||||
@TableField(value = "device_info", typeHandler = JacksonTypeHandler.class)
|
||||
private Map<String, Object> deviceInfo;
|
||||
}
|
||||
@@ -0,0 +1,177 @@
|
||||
package com.emotion.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.emotion.common.BaseEntity;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
import java.time.LocalDate;
|
||||
|
||||
/**
|
||||
* 用户档案实体类
|
||||
*
|
||||
* @author huazhongmin
|
||||
* @date 2025-12-21
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@TableName("t_user_profile")
|
||||
public class UserProfile extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 用户ID (关联t_user.id)
|
||||
*/
|
||||
@TableField("user_id")
|
||||
private String userId;
|
||||
|
||||
/**
|
||||
* 昵称
|
||||
*/
|
||||
@TableField("nickname")
|
||||
private String nickname;
|
||||
|
||||
/**
|
||||
* 性别: male, female, secret
|
||||
*/
|
||||
@TableField("gender")
|
||||
private String gender;
|
||||
|
||||
/**
|
||||
* 星座
|
||||
*/
|
||||
@TableField("zodiac")
|
||||
private String zodiac;
|
||||
|
||||
/**
|
||||
* 职业
|
||||
*/
|
||||
@TableField("profession")
|
||||
private String profession;
|
||||
|
||||
/**
|
||||
* MBTI人格类型
|
||||
*/
|
||||
@TableField("mbti")
|
||||
private String mbti;
|
||||
|
||||
/**
|
||||
* 兴趣爱好 (JSON字符串)
|
||||
*/
|
||||
@TableField("hobbies")
|
||||
private String hobbies;
|
||||
|
||||
/**
|
||||
* 童年经历日期
|
||||
*/
|
||||
@TableField("childhood_date")
|
||||
private LocalDate childhoodDate;
|
||||
|
||||
/**
|
||||
* 童年经历描述
|
||||
*/
|
||||
@TableField("childhood_content")
|
||||
private String childhoodContent;
|
||||
|
||||
/**
|
||||
* 高光时刻日期
|
||||
*/
|
||||
@TableField("peak_date")
|
||||
private LocalDate peakDate;
|
||||
|
||||
/**
|
||||
* 高光时刻描述
|
||||
*/
|
||||
@TableField("peak_content")
|
||||
private String peakContent;
|
||||
|
||||
/**
|
||||
* 低谷时期日期
|
||||
*/
|
||||
@TableField("valley_date")
|
||||
private LocalDate valleyDate;
|
||||
|
||||
/**
|
||||
* 低谷时期描述
|
||||
*/
|
||||
@TableField("valley_content")
|
||||
private String valleyContent;
|
||||
|
||||
/**
|
||||
* 未来期许
|
||||
*/
|
||||
@TableField("future_vision")
|
||||
private String futureVision;
|
||||
|
||||
/**
|
||||
* 理想生活状态
|
||||
*/
|
||||
@TableField("ideal_life")
|
||||
private String idealLife;
|
||||
|
||||
/**
|
||||
* 所在城市
|
||||
*/
|
||||
@TableField("city")
|
||||
private String city;
|
||||
|
||||
/**
|
||||
* 行业
|
||||
*/
|
||||
@TableField("industry")
|
||||
private String industry;
|
||||
|
||||
/**
|
||||
* 公司
|
||||
*/
|
||||
@TableField("company")
|
||||
private String company;
|
||||
|
||||
/**
|
||||
* 性格标签 (JSON字符串)
|
||||
*/
|
||||
@TableField("personality_tags")
|
||||
private String personalityTags;
|
||||
|
||||
/**
|
||||
* 用户完整性格标签库 (JSON字符串,含剩余预设 + 自定义)
|
||||
*/
|
||||
@TableField("personality_tag_library")
|
||||
private String personalityTagLibrary;
|
||||
|
||||
/**
|
||||
* 用户完整兴趣爱好库 (JSON字符串,含剩余预设 + 自定义)
|
||||
*/
|
||||
@TableField("hobby_library")
|
||||
private String hobbyLibrary;
|
||||
|
||||
/**
|
||||
* 生日
|
||||
*/
|
||||
@TableField("birthday")
|
||||
private LocalDate birthday;
|
||||
|
||||
/**
|
||||
* 生成的剧本列表 (JSON字符串)
|
||||
*/
|
||||
@TableField("scripts")
|
||||
private String scripts;
|
||||
|
||||
/**
|
||||
* 选择的路径列表 (JSON字符串)
|
||||
*/
|
||||
@TableField("paths")
|
||||
private String paths;
|
||||
|
||||
/**
|
||||
* 状态: 0-禁用, 1-正常
|
||||
*/
|
||||
@TableField("status")
|
||||
private Integer status;
|
||||
}
|
||||
@@ -0,0 +1,126 @@
|
||||
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;
|
||||
|
||||
/**
|
||||
* 用户统计实体类
|
||||
*
|
||||
* @author huazhongmin
|
||||
* @date 2025-07-23
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@TableName("t_user_stats")
|
||||
public class UserStats extends BaseEntity {
|
||||
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
@TableField("user_id")
|
||||
private String userId;
|
||||
|
||||
/**
|
||||
* 统计类型
|
||||
*/
|
||||
@TableField("stats_type")
|
||||
private String statsType;
|
||||
|
||||
/**
|
||||
* 统计值
|
||||
*/
|
||||
@TableField("value")
|
||||
private Double value;
|
||||
|
||||
/**
|
||||
* 周期
|
||||
*/
|
||||
@TableField("period")
|
||||
private String period;
|
||||
|
||||
/**
|
||||
* 总对话数
|
||||
*/
|
||||
@TableField("total_conversations")
|
||||
private Integer totalConversations;
|
||||
|
||||
/**
|
||||
* 总消息数
|
||||
*/
|
||||
@TableField("total_messages")
|
||||
private Integer totalMessages;
|
||||
|
||||
/**
|
||||
* 总情绪记录数
|
||||
*/
|
||||
@TableField("total_emotions_recorded")
|
||||
private Integer totalEmotionsRecorded;
|
||||
|
||||
/**
|
||||
* 完成的课题数
|
||||
*/
|
||||
@TableField("topics_completed")
|
||||
private Integer topicsCompleted;
|
||||
|
||||
/**
|
||||
* 解锁的成就数
|
||||
*/
|
||||
@TableField("achievements_unlocked")
|
||||
private Integer achievementsUnlocked;
|
||||
|
||||
/**
|
||||
* 总积分
|
||||
*/
|
||||
@TableField("total_points")
|
||||
private Integer totalPoints;
|
||||
|
||||
/**
|
||||
* 连续使用天数
|
||||
*/
|
||||
@TableField("consecutive_days")
|
||||
private Integer consecutiveDays;
|
||||
|
||||
/**
|
||||
* 最大连续天数
|
||||
*/
|
||||
@TableField("max_consecutive_days")
|
||||
private Integer maxConsecutiveDays;
|
||||
|
||||
/**
|
||||
* 访问的地点数
|
||||
*/
|
||||
@TableField("locations_visited")
|
||||
private Integer locationsVisited;
|
||||
|
||||
/**
|
||||
* 创建的帖子数
|
||||
*/
|
||||
@TableField("posts_created")
|
||||
private Integer postsCreated;
|
||||
|
||||
/**
|
||||
* 评论数
|
||||
*/
|
||||
@TableField("comments_made")
|
||||
private Integer commentsMade;
|
||||
|
||||
/**
|
||||
* 收到的点赞数
|
||||
*/
|
||||
@TableField("likes_received")
|
||||
private Integer likesReceived;
|
||||
|
||||
/**
|
||||
* 社交互动数
|
||||
*/
|
||||
@TableField("social_interactions")
|
||||
private Integer socialInteractions;
|
||||
}
|
||||
Reference in New Issue
Block a user