huoyan-enterprise/backend/models/graph_metadata.py

21 lines
567 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

"""
知识图谱元数据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