21 lines
567 B
Python
21 lines
567 B
Python
"""
|
||
知识图谱元数据(graphs 表)企业版权限字段,与 knowledge_base 对齐。
|
||
"""
|
||
from typing import Optional
|
||
|
||
from pydantic import BaseModel, Field
|
||
|
||
|
||
class GraphRecord(BaseModel):
|
||
"""用于可见性判断的最小行快照(来自 graphs / star_graph)。"""
|
||
|
||
id: int
|
||
user_id: int
|
||
enterprise_id: Optional[int] = None
|
||
department_id: Optional[int] = None
|
||
creator_id: Optional[int] = None
|
||
visibility: str = Field("private", description="private | department | enterprise")
|
||
|
||
class Config:
|
||
from_attributes = True
|