feat: restore source parity and harden agent runtime
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
大屏设计器数据模型
|
||||
"""
|
||||
from sqlalchemy import Column, String, Text, Integer, JSON, DateTime
|
||||
|
||||
from app.base_model import BaseModel
|
||||
|
||||
|
||||
class ScreenProject(BaseModel):
|
||||
"""大屏项目"""
|
||||
__tablename__ = "screen_project"
|
||||
|
||||
# 所属应用(逻辑外键关联 core_application)
|
||||
application_id = Column(String(21), nullable=True, index=True, comment="所属应用ID")
|
||||
|
||||
name = Column(String(100), nullable=False, comment="项目名称")
|
||||
code = Column(String(100), unique=True, index=True, nullable=False, comment="项目编码")
|
||||
description = Column(Text, default='', comment="项目描述")
|
||||
status = Column(String(20), default='draft', comment="状态: draft/published")
|
||||
version = Column(Integer, default=1, comment="版本号")
|
||||
|
||||
# 缩略图
|
||||
thumbnail = Column(Text, default='', comment="缩略图(Base64或URL)")
|
||||
|
||||
# 大屏配置(存储完整的设计器配置)
|
||||
screen_config = Column(JSON, default=dict, comment="大屏设计配置")
|
||||
|
||||
# 发布相关
|
||||
access_password = Column(String(100), default='', comment="访问密码")
|
||||
published_at = Column(DateTime, nullable=True, comment="发布时间")
|
||||
|
||||
def __repr__(self):
|
||||
return f"<ScreenProject {self.name} ({self.code})>"
|
||||
Reference in New Issue
Block a user