mirror of
https://github.com/fastapiadmin/FastapiAdmin.git
synced 2026-09-23 13:13:09 +00:00
此次提交进行了大规模的架构重构: 1. 移除所有平台租户相关模块和代码,包括租户管理、套餐、订单、发票等功能 2. 将菜单模块从platform迁移到system模块,统一系统功能入口 3. 移除租户隔离相关的模型混入、中间件和配置 4. 简化文件上传、SSE事件总线、定时任务等模块的租户逻辑 5. 重构所有业务schema和模型,移除租户相关字段和关联 6. 清理初始化脚本、模板和常量中的租户相关代码 7. 简化认证和权限控制逻辑,移除数据范围检查相关代码
22 lines
1.2 KiB
Python
22 lines
1.2 KiB
Python
from sqlalchemy import Boolean, Integer, String, Text
|
|
from sqlalchemy.orm import Mapped, mapped_column
|
|
|
|
from app.core.base_model import ModelMixin, UserMixin
|
|
|
|
|
|
class VersionModel(ModelMixin, UserMixin):
|
|
"""版本管理(平台级)"""
|
|
|
|
__tablename__: str = "sys_version"
|
|
__table_args__: dict[str, str] = {"comment": "版本管理表"}
|
|
__loader_options__: list[str] = ["created_by", "updated_by", "deleted_by"]
|
|
|
|
version: Mapped[str] = mapped_column(String(50), nullable=False, comment="版本号")
|
|
title: Mapped[str] = mapped_column(String(200), nullable=False, comment="版本标题")
|
|
date: Mapped[str] = mapped_column(String(50), nullable=False, comment="发布日期")
|
|
content: Mapped[str | None] = mapped_column(Text, nullable=True, default=None, comment="版本富文本内容")
|
|
sort: Mapped[int] = mapped_column(Integer, default=0, nullable=False, comment="排序")
|
|
status: Mapped[int] = mapped_column(Integer, default=0, nullable=False, comment="状态: 0=草稿,1=已发布,2=已回滚")
|
|
description: Mapped[str | None] = mapped_column(String(500), nullable=True, default=None, comment="备注")
|
|
require_re_login: Mapped[bool] = mapped_column(Boolean, default=False, nullable=False, comment="是否需要重新登录")
|