corrad-bp/prisma/schema.prisma
Md Afiq Iskandar 1f22375c95 Update error button styles, theme colors, and enhance audit model
- Changed the button background color in `error.vue` to improve visibility.
- Updated the secondary color in `theme.css` for better consistency.
- Refactored border color references in `collapse.css` for clarity.
- Added new fields (`auditAction`, `auditDetails`, `auditUsername`) to the `audit` model in `schema.prisma` for enhanced tracking.
- Updated JSON schema to reflect new audit model fields.
2025-04-09 12:19:01 +08:00

79 lines
2.7 KiB
Plaintext

generator client {
provider = "prisma-client-js"
}
generator jsonSchema {
provider = "prisma-json-schema-generator"
output = "./json"
}
datasource db {
provider = "mysql"
url = env("DATABASE_URL")
}
model audit {
auditID Int @id @default(autoincrement())
auditIP String? @db.VarChar(255)
auditURL String? @db.VarChar(255)
auditURLMethod String? @db.VarChar(255)
auditURLPayload String? @db.Text
auditCreatedDate DateTime? @default(now()) @db.DateTime(0)
auditAction String? @db.VarChar(255)
auditDetails String? @db.Text
auditUserID Int?
auditUsername String? @db.VarChar(255)
user user? @relation(fields: [auditUserID], references: [userID])
@@index([auditUserID], map: "FK_audit_user")
}
model user {
userID Int @id @default(autoincrement())
userSecretKey String? @db.VarChar(255)
userUsername String? @db.VarChar(255)
userPassword String? @db.VarChar(255)
userFullName String? @db.VarChar(255)
userEmail String? @db.VarChar(255)
userPhone String? @db.VarChar(255)
userStatus String? @db.VarChar(255)
userCreatedDate DateTime? @db.DateTime(0)
userModifiedDate DateTime? @db.DateTime(0)
audit audit[]
userrole userrole[]
}
model role {
roleID Int @id @default(autoincrement())
roleName String? @db.VarChar(255)
roleDescription String? @db.VarChar(255)
roleStatus String? @db.VarChar(255)
roleCreatedDate DateTime? @db.DateTime(0)
roleModifiedDate DateTime? @db.DateTime(0)
userrole userrole[]
}
model lookup {
lookupID Int @id @default(autoincrement())
lookupOrder Int?
lookupTitle String? @db.VarChar(255)
lookupRefCode String? @db.VarChar(255)
lookupValue String? @db.VarChar(255)
lookupType String? @db.VarChar(255)
lookupStatus String? @db.VarChar(255)
lookupCreatedDate DateTime? @db.DateTime(0)
lookupModifiedDate DateTime? @db.DateTime(0)
}
model userrole {
userRoleID Int @id @default(autoincrement())
userRoleUserID Int @default(0)
userRoleRoleID Int @default(0)
userRoleCreatedDate DateTime @db.DateTime(0)
role role @relation(fields: [userRoleRoleID], references: [roleID], onDelete: NoAction, onUpdate: NoAction, map: "FK_userrole_role")
user user @relation(fields: [userRoleUserID], references: [userID], onDelete: NoAction, onUpdate: NoAction, map: "FK_userrole_user")
@@index([userRoleRoleID], map: "FK_userrole_role")
@@index([userRoleUserID], map: "FK_userrole_user")
}