rwadurian/backend/services/authorization-service/prisma/migrations
hailin 8f5b4df3d1 feat(authorization-service): 新增权益考核记录表 BenefitAssessmentRecord
新增独立的权益有效性考核记录表,与火柴人排名(MonthlyAssessment)分离:

Schema & Migration:
- 新增 BenefitAssessmentRecord 表存储权益考核历史
- 新增 BenefitActionType 枚举(ACTIVATED/RENEWED/DEACTIVATED/NO_CHANGE)
- 记录考核月份、目标、完成数、权益状态变化等信息

领域层:
- 新增 BenefitAssessmentRecord 聚合根
- 新增 IBenefitAssessmentRecordRepository 接口

应用层:
- 修改 processExpiredCommunityBenefits 保存考核记录
- 修改 processExpiredCityCompanyBenefits 保存考核记录
- 修改 processExpiredProvinceCompanyBenefits 保存考核记录
- 修改 processExpiredAuthCityBenefits 保存考核记录(新增,原无记录)
- 修改 processExpiredAuthProvinceBenefits 保存考核记录(新增,原无记录)

此改动 100% 不影响原有业务逻辑:
- 原有 MonthlyAssessment 表继续用于火柴人排名
- 仅在权益考核执行完成后追加保存记录到新表

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-08 04:15:07 -08:00
..
00000000000000_init feat(profile): integrate referral and authorization APIs for profile page 2025-12-09 01:57:39 -08:00
20241217_add_soft_delete fix(authorization): migration should drop both constraint and index 2026-01-04 03:14:00 -08:00
20241210000001_add_account_sequence fix: 修复多个服务的 accountSequence 类型和推荐关系 bug 2025-12-12 12:29:11 -08:00
20250108000000_add_benefit_assessment_record feat(authorization-service): 新增权益考核记录表 BenefitAssessmentRecord 2026-01-08 04:15:07 -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
20251217000000_add_outbox_events feat(authorization): 实现 Outbox 模式事件发布 2025-12-18 00:30:09 -08:00
20251223000000_increase_progress_percentage_precision fix(authorization): 增大 progress_percentage 字段精度避免溢出 2025-12-23 07:42:07 -08:00
20251223000001_increase_local_percentage_precision fix(authorization): 增大 monthly_assessments.local_percentage 字段精度 2025-12-23 08:02:21 -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