26 lines
554 B
Plaintext
26 lines
554 B
Plaintext
// User model and related enums
|
|
|
|
enum UserRole {
|
|
USER
|
|
ADMIN
|
|
}
|
|
|
|
model User {
|
|
id String @id @default(uuid())
|
|
email String @unique
|
|
username String @unique
|
|
passwordHash String?
|
|
keycloakSub String? @unique
|
|
role UserRole @default(USER)
|
|
isActive Boolean @default(true)
|
|
createdAt DateTime @default(now())
|
|
updatedAt DateTime @updatedAt
|
|
|
|
characters Character[]
|
|
conversations Conversation[]
|
|
importDocs ImportDocument[]
|
|
|
|
@@index([email])
|
|
@@index([keycloakSub])
|
|
}
|