feat(phase2): shared/ 共享层迁移

- shared/: enums/constants/pagination/base_model/base_db/base_repository/base_service
- apps/constants 与 apps/models/base_model、base_db 改为垫片
- 新增 pagination 单元测试

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Claude
2026-08-07 10:03:38 +08:00
co-authored by Claude
parent db4ee85db5
commit bde742c7a8
11 changed files with 674 additions and 290 deletions
+28
View File
@@ -0,0 +1,28 @@
# +======================================================================
# | DjangoAdmin 企业数字化开发平台 [ 赋能开发者,助力企业发展 ]
# +----------------------------------------------------------------------
# | Copyright (c) 2021-2026 一米阳光团队 版权所有
# | 开源协议: Apache-2.0
# +======================================================================
# 由 apps/constants/message.py 迁移而来。
"""全局常量:分页、默认密码、消息文本、序列化排除字段。"""
# ======================= 分页配置 ==========================
# 默认每页显示记录数
PAGE_SIZE = 10
# ======================= 用户配置 ==========================
# 默认密码(新创建用户或重置密码时的默认密码,建议首次登录后强制修改)
DEFAULT_PASSWORD = "123456"
# ======================= 消息提示配置 ==========================
# 操作成功提示信息
MESSAGE_OK = "操作成功"
# 操作失败提示信息
MESSAGE_FAIL = "操作失败"
# ======================= 序列化安全配置 ==========================
# 模型序列化时统一排除的敏感字段,防止密码、盐值等泄露给前端
SERIALIZE_EXCLUDE_FIELDS = frozenset({'is_delete', 'password', 'salt'})