feat(api,db-cn): persist synced source profile snapshot on mappings
Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
@@ -319,6 +319,7 @@ model external_user_mappings {
|
||||
sourceSystem String @default("mock") @db.VarChar(32) // G4 后换真实源标识
|
||||
externalUserId String @db.VarChar(64)
|
||||
sourceVersion Int @default(0) // 幂等比较位:仅更高版本应用
|
||||
profile Json? // 同步源档案快照(工号/邮箱/公司/头像)——纯展示,不参与同步决策(users 表零改动红线)
|
||||
createdAt DateTime @default(now()) @db.DateTime(6)
|
||||
|
||||
@@unique([sourceSystem, externalUserId])
|
||||
|
||||
Reference in New Issue
Block a user