diff --git a/prisma/migrations/20241111063754_add_visa_fields/migration.sql b/prisma/migrations/20241111063754_add_visa_fields/migration.sql new file mode 100644 index 0000000..b8fbc37 --- /dev/null +++ b/prisma/migrations/20241111063754_add_visa_fields/migration.sql @@ -0,0 +1,5 @@ +-- AlterTable +ALTER TABLE "EmployeeVisa" ADD COLUMN "arrivalAt" TEXT, +ADD COLUMN "arrivalTM" TEXT, +ADD COLUMN "arrivalTMNo" TEXT, +ADD COLUMN "workerType" TEXT; diff --git a/prisma/schema.prisma b/prisma/schema.prisma index 8a3e3c7..d0086f7 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -838,6 +838,11 @@ model EmployeeVisa { mrz String? remark String? + arrivalTM String? + arrivalTMNo String? + arrivalAt String? + workerType String? + employee Employee @relation(fields: [employeeId], references: [id], onDelete: Cascade) employeeId String diff --git a/src/controllers/03-employee-visa-controller.ts b/src/controllers/03-employee-visa-controller.ts index 67501e0..038321f 100644 --- a/src/controllers/03-employee-visa-controller.ts +++ b/src/controllers/03-employee-visa-controller.ts @@ -40,8 +40,13 @@ type EmployeeVisaPayload = { issuePlace: string; issueDate: Date; expireDate: Date; - mrz?: string; - remark?: string; + mrz?: string | null; + remark?: string | null; + + arrivalTM: string; + arrivalTMNo: string; + arrivalAt: string; + workerType: string; }; @Route("api/v1/employee/{employeeId}/visa")