Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 24 additions & 1 deletion prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ model User {
gender Gender @default(UNKNOWN)
email String?
phone String?
wallet String?
extras Json? @db.JsonB()
notes String? @db.Text()
sessionId String?

Auth Auth[]
UserRole UserRole[]
Signup Signup[]
Wallets Wallet[]

createdAt DateTime @default(now())
updatedAt DateTime? @updatedAt()
Expand All @@ -45,6 +45,29 @@ enum Gender {
UNKNOWN
}

enum ChainType {
EVM // Ethereum, BSC, Polygon, etc.
SOLANA // Solana blockchain
STELLAR // Stellar blockchain
OTHER // For custom or unsupported chains
}

model Wallet {
id Int @id @default(autoincrement())
userId Int
address String
provider String? // Wallet provider (e.g., Rumsan, MetaMask, TrustWallet) - Optional
chainId String // Blockchain network identifier (e.g., "1" for Ethereum, "public" for Stellar)
chainType ChainType // Blockchain type (EVM, SOLANA, STELLAR)
createdAt DateTime @default(now())
updatedAt DateTime? @updatedAt()

User User @relation(fields: [userId], references: [id])

@@index([userId, chainId, chainType], name: "user_wallet_chainType_index")
@@map("tbl_wallets")
}

// ++++++++++++++++++ END: @rumsan/user - User +++++++++++++++++++++++++++++++
// ++++++++++++++++++ START: @rumsan/user - Role/Auth ++++++++++++++++++++++++

Expand Down