mirror of
https://github.com/fastapiadmin/FastapiAdmin.git
synced 2026-09-26 14:23:48 +00:00
feat(backend): 新增模块示例和路径配置 fix(backend): 修复菜单模型名称唯一性约束 refactor(backend): 重构日志模块和路径配置 style(backend): 统一API方法命名规范 refactor(frontend): 重构API方法命名规范 fix(frontend): 修复权限校验问题 refactor: 移动定时任务测试文件到正确模块 docs: 更新模板文件路径 refactor: 优化日志记录和错误处理 fix: 修复排序默认值问题
19 lines
603 B
Python
19 lines
603 B
Python
# -*- coding: utf-8 -*-
|
|
|
|
from typing import Optional
|
|
from sqlalchemy import Boolean, String
|
|
from sqlalchemy.orm import Mapped, mapped_column
|
|
|
|
from app.core.base_model import CreatorMixin
|
|
|
|
|
|
class DemoModel(CreatorMixin):
|
|
"""
|
|
示例表
|
|
"""
|
|
__tablename__ = 'gen_demo'
|
|
__table_args__ = ({'comment': '示例表'})
|
|
__loader_options__ = ["creator"]
|
|
|
|
name: Mapped[Optional[str]] = mapped_column(String(64), nullable=True, default='', comment='名称')
|
|
status: Mapped[bool] = mapped_column(Boolean(), default=True, nullable=False, comment="是否启用(True:启用 False:禁用)") |