mirror of
https://github.com/fastapiadmin/FastapiAdmin.git
synced 2026-09-20 20:39:55 +00:00
- 重构代码生成模板,统一路由前缀和业务路径规范 - 优化数据库表分页查询性能,支持方言特定实现 - 新增同步数据库差异预览功能 - 调整字段配置界面,支持拖拽排序和批量设置 - 清理旧版示例代码和冗余配置 - 修复权限和路由嵌套路径处理问题 - 优化前端样式和交互细节
19 lines
519 B
Python
19 lines
519 B
Python
|
|
from sqlalchemy import String
|
|
from sqlalchemy.orm import Mapped, mapped_column
|
|
|
|
from app.core.base_model import ModelMixin, UserMixin
|
|
|
|
|
|
class Demo01Model(ModelMixin, UserMixin):
|
|
"""
|
|
示例表 - 涵盖大多数常用数据类型
|
|
"""
|
|
|
|
__tablename__: str = "gen_demo01"
|
|
__table_args__: dict[str, str] = {"comment": "示例1表"}
|
|
__loader_options__: list[str] = ["created_by", "updated_by"]
|
|
|
|
# 字符串类型
|
|
name: Mapped[str] = mapped_column(String(64), nullable=False, comment="名称")
|