fix: unused field
This commit is contained in:
parent
d23e404196
commit
9a824f3ddf
3 changed files with 15 additions and 7 deletions
|
|
@ -0,0 +1,15 @@
|
|||
/*
|
||||
Warnings:
|
||||
|
||||
- You are about to drop the column `createdAt` on the `EmployeeHistory` table. All the data in the column will be lost.
|
||||
- You are about to drop the column `createdByUserId` on the `EmployeeHistory` table. All the data in the column will be lost.
|
||||
- You are about to drop the column `timestamp` on the `EmployeeHistory` table. All the data in the column will be lost.
|
||||
|
||||
*/
|
||||
-- DropForeignKey
|
||||
ALTER TABLE "EmployeeHistory" DROP CONSTRAINT "EmployeeHistory_createdByUserId_fkey";
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE "EmployeeHistory" DROP COLUMN "createdAt",
|
||||
DROP COLUMN "createdByUserId",
|
||||
DROP COLUMN "timestamp";
|
||||
|
|
@ -352,7 +352,6 @@ model User {
|
|||
customerBranchUpdated CustomerBranch[] @relation("CustomerBranchUpdatedByUser")
|
||||
emplyeeCreated Employee[] @relation("EmployeeCreatedByUser")
|
||||
employeUpdated Employee[] @relation("EmployeeUpdatedByUser")
|
||||
employeeHistoryCreated EmployeeHistory[] @relation("EmployeeHistoryCreatedByUser")
|
||||
employeeHistoryUpdated EmployeeHistory[] @relation("EmployeeHistoryUpdatedByUser")
|
||||
employeeCheckupCreated EmployeeCheckup[] @relation("EmployeeCheckupCreatedByUser")
|
||||
employeeCheckupUpdated EmployeeCheckup[] @relation("EmployeeCheckupUpdatedByUser")
|
||||
|
|
@ -531,11 +530,6 @@ model EmployeeHistory {
|
|||
valueBefore Json
|
||||
valueAfter Json
|
||||
|
||||
timestamp DateTime @default(now())
|
||||
|
||||
createdAt DateTime @default(now())
|
||||
createdBy User? @relation(name: "EmployeeHistoryCreatedByUser", fields: [createdByUserId], references: [id], onDelete: SetNull)
|
||||
createdByUserId String?
|
||||
updatedAt DateTime @updatedAt
|
||||
updatedBy User? @relation(name: "EmployeeHistoryUpdatedByUser", fields: [updatedByUserId], references: [id], onDelete: SetNull)
|
||||
updatedByUserId String?
|
||||
|
|
|
|||
|
|
@ -690,7 +690,6 @@ export class EmployeeController extends Controller {
|
|||
data: historyEntries.map((v) => ({
|
||||
...v,
|
||||
updatedByUserId: req.user.sub,
|
||||
updatedBy: req.user.preferred_username,
|
||||
masterId: employee.id,
|
||||
})),
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue