Skip to content

feat: implement initial user entity and define Prisma schema for sybi…#260

Merged
dDevAhmed merged 2 commits into
DigiNodes:mainfrom
githoboman:schema-desync-with-TypeORM
Jun 1, 2026
Merged

feat: implement initial user entity and define Prisma schema for sybi…#260
dDevAhmed merged 2 commits into
DigiNodes:mainfrom
githoboman:schema-desync-with-TypeORM

Conversation

@githoboman
Copy link
Copy Markdown
Contributor

changes Made (BE-203: Prisma ↔ TypeORM Desync)
Closes #203
prisma/schema.prisma
Fixed missing } closing SybilExplanation (syntax error)
Added walletAddress String @unique and worldcoinVerifiedAt DateTime? to User model to match TypeORM
Added worldIdVerifications WorldIdVerification[] back-reference to User (required by Prisma relation rules)
Added explanation SybilExplanation? back-reference to SybilScore
Added @@Map("world_id_verifications") to WorldIdVerification for naming consistency
src/entities/user.entity.ts (was pre-applied on branch)
Canonical TypeORM User now has all 7 required fields: id, walletAddress, reputation, worldcoinVerified, worldcoinVerifiedAt, createdAt, updatedAt, plus wallets relation
src/modules/users/entities/user.entity.ts (was pre-applied on branch)
Changed from duplicate UserEntity class to export { User as UserEntity } re-export
src/generated/client/internal/class.ts
Added get worldIdVerification(): any and get sybilExplanation(): any to PrismaClient interface (bridges the stale client until prisma generate can run with network access)
src/identity/worldcoin/worldcoin.service.spec.ts
Fixed 3 partial-object mock casts (as unknown as WorldIdVerification)
Added jest.mock for PrismaService and SybilResistanceService to prevent @libsql/win32-x64-msvc native binary load failure during unit tests
Result: 27/27 tests pass (14 entity sync + 13 worldcoin service). Pre-existing failures in other suites are unrelated @libsql binary / empty-spec issues.

@dDevAhmed dDevAhmed merged commit fd92c62 into DigiNodes:main Jun 1, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Prisma schema desync with TypeORM

2 participants