finances/prisma/schema.prisma
2024-03-08 20:24:40 +01:00

30 lines
530 B
Text

generator client {
provider = "prisma-client-js"
}
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}
model User {
// lucia internal fields
id String @id
sessions Session[]
// custom fields
username String @unique
password String
@@map("lucia_user")
}
model Session {
// lucia internal fields
id String @id
userId String
expiresAt DateTime
user User @relation(references: [id], fields: [userId], onDelete: Cascade)
@@map("lucia_session")
}