| | |
| | | import lombok.NoArgsConstructor; |
| | | import org.bson.types.ObjectId; |
| | | import org.springframework.data.annotation.Id; |
| | | import org.springframework.data.mongodb.core.index.Indexed; |
| | | import org.springframework.data.mongodb.core.mapping.Document; |
| | | |
| | | /** |
| | | * @author :yys |
| | | * @date : 2025/5/2 19:13 |
| | | */ |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @AllArgsConstructor |
| | | @NoArgsConstructor |
| | | @Document("chat_messages") |
| | | public class ChatMessages { |
| | | //唯一标识,映射到 MongoDB 文档的 _id 字段 |
| | | |
| | | @Id |
| | | private ObjectId id; |
| | | |
| | | private String messageId; |
| | | @Indexed(unique = true) |
| | | private String memoryId; |
| | | |
| | | private String content; //存储当前聊天记录列表的json字符串 |
| | | private String content; |
| | | |
| | | private Date createTime; |
| | | |
| | | private Date updateTime; |
| | | } |