feat: change some field to optional
This commit is contained in:
parent
374644a691
commit
119fd02d22
3 changed files with 41 additions and 29 deletions
|
|
@ -0,0 +1,12 @@
|
|||
-- AlterTable
|
||||
ALTER TABLE "Employee" ALTER COLUMN "address" DROP NOT NULL,
|
||||
ALTER COLUMN "addressEN" DROP NOT NULL,
|
||||
ALTER COLUMN "entryDate" DROP NOT NULL,
|
||||
ALTER COLUMN "tm6Number" DROP NOT NULL,
|
||||
ALTER COLUMN "visaExpiryDate" DROP NOT NULL,
|
||||
ALTER COLUMN "visaIssueDate" DROP NOT NULL,
|
||||
ALTER COLUMN "visaIssuingPlace" DROP NOT NULL,
|
||||
ALTER COLUMN "visaNumber" DROP NOT NULL,
|
||||
ALTER COLUMN "visaStayUntilDate" DROP NOT NULL,
|
||||
ALTER COLUMN "visaType" DROP NOT NULL,
|
||||
ALTER COLUMN "workerStatus" DROP NOT NULL;
|
||||
|
|
@ -415,8 +415,8 @@ model Employee {
|
|||
gender String
|
||||
nationality String
|
||||
|
||||
address String
|
||||
addressEN String
|
||||
address String?
|
||||
addressEN String?
|
||||
|
||||
province Province? @relation(fields: [provinceId], references: [id], onDelete: SetNull)
|
||||
provinceId String?
|
||||
|
|
@ -437,15 +437,15 @@ model Employee {
|
|||
passportIssuingPlace String
|
||||
previousPassportReference String?
|
||||
|
||||
visaType String
|
||||
visaNumber String
|
||||
visaIssueDate DateTime
|
||||
visaExpiryDate DateTime
|
||||
visaIssuingPlace String
|
||||
visaStayUntilDate DateTime
|
||||
tm6Number String
|
||||
entryDate DateTime
|
||||
workerStatus String
|
||||
visaType String?
|
||||
visaNumber String?
|
||||
visaIssueDate DateTime?
|
||||
visaExpiryDate DateTime?
|
||||
visaIssuingPlace String?
|
||||
visaStayUntilDate DateTime?
|
||||
tm6Number String?
|
||||
entryDate DateTime?
|
||||
workerStatus String?
|
||||
|
||||
customerBranch CustomerBranch? @relation(fields: [customerBranchId], references: [id], onDelete: SetNull)
|
||||
customerBranchId String?
|
||||
|
|
|
|||
|
|
@ -57,15 +57,15 @@ type EmployeeCreate = {
|
|||
passportIssuingPlace: string;
|
||||
previousPassportReference?: string;
|
||||
|
||||
visaType: string;
|
||||
visaNumber: string;
|
||||
visaIssueDate: Date;
|
||||
visaExpiryDate: Date;
|
||||
visaIssuingPlace: string;
|
||||
visaStayUntilDate: Date;
|
||||
tm6Number: string;
|
||||
entryDate: Date;
|
||||
workerStatus: string;
|
||||
visaType?: string | null;
|
||||
visaNumber?: string | null;
|
||||
visaIssueDate?: Date | null;
|
||||
visaExpiryDate?: Date | null;
|
||||
visaIssuingPlace?: string | null;
|
||||
visaStayUntilDate?: Date | null;
|
||||
tm6Number?: string | null;
|
||||
entryDate?: Date | null;
|
||||
workerStatus?: string | null;
|
||||
|
||||
subDistrictId?: string | null;
|
||||
districtId?: string | null;
|
||||
|
|
@ -140,15 +140,15 @@ type EmployeeUpdate = {
|
|||
passportIssuingPlace?: string;
|
||||
previousPassportReference?: string;
|
||||
|
||||
visaType?: string;
|
||||
visaNumber?: string;
|
||||
visaIssueDate?: Date;
|
||||
visaExpiryDate?: Date;
|
||||
visaIssuingPlace?: string;
|
||||
visaStayUntilDate?: Date;
|
||||
tm6Number?: string;
|
||||
entryDate?: Date;
|
||||
workerStatus?: string;
|
||||
visaType?: string | null;
|
||||
visaNumber?: string | null;
|
||||
visaIssueDate?: Date | null;
|
||||
visaExpiryDate?: Date | null;
|
||||
visaIssuingPlace?: string | null;
|
||||
visaStayUntilDate?: Date | null;
|
||||
tm6Number?: string | null;
|
||||
entryDate?: Date | null;
|
||||
workerStatus?: string | null;
|
||||
|
||||
subDistrictId?: string | null;
|
||||
districtId?: string | null;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue