[feature]开发用户记忆详情的接口 * memory-summary: (69 commits squashed) - [feature]Memory Insights and User Summary Cache Storage Ingestion - [featrue]Develop a memory classification interface - [feature]Memory Insights and User Summary Cache Storage Ingestion - [featrue]Develop a memory classification interface - Merge branch 'memory-summary' of codeup.aliyun.com:redbearai/python/redbear-mem-open into memory-summary - [feature]Develop the relationship graph interface - [feature]Memory Insights and User Summary Cache Storage Ingestion - [featrue]Develop a memory classification interface - [feature]Memory Insights and User Summary Cache Storage Ingestion - [featrue]Develop a memory classification interface - [feature]Develop the relationship graph interface - Merge branch 'memory-summary' of codeup.aliyun.com:redbearai/python/redbear-mem-open into memory-summary - [feature]Develop the end_user/profile interface - [feature]Memory Insights and User Summary Cache Storage Ingestion - [feature]Memory Insights and User Summary Cache Storage Ingestion - [featrue]Develop a memory classification interface - [feature]Develop the relationship graph interface - [feature]Develop the end_user/profile interface - Merge branch 'memory-summary' of codeup.aliyun.com:redbearai/python/redbear-mem-open into memory-summary - [updated]Base change operation - [refactor]1.Convert timestamp;2.Remove unnecessary code - [feature]Memory Insights and User Summary Cache Storage Ingestion - [featrue]Develop a memory classification interface - [feature]Memory Insights and User Summary Cache Storage Ingestion - [featrue]Develop a memory classification interface - [feature]Develop the relationship graph interface - [feature]Memory Insights and User Summary Cache Storage Ingestion - [feature]Memory Insights and User Summary Cache Storage Ingestion - [featrue]Develop a memory classification interface - [feature]Develop the relationship graph interface - [feature]Develop the end_user/profile interface - [feature]Memory Insights and User Summary Cache Storage Ingestion - [feature]Develop the relationship graph interface - [feature]Develop the end_user/profile interface - [updated]Base change operation - [refactor]1.Convert timestamp;2.Remove unnecessary code - Merge branch 'memory-summary' of codeup.aliyun.com:redbearai/python/redbear-mem-open into memory-summary - [check]check_code.py checks the quality of the code - [fix]Fix insecure database connections - [refactor]refactor memory_storage_controller and memory_storage_service - [add]The /total_memory_count interface returns the "name" field. - [feature]Memory Insights and User Summary Cache Storage Ingestion - [featrue]Develop a memory classification interface - [feature]Memory Insights and User Summary Cache Storage Ingestion - [featrue]Develop a memory classification interface - [feature]Develop the relationship graph interface - [feature]Memory Insights and User Summary Cache Storage Ingestion - [feature]Memory Insights and User Summary Cache Storage Ingestion - [featrue]Develop a memory classification interface - [feature]Develop the relationship graph interface - [feature]Develop the end_user/profile interface - [feature]Memory Insights and User Summary Cache Storage Ingestion - [feature]Develop the relationship graph interface - [feature]Develop the end_user/profile interface - [updated]Base change operation - [refactor]1.Convert timestamp;2.Remove unnecessary code - [feature]Memory Insights and User Summary Cache Storage Ingestion - [featrue]Develop a memory classification interface - [feature]Develop the relationship graph interface - [feature]Develop the end_user/profile interface - [updated]Base change operation - [refactor]1.Convert timestamp;2.Remove unnecessary code - [check]check_code.py checks the quality of the code - [fix]Fix insecure database connections - [refactor]refactor memory_storage_controller and memory_storage_service - [add]The /total_memory_count interface returns the "name" field. - Merge branch 'memory-summary' of codeup.aliyun.com:redbearai/python/redbear-mem-open into memory-summary - [refactor]Reconstruct the user's memory location - add uv.lock Signed-off-by: 乐力齐 <accounts_690c7b0af9007d7e338af636@mail.teambition.com> Reviewed-by: aliyun6762716068 <accounts_68cb7c6b61f5dcc4200d6251@mail.teambition.com> Merged-by: aliyun6762716068 <accounts_68cb7c6b61f5dcc4200d6251@mail.teambition.com> CR-link: https://codeup.aliyun.com/redbearai/python/redbear-mem-open/change/31
52 lines
2.9 KiB
Python
52 lines
2.9 KiB
Python
import uuid
|
|
import datetime
|
|
from typing import Optional
|
|
from pydantic import BaseModel, Field
|
|
from pydantic import ConfigDict
|
|
|
|
class EndUser(BaseModel):
|
|
model_config = ConfigDict(from_attributes=True)
|
|
|
|
id: uuid.UUID = Field(description="终端用户ID")
|
|
app_id: uuid.UUID = Field(description="应用ID")
|
|
# end_user_id: str = Field(description="终端用户ID")
|
|
other_id: Optional[str] = Field(description="第三方ID", default=None)
|
|
other_name: Optional[str] = Field(description="其他名称", default="")
|
|
other_address: Optional[str] = Field(description="其他地址", default="")
|
|
reflection_time: Optional[datetime.datetime] = Field(description="反思时间", default_factory=datetime.datetime.now)
|
|
created_at: datetime.datetime = Field(description="创建时间", default_factory=datetime.datetime.now)
|
|
updated_at: datetime.datetime = Field(description="更新时间", default_factory=datetime.datetime.now)
|
|
|
|
# 用户基本信息字段
|
|
name: Optional[str] = Field(description="姓名", default=None)
|
|
position: Optional[str] = Field(description="职位", default=None)
|
|
department: Optional[str] = Field(description="部门", default=None)
|
|
contact: Optional[str] = Field(description="联系方式", default=None)
|
|
phone: Optional[str] = Field(description="电话", default=None)
|
|
hire_date: Optional[int] = Field(description="入职日期(时间戳,毫秒)", default=None)
|
|
updatetime_profile: Optional[int] = Field(description="核心档案信息最后更新时间(时间戳,毫秒)", default=None)
|
|
|
|
|
|
class EndUserProfileResponse(BaseModel):
|
|
"""终端用户基本信息响应模型"""
|
|
model_config = ConfigDict(from_attributes=True)
|
|
|
|
id: uuid.UUID = Field(description="终端用户ID")
|
|
name: Optional[str] = Field(description="姓名", default=None)
|
|
position: Optional[str] = Field(description="职位", default=None)
|
|
department: Optional[str] = Field(description="部门", default=None)
|
|
contact: Optional[str] = Field(description="联系方式", default=None)
|
|
phone: Optional[str] = Field(description="电话", default=None)
|
|
hire_date: Optional[int] = Field(description="入职日期(时间戳,毫秒)", default=None)
|
|
updatetime_profile: Optional[int] = Field(description="核心档案信息最后更新时间(时间戳,毫秒)", default=None)
|
|
|
|
|
|
class EndUserProfileUpdate(BaseModel):
|
|
"""终端用户基本信息更新请求模型"""
|
|
end_user_id: str = Field(description="终端用户ID")
|
|
name: Optional[str] = Field(description="姓名", default=None)
|
|
position: Optional[str] = Field(description="职位", default=None)
|
|
department: Optional[str] = Field(description="部门", default=None)
|
|
contact: Optional[str] = Field(description="联系方式", default=None)
|
|
phone: Optional[str] = Field(description="电话", default=None)
|
|
hire_date: Optional[int] = Field(description="入职日期(时间戳,毫秒)", default=None) |