feat: add user update info to history

This commit is contained in:
Methapon2001 2024-06-28 09:31:17 +07:00
parent 3e3d2cf01c
commit 123210c2dd
3 changed files with 27 additions and 0 deletions

View file

@ -329,6 +329,7 @@ model User {
branch BranchUser[]
userMenuPermission UserMenuPermission[]
userMenuComponentPermission UserMenuComponentPermission[]
employeeHistory EmployeeHistory[]
}
enum CustomerType {
@ -484,6 +485,11 @@ model EmployeeHistory {
timestamp DateTime @default(now())
updatedByUserId String?
updatedByUser User? @relation(fields: [updatedByUserId], references: [id])
updatedBy String?
updatedAt DateTime @default(now())
masterId String
master Employee @relation(fields: [masterId], references: [id], onDelete: Cascade)
}