Files
junhong_cmp_fiber/configs/config.dev.yaml
huang 984ccccc63 docs(constitution): 新增数据库设计原则(v2.4.0)
在项目宪章中新增第九条原则"数据库设计原则",明确禁止使用数据库外键约束和ORM关联标签。

主要变更:
- 新增原则IX:数据库设计原则(Database Design Principles)
- 强制要求:数据库表不得使用外键约束
- 强制要求:GORM模型不得使用ORM关联标签(foreignKey、hasMany等)
- 强制要求:表关系必须通过ID字段手动维护
- 强制要求:关联数据查询必须显式编写,避免ORM魔法
- 强制要求:时间字段由GORM处理,不使用数据库触发器

设计理念:
- 提升业务逻辑灵活性(无数据库约束限制)
- 优化高并发性能(无外键检查开销)
- 增强代码可读性(显式查询,无隐式预加载)
- 简化数据库架构和迁移流程
- 支持分布式和微服务场景

版本升级:2.3.0 → 2.4.0(MINOR)
2025-11-13 13:40:19 +08:00

62 lines
1.2 KiB
YAML

server:
address: ":3000"
read_timeout: "10s"
write_timeout: "10s"
shutdown_timeout: "30s"
prefork: false
redis:
address: "cxd.whcxd.cn"
password: "cpNbWtAaqgo1YJmbMp3h"
port: 16299
db: 0
pool_size: 10
min_idle_conns: 5
dial_timeout: "5s"
read_timeout: "3s"
write_timeout: "3s"
database:
host: "cxd.whcxd.cn"
port: 16159
user: "erp_pgsql"
password: "erp_2025"
dbname: "junhong_cmp_test"
sslmode: "disable"
max_open_conns: 25
max_idle_conns: 10
conn_max_lifetime: "5m"
queue:
concurrency: 10
queues:
critical: 6
default: 3
low: 1
retry_max: 5
timeout: "10m"
logging:
level: "debug" # 开发环境使用 debug 级别
development: true # 启用开发模式(美化日志输出)
app_log:
filename: "logs/app.log"
max_size: 100
max_backups: 10 # 开发环境保留较少备份
max_age: 7 # 7天
compress: false # 开发环境不压缩
access_log:
filename: "logs/access.log"
max_size: 100
max_backups: 10
max_age: 7
compress: false
middleware:
enable_auth: true # 开发环境可选禁用认证
enable_rate_limiter: true
rate_limiter:
max: 1000
expiration: "1m"
storage: "memory"