增加对上传图片文件名称的校验

This commit is contained in:
2025-02-25 17:21:41 +08:00
parent 7b7548f896
commit baadf6c197
5 changed files with 31 additions and 0 deletions

View File

@ -38,6 +38,7 @@ class ProjectLabel(DbCommon):
class ProjectImage(DbCommon):
"""项目图片表"""
__tablename__ = "project_image"
file_name: Mapped[str] = mapped_column(String(64), nullable=False)
image_url: Mapped[str] = mapped_column(String(255), nullable=False)
thumb_image_url: Mapped[str] = mapped_column(String(255), nullable=False)
project_id: Mapped[int] = mapped_column(Integer)