40 lines
999 B
Plaintext
40 lines
999 B
Plaintext
generator client {
|
|
provider = "prisma-client"
|
|
output = "../generated/prisma"
|
|
moduleFormat = "cjs"
|
|
}
|
|
|
|
datasource db {
|
|
provider = "sqlite"
|
|
}
|
|
|
|
model User {
|
|
id String @id
|
|
email String @unique
|
|
passwordHash String
|
|
sessions Session[]
|
|
tbankConnection TbankConnection?
|
|
createdAt DateTime @default(now())
|
|
updatedAt DateTime @updatedAt
|
|
}
|
|
|
|
model TbankConnection {
|
|
userId String @unique
|
|
encryptedToken String
|
|
connectedAt DateTime
|
|
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
|
}
|
|
|
|
model Session {
|
|
id String @id
|
|
userId String
|
|
refreshTokenHash String
|
|
expiresAt DateTime
|
|
revokedAt DateTime?
|
|
createdAt DateTime @default(now())
|
|
updatedAt DateTime @updatedAt
|
|
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
|
|
|
@@index([userId])
|
|
}
|