fix: missing field

This commit is contained in:
Methapon Metanipat 2024-09-10 15:51:22 +07:00
parent c755650fed
commit c38a1ce0c0
4 changed files with 17 additions and 2 deletions

View file

@ -0,0 +1,5 @@
-- AlterTable
ALTER TABLE "Product" ADD COLUMN "selectedImage" TEXT;
-- AlterTable
ALTER TABLE "Service" ADD COLUMN "selectedImage" TEXT;

View file

@ -692,7 +692,8 @@ model Product {
shared Boolean @default(false) shared Boolean @default(false)
remark String? remark String?
selectedImage String?
productGroup ProductGroup @relation(fields: [productGroupId], references: [id], onDelete: Cascade) productGroup ProductGroup @relation(fields: [productGroupId], references: [id], onDelete: Cascade)
productGroupId String productGroupId String
@ -719,7 +720,8 @@ model Service {
status Status @default(CREATED) status Status @default(CREATED)
statusOrder Int @default(0) statusOrder Int @default(0)
shared Boolean @default(false) shared Boolean @default(false)
selectedImage String?
work Work[] work Work[]
quotationService QuotationService[] quotationService QuotationService[]

View file

@ -69,6 +69,8 @@ type ProductCreate = {
serviceCharge: number; serviceCharge: number;
vatIncluded?: boolean; vatIncluded?: boolean;
expenseType?: string; expenseType?: string;
selectedImage?: string;
shared?: boolean;
productGroupId: string; productGroupId: string;
remark?: string; remark?: string;
}; };
@ -84,6 +86,8 @@ type ProductUpdate = {
remark?: string; remark?: string;
vatIncluded?: boolean; vatIncluded?: boolean;
expenseType?: string; expenseType?: string;
selectedImage?: string;
shared?: boolean;
productGroupId?: string; productGroupId?: string;
}; };

View file

@ -58,6 +58,8 @@ type ServiceCreate = {
productId: string[]; productId: string[];
attributes?: { [key: string]: any }; attributes?: { [key: string]: any };
}[]; }[];
shared?: boolean;
selectedImage?: string;
productGroupId: string; productGroupId: string;
}; };
@ -73,6 +75,8 @@ type ServiceUpdate = {
productId: string[]; productId: string[];
attributes?: { [key: string]: any }; attributes?: { [key: string]: any };
}[]; }[];
shared?: boolean;
selectedImage?: string;
productGroupId?: string; productGroupId?: string;
}; };