mirror of
https://github.com/fastapiadmin/FastapiAdmin.git
synced 2026-09-24 05:26:58 +00:00
- 修复多处代码缩进、换行不规范问题 - 调整部分配置注释与字符串格式对齐 - 优化导入语句与多行表达式的排版 - 统一枚举、模型字段的注释风格 - 调整部分校验逻辑与提示文案 - 重构部分长函数参数与查询语句格式
18 lines
558 B
Python
18 lines
558 B
Python
from sqlalchemy import String
|
|
from sqlalchemy.orm import Mapped, mapped_column
|
|
|
|
from app.core.base_model import ModelMixin, TenantMixin, UserMixin
|
|
|
|
|
|
class Demo01Model(ModelMixin, TenantMixin, UserMixin):
|
|
"""
|
|
示例表 - 涵盖大多数常用数据类型
|
|
"""
|
|
|
|
__tablename__: str = "gen_demo01"
|
|
__table_args__: dict[str, str] = {"comment": "示例1表"}
|
|
__loader_options__: list[str] = ["created_by", "updated_by", "deleted_by"]
|
|
|
|
# 字符串类型
|
|
name: Mapped[str] = mapped_column(String(64), nullable=False, comment="名称")
|