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
|
gender String
|
||||||
nationality String
|
nationality String
|
||||||
|
|
||||||
address String
|
address String?
|
||||||
addressEN String
|
addressEN String?
|
||||||
|
|
||||||
province Province? @relation(fields: [provinceId], references: [id], onDelete: SetNull)
|
province Province? @relation(fields: [provinceId], references: [id], onDelete: SetNull)
|
||||||
provinceId String?
|
provinceId String?
|
||||||
|
|
@ -437,15 +437,15 @@ model Employee {
|
||||||
passportIssuingPlace String
|
passportIssuingPlace String
|
||||||
previousPassportReference String?
|
previousPassportReference String?
|
||||||
|
|
||||||
visaType String
|
visaType String?
|
||||||
visaNumber String
|
visaNumber String?
|
||||||
visaIssueDate DateTime
|
visaIssueDate DateTime?
|
||||||
visaExpiryDate DateTime
|
visaExpiryDate DateTime?
|
||||||
visaIssuingPlace String
|
visaIssuingPlace String?
|
||||||
visaStayUntilDate DateTime
|
visaStayUntilDate DateTime?
|
||||||
tm6Number String
|
tm6Number String?
|
||||||
entryDate DateTime
|
entryDate DateTime?
|
||||||
workerStatus String
|
workerStatus String?
|
||||||
|
|
||||||
customerBranch CustomerBranch? @relation(fields: [customerBranchId], references: [id], onDelete: SetNull)
|
customerBranch CustomerBranch? @relation(fields: [customerBranchId], references: [id], onDelete: SetNull)
|
||||||
customerBranchId String?
|
customerBranchId String?
|
||||||
|
|
|
||||||
|
|
@ -57,15 +57,15 @@ type EmployeeCreate = {
|
||||||
passportIssuingPlace: string;
|
passportIssuingPlace: string;
|
||||||
previousPassportReference?: string;
|
previousPassportReference?: string;
|
||||||
|
|
||||||
visaType: string;
|
visaType?: string | null;
|
||||||
visaNumber: string;
|
visaNumber?: string | null;
|
||||||
visaIssueDate: Date;
|
visaIssueDate?: Date | null;
|
||||||
visaExpiryDate: Date;
|
visaExpiryDate?: Date | null;
|
||||||
visaIssuingPlace: string;
|
visaIssuingPlace?: string | null;
|
||||||
visaStayUntilDate: Date;
|
visaStayUntilDate?: Date | null;
|
||||||
tm6Number: string;
|
tm6Number?: string | null;
|
||||||
entryDate: Date;
|
entryDate?: Date | null;
|
||||||
workerStatus: string;
|
workerStatus?: string | null;
|
||||||
|
|
||||||
subDistrictId?: string | null;
|
subDistrictId?: string | null;
|
||||||
districtId?: string | null;
|
districtId?: string | null;
|
||||||
|
|
@ -140,15 +140,15 @@ type EmployeeUpdate = {
|
||||||
passportIssuingPlace?: string;
|
passportIssuingPlace?: string;
|
||||||
previousPassportReference?: string;
|
previousPassportReference?: string;
|
||||||
|
|
||||||
visaType?: string;
|
visaType?: string | null;
|
||||||
visaNumber?: string;
|
visaNumber?: string | null;
|
||||||
visaIssueDate?: Date;
|
visaIssueDate?: Date | null;
|
||||||
visaExpiryDate?: Date;
|
visaExpiryDate?: Date | null;
|
||||||
visaIssuingPlace?: string;
|
visaIssuingPlace?: string | null;
|
||||||
visaStayUntilDate?: Date;
|
visaStayUntilDate?: Date | null;
|
||||||
tm6Number?: string;
|
tm6Number?: string | null;
|
||||||
entryDate?: Date;
|
entryDate?: Date | null;
|
||||||
workerStatus?: string;
|
workerStatus?: string | null;
|
||||||
|
|
||||||
subDistrictId?: string | null;
|
subDistrictId?: string | null;
|
||||||
districtId?: string | null;
|
districtId?: string | null;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue