feat: add initial backend and frontend structure with models, DTOs, and WebSocket events

This commit is contained in:
GW_MC
2026-02-23 21:04:50 +08:00
parent 932f384f0d
commit 6b1a0136b0
21 changed files with 556 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
// 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])
}