rwadurian/backend/services/authorization-service/prisma/migrations
hailin 6bd6c6b5be feat(authorization-service): 实现月度考核数据存档机制(方案B)
- 新增 lastMonthTreesAdded 字段,用于存档上月业绩数据
- 新增 archiveAndResetMonthlyTreeCounts 定时任务:每月1日0:00将当月数据存档后重置
- 新增 getTreesForAssessment() 方法:根据 benefitValidUntil 判断使用当月或上月数据
- 修复月度考核时序问题:数据重置(0:00)在考核(3:00)之前执行

业务规则:
- 严格自然月统计,11月的业绩不计入12月
- 激活当月免考核,考核激活当月的下一个月
- 权益有效期在上月末 → 使用 lastMonthTreesAdded
- 权益有效期在当月末 → 使用 monthlyTreesAdded

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-13 20:39:16 -08:00
..
00000000000000_init feat(profile): integrate referral and authorization APIs for profile page 2025-12-09 01:57:39 -08:00
20241210000001_add_account_sequence fix: 修复多个服务的 accountSequence 类型和推荐关系 bug 2025-12-12 12:29:11 -08:00
20251213151704_add_community_benefit_assessment_fields feat(authorization-service): 实现社区权益月度考核及级联激活/停用功能 2025-12-13 07:23:46 -08:00
20251214100000_add_last_month_trees_added feat(authorization-service): 实现月度考核数据存档机制(方案B) 2025-12-13 20:39:16 -08:00
.gitkeep feat(authorization-service): Implement complete authorization service with DDD architecture 2025-12-01 06:30:07 -08:00
migration_lock.toml feat(authorization-service): 实现社区权益月度考核及级联激活/停用功能 2025-12-13 07:23:46 -08:00