Files
FastapiAdmin/backend/app/api/v1/models/gen_code/table_model.py
T
zhangtao ecec6ceadb feat: 新增MCP服务器和客户端功能,支持AI工具调用和天气查询
refactor: 重构基础模型和响应类,增加success字段

fix: 修复定时任务日志记录和异常处理问题

style: 调整中间件日志记录逻辑,优化参数处理

docs: 更新数据库配置和依赖项说明

perf: 优化文件上传服务,支持OSS存储

test: 添加定时任务日志模型和参数验证

chore: 更新依赖项,添加openai库支持
2025-08-30 13:22:48 +08:00

45 lines
1.7 KiB
Python

# -*- coding:utf-8 -*-
import datetime
from sqlalchemy import Boolean, Column, ForeignKey, String, Integer, Text, DateTime
from app.core.base_model import BaseMixin
class SysTable(BaseMixin):
__tablename__ = "gen_table"
id = Column(Integer, primary_key=True, autoincrement=True)
create_time = Column(DateTime, nullable=False, default=datetime.datetime.now, comment='创建时间')
update_time = Column(DateTime, nullable=False, default=datetime.datetime.now, onupdate=datetime.datetime.now, index=True, comment='更新时间')
del_flag = Column(String(1), nullable=False, default='0', server_default=text("'0'"), comment='删除标志(0代表存在 2代表删除)')
align = Column(String(255), nullable=False, default='left', comment='对其方式')
field_name = Column(String(255), nullable=False, comment='字段名')
fixed = Column(String(1), nullable=False, default='0', comment='固定表头')
label = Column(String(255), nullable=False, comment='字段标签')
label_tip = Column(String(255), comment='字段标签解释')
prop = Column(String(255), nullable=False, comment='驼峰属性')
show = Column(String(1), nullable=False, default='1', comment='可见')
sortable = Column(String(1), nullable=False, default='0', comment='可排序')
table_name = Column(String(255), nullable=False, comment='表名')
tooltip = Column(String(1), nullable=False, default='1', comment='超出隐藏')
update_by = Column(Integer, comment='更新者')
update_by_name = Column(String(255), comment='更新者')
width = Column(Integer, nullable=False, default=150, comment='宽度')
sequence = Column(Integer, nullable=False, default=0, comment='字段顺序')