feat(phase4): 全部业务模块迁移到 modules/(结构迁移)
- 21 个模块目录(auth/system/dictionary/configuration/cms/member/region/link/notice/job/log/upload/index) - 每个模块 router.py(合并模块导出多个 router)/schemas.py/service.py/repository.py/models.py - routers/v1.py 与 routers/__init__.py 改为直接引用 modules,前缀与权限串原样保留 - core/middleware.py 懒加载指向 modules.system.menu / modules.log;core/redis_client.py 指向 modules.job.scheduler - apps/views|services|forms 全部改为 re-export 垫片 - 迁移后 grep 守门通过:modules/core 无 apps/extensions 残留引用 - 实测登录、27+ 模块接口、写操作 commit、操作日志落库均正常 Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
+2
-31
@@ -1,31 +1,2 @@
|
||||
from datetime import date
|
||||
from typing import Any, Optional
|
||||
|
||||
from pydantic import BaseModel, Field
|
||||
|
||||
# 会员表单验证
|
||||
class MemberForm(BaseModel):
|
||||
id: Optional[int] = Field(None, description="会员ID")
|
||||
realname: str = Field(..., min_length=1, max_length=150, description="会员姓名")
|
||||
nickname: str = Field(..., min_length=1, max_length=150, description="会员昵称")
|
||||
gender: int = Field(..., ge=1, le=3, description="性别")
|
||||
avatar: str = Field(..., min_length=1, max_length=255, description="头像")
|
||||
birthday: date = Field(..., description="出生日期")
|
||||
email: str = Field(..., min_length=1, max_length=30, description="邮箱")
|
||||
city: Any = Field(..., description="行政区划")
|
||||
province_code: Optional[str] = Field(None, max_length=30, description="省份编码")
|
||||
city_code: Optional[str] = Field(None, max_length=30, description="城市编码")
|
||||
district_code: Optional[str] = Field(None, max_length=30, description="县区编码")
|
||||
address: str = Field(..., min_length=1, max_length=255, description="详细地址")
|
||||
username: str = Field(..., min_length=1, max_length=30, description="登录账号")
|
||||
password: Optional[str] = Field(None, max_length=255, description="登录密码")
|
||||
member_level: int = Field(..., ge=0, description="会员等级")
|
||||
intro: Optional[str] = Field(None, max_length=255, description="个人简介")
|
||||
signature: Optional[str] = Field(None, max_length=255, description="个人签名")
|
||||
source: int = Field(..., ge=1, le=5, description="注册来源")
|
||||
status: int = Field(..., ge=1, le=2, description="会员状态")
|
||||
|
||||
# 设置状态表单
|
||||
class MemberStatusForm(BaseModel):
|
||||
id: int = Field(..., gt=0, description="会员ID")
|
||||
status: int = Field(..., ge=1, le=2, description="会员状态")
|
||||
# 兼容垫片:由 modules.member.schemas 迁移
|
||||
from modules.member.schemas import * # noqa: F401,F403
|
||||
|
||||
Reference in New Issue
Block a user