mirror of
https://github.com/fastapiadmin/FastapiAdmin.git
synced 2026-09-21 20:55:14 +00:00
chore: 批量整理代码格式与优化细节
- 修复多处代码缩进、换行不规范问题 - 调整部分配置注释与字符串格式对齐 - 优化导入语句与多行表达式的排版 - 统一枚举、模型字段的注释风格 - 调整部分校验逻辑与提示文案 - 重构部分长函数参数与查询语句格式
This commit is contained in:
@@ -18,9 +18,7 @@ class DictTypeModel(ModelMixin, TenantMixin):
|
||||
__platform_data_shared__: bool = True
|
||||
|
||||
dict_name: Mapped[str] = mapped_column(String(64), nullable=False, comment="字典名称")
|
||||
dict_type: Mapped[str] = mapped_column(
|
||||
String(255), nullable=False, comment="字典类型"
|
||||
)
|
||||
dict_type: Mapped[str] = mapped_column(String(255), nullable=False, comment="字典类型")
|
||||
|
||||
# 关系定义
|
||||
dict_data_list: Mapped[list["DictDataModel"]] = relationship(
|
||||
@@ -39,7 +37,10 @@ class DictDataModel(ModelMixin, TenantMixin):
|
||||
"""
|
||||
|
||||
__tablename__: str = "sys_dict_data"
|
||||
__table_args__: dict[str, str] = {"comment": "字典数据表"}
|
||||
__table_args__ = (
|
||||
UniqueConstraint("tenant_id", "dict_type_id", "dict_value", name="uq_dict_data_value"),
|
||||
{"comment": "字典数据表"},
|
||||
)
|
||||
__loader_options__: list[str] = []
|
||||
__platform_data_shared__: bool = True
|
||||
|
||||
|
||||
Reference in New Issue
Block a user