mirror of
https://github.com/fastapiadmin/FastapiAdmin.git
synced 2026-09-20 20:39:55 +00:00
refactor: 更新配置模型字段长度以支持更长的值
This commit is contained in:
@@ -17,16 +17,16 @@ class ConfigModel(ModelBase):
|
||||
# 基础字段
|
||||
id = Column(Integer, primary_key=True, autoincrement=True, unique=True, comment='主键ID')
|
||||
|
||||
title = Column(String(40), nullable=False, default="FastAPI Vue Admin", comment="网站标题")
|
||||
favicon = Column(String(100), nullable=False, default="http://localhost:8000/api/v1/static/upload/image/png/2025/01/09/logo_20250109090456A114.png", comment="网站favicon")
|
||||
logo = Column(String(100), nullable=False, default="http://localhost:8000/api/v1/static/upload/image/png/2025/01/09/logo_20250109090448A263.png", comment="网站logo")
|
||||
background = Column(String(100), nullable=False, default="http://localhost:8000/api/v1/static/upload/image/png/2025/01/09/background_20250109090435A357.png", comment="网站背景")
|
||||
copyright = Column(String(100), nullable=False, default="Copyright © 2021-2025 fastapi-vue-admin.com 版权所有", comment="版权信息")
|
||||
keep_record = Column(String(100), nullable=False, default="晋ICP备18005113号-3", comment="备案信息")
|
||||
help_url = Column(String(100), nullable=False, default="https://django-vue-admin.com", comment="帮助链接")
|
||||
privacy_url = Column(String(100), nullable=False, default="https://gitee.com/tao__tao/fastapi_vue3_admin/blob/main/docs/clause/privacy.md", comment="隐私政策链接")
|
||||
clause_url = Column(String(100), nullable=False, default="https://gitee.com/tao__tao/fastapi_vue3_admin/blob/main/docs/clause/terms_service.md", comment="服务条款链接")
|
||||
code_url = Column(String(100), nullable=False, default="https://gitee.com/tao__tao/fastapi_vue3_admin.git", comment="源码地址")
|
||||
title = Column(String(100), nullable=False, default="FastAPI Vue Admin", comment="网站标题")
|
||||
favicon = Column(String(500), nullable=False, default="http://localhost:8000/api/v1/static/upload/image/png/2025/01/09/logo_20250109090456A114.png", comment="网站favicon")
|
||||
logo = Column(String(500), nullable=False, default="http://localhost:8000/api/v1/static/upload/image/png/2025/01/09/logo_20250109090448A263.png", comment="网站logo")
|
||||
background = Column(String(500), nullable=False, default="http://localhost:8000/api/v1/static/upload/image/png/2025/01/09/background_20250109090435A357.png", comment="网站背景")
|
||||
copyright = Column(String(500), nullable=False, default="Copyright © 2021-2025 fastapi-vue-admin.com 版权所有", comment="版权信息")
|
||||
keep_record = Column(String(500), nullable=False, default="晋ICP备18005113号-3", comment="备案信息")
|
||||
help_url = Column(String(500), nullable=False, default="https://django-vue-admin.com", comment="帮助链接")
|
||||
privacy_url = Column(String(500), nullable=False, default="https://gitee.com/tao__tao/fastapi_vue3_admin/blob/main/docs/clause/privacy.md", comment="隐私政策链接")
|
||||
clause_url = Column(String(500), nullable=False, default="https://gitee.com/tao__tao/fastapi_vue3_admin/blob/main/docs/clause/terms_service.md", comment="服务条款链接")
|
||||
code_url = Column(String(500), nullable=False, default="https://gitee.com/tao__tao/fastapi_vue3_admin.git", comment="源码地址")
|
||||
|
||||
# 审计字段
|
||||
description = Column(Text, nullable=True, comment="备注说明")
|
||||
|
||||
@@ -7,17 +7,17 @@ from app.core.base_schema import BaseSchema
|
||||
|
||||
class ConfigCreateSchema(BaseModel):
|
||||
"""配置创建模型"""
|
||||
title: str = Field(..., max_length=40, description="网站标题")
|
||||
favicon: str = Field(..., max_length=100, description="网站favicon")
|
||||
logo: str = Field(..., max_length=100, description="网站logo")
|
||||
background: str = Field(..., max_length=100, description="网站背景")
|
||||
description: str = Field(..., max_length=100, description="网站描述")
|
||||
copyright: str = Field(..., max_length=100, description="版权信息")
|
||||
keep_record: str = Field(..., max_length=100, description="备案信息")
|
||||
help_url: str = Field(..., max_length=100, description="帮助链接")
|
||||
privacy_url: str = Field(..., max_length=100, description="隐私政策链接")
|
||||
clause_url: str = Field(..., max_length=100, description="服务条款链接")
|
||||
code_url: str = Field(..., max_length=100, description="源码地址")
|
||||
title: str = Field(..., max_length=100, description="网站标题")
|
||||
favicon: str = Field(..., description="网站favicon")
|
||||
logo: str = Field(..., description="网站logo")
|
||||
background: str = Field(..., description="网站背景")
|
||||
description: str = Field(..., description="网站描述")
|
||||
copyright: str = Field(..., description="版权信息")
|
||||
keep_record: str = Field(..., description="备案信息")
|
||||
help_url: str = Field(..., description="帮助链接")
|
||||
privacy_url: str = Field(..., description="隐私政策链接")
|
||||
clause_url: str = Field(..., description="服务条款链接")
|
||||
code_url: str = Field(..., description="源码地址")
|
||||
|
||||
|
||||
class ConfigUpdateSchema(ConfigCreateSchema):
|
||||
|
||||
Reference in New Issue
Block a user