45 lines
1.1 KiB
Plaintext
45 lines
1.1 KiB
Plaintext
model Account {
|
|
id String @id @default(uuid())
|
|
username String @unique()
|
|
password String
|
|
status AccountStatus
|
|
type AccountType
|
|
|
|
admin_account AdminAccount?
|
|
provider_account ProviderAccount?
|
|
partner_account PartnerAccount?
|
|
consumer_account ConsumerAccount?
|
|
|
|
// tokens Token[]
|
|
// refresh_tokens RefreshToken[]
|
|
|
|
@@map("accounts")
|
|
}
|
|
|
|
// model Token {
|
|
// id String @id @d @uniqueefault(uuid())
|
|
// token String @unique
|
|
// type TokenType
|
|
// created_at DateTime @default(now())
|
|
// expires_at DateTime
|
|
|
|
// account_id String
|
|
// account Account @relation(fields: [account_id], references: [id])
|
|
|
|
// @@unique([type, account_id])
|
|
// @@map("tokens")
|
|
// }
|
|
|
|
// model VerificationCode {
|
|
// id String @id @default(uuid())
|
|
// code String
|
|
// is_used Boolean @default(false)
|
|
// created_at DateTime @default(now())
|
|
// expires_at DateTime
|
|
|
|
// account_id String
|
|
// account Account @relation(fields: [account_id], references: [id])
|
|
|
|
// @@map("verification_codes")
|
|
// }
|