refactor: 重构多飞书应用绑定架构和数据库清理

- 新增 user_feishu_apps 表支持用户绑定多个飞书应用
- users 表添加唯一约束(公司内邮箱/手机唯一)
- 迁移现有飞书数据到 user_feishu_apps 表
- 清理冗余表(users_bak, user_feishu_binding)
- 废弃 users 表中的 feishu_user_id/feishu_open_id/tenant_key 字段
- 更新 FeishuNotificationService 使用新的数据获取方式
- User 模型新增 getFeishuUserId() 等便捷方法

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
root
2026-02-26 16:27:33 +08:00
parent 04947ae52d
commit 0489da5e40
11 changed files with 942 additions and 45 deletions
+1
View File
@@ -11,6 +11,7 @@ class FeishuLoginSession extends Model
protected $fillable = [
'company_id',
'tenant_key',
'feishu_app_id',
'status',
'user_id',
'expires_at',