upd: auth

Deskripsi:
-update login
- update struktur database

No Issues
This commit is contained in:
2026-04-15 11:17:04 +08:00
parent 840a89ea0a
commit c66ce4a39b
14 changed files with 273 additions and 173 deletions

View File

@@ -9,9 +9,7 @@ datasource db {
}
enum Role {
USER
ADMIN
SUPER_ADMIN
DEVELOPER
}
@@ -44,7 +42,7 @@ model User {
name String
email String @unique
password String
role Role @default(USER)
role Role @default(ADMIN)
active Boolean @default(true)
image String?
createdAt DateTime @default(now())
@@ -71,6 +69,19 @@ model Session {
@@map("session")
}
model App {
id String @id @default(uuid())
name String
version String?
minVersion String?
maintenance Boolean @default(false)
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
bugs Bug[]
}
model Log {
id String @id @default(uuid())
userId String
@@ -86,12 +97,12 @@ model Log {
model Bug {
id String @id @default(uuid())
userId String?
app String?
appId String?
affectedVersion String
device String
os String
status BugStatus
source BugSource
source BugSource
description String
stackTrace String?
fixedVersion String?
@@ -100,6 +111,7 @@ model Bug {
updatedAt DateTime @updatedAt
user User? @relation(fields: [userId], references: [id])
app App? @relation(fields: [appId], references: [id])
images BugImage[]
logs BugLog[]