Fix EntityAttribute dataclass to include name, type, and options fields
This commit is contained in:
@@ -67,13 +67,20 @@ class EntityAttribute:
|
|||||||
"""实体属性值"""
|
"""实体属性值"""
|
||||||
id: str
|
id: str
|
||||||
entity_id: str
|
entity_id: str
|
||||||
template_id: str
|
template_id: Optional[str] = None
|
||||||
value: str
|
name: str = "" # 属性名称
|
||||||
|
type: str = "text" # 属性类型
|
||||||
|
value: str = ""
|
||||||
|
options: List[str] = None # 选项列表
|
||||||
template_name: str = "" # 关联查询时填充
|
template_name: str = "" # 关联查询时填充
|
||||||
template_type: str = "" # 关联查询时填充
|
template_type: str = "" # 关联查询时填充
|
||||||
created_at: str = ""
|
created_at: str = ""
|
||||||
updated_at: str = ""
|
updated_at: str = ""
|
||||||
|
|
||||||
|
def __post_init__(self):
|
||||||
|
if self.options is None:
|
||||||
|
self.options = []
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
class AttributeHistory:
|
class AttributeHistory:
|
||||||
"""属性变更历史"""
|
"""属性变更历史"""
|
||||||
|
|||||||
Reference in New Issue
Block a user