hulai-admin-api/app/models/site_image.py
刘涛 8c0a5f489d Initial commit: hulai admin API backend
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-22 22:01:23 +08:00

18 行
797 B
Python

此文件含有模棱两可的 Unicode 字符

此文件含有可能会与其他字符混淆的 Unicode 字符。 如果您是想特意这样的,可以安全地忽略该警告。 使用 Escape 按钮显示他们。

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) # 说明