18 行
797 B
Python
18 行
797 B
Python
from __future__ import annotations
|
||
from sqlalchemy import Column, Integer, String, Text
|
||
|
||
from app.database import Base
|
||
|
||
|
||
class SiteImage(Base):
|
||
"""网站图片配置 - 每张图片一条记录,用 group + key 标识"""
|
||
__tablename__ = "site_images"
|
||
|
||
id = Column(Integer, primary_key=True, autoincrement=True)
|
||
group_name = Column(String(50), nullable=False) # logo, hero, mascot, team, etc.
|
||
image_key = Column(String(50), nullable=False) # main, background, front, etc.
|
||
image_path = Column(String(500), nullable=False) # /images/logo.png
|
||
label = Column(String(100)) # 显示名称:品牌Logo
|
||
size_hint = Column(String(100)) # 建议尺寸:200x200px
|
||
description = Column(Text) # 说明
|