feat: update product fields
This commit is contained in:
parent
51fd6b0589
commit
d86a209639
3 changed files with 22 additions and 8 deletions
|
|
@ -0,0 +1,10 @@
|
||||||
|
/*
|
||||||
|
Warnings:
|
||||||
|
|
||||||
|
- Changed the type of `process` on the `Product` table. No cast exists, the column would be dropped and recreated, which cannot be done if there is data, since the column is required.
|
||||||
|
|
||||||
|
*/
|
||||||
|
-- AlterTable
|
||||||
|
ALTER TABLE "Product" ADD COLUMN "remark" TEXT,
|
||||||
|
DROP COLUMN "process",
|
||||||
|
ADD COLUMN "process" INTEGER NOT NULL;
|
||||||
|
|
@ -631,13 +631,15 @@ model Product {
|
||||||
code String
|
code String
|
||||||
name String
|
name String
|
||||||
detail String
|
detail String
|
||||||
process String
|
process Int
|
||||||
price Int
|
price Int
|
||||||
agentPrice Int
|
agentPrice Int
|
||||||
serviceCharge Int
|
serviceCharge Int
|
||||||
|
|
||||||
status Status @default(CREATED)
|
status Status @default(CREATED)
|
||||||
|
|
||||||
|
remark String?
|
||||||
|
|
||||||
productType ProductType? @relation(fields: [productTypeId], references: [id], onDelete: SetNull)
|
productType ProductType? @relation(fields: [productTypeId], references: [id], onDelete: SetNull)
|
||||||
productTypeId String?
|
productTypeId String?
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -30,19 +30,21 @@ type ProductCreate = {
|
||||||
code: "AC" | "DO" | "ac" | "do";
|
code: "AC" | "DO" | "ac" | "do";
|
||||||
name: string;
|
name: string;
|
||||||
detail: string;
|
detail: string;
|
||||||
process: string;
|
process: number;
|
||||||
price: number;
|
price: number;
|
||||||
agentPrice: number;
|
agentPrice: number;
|
||||||
serviceCharge: number;
|
serviceCharge: number;
|
||||||
|
remark?: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
type ProductUpdate = {
|
type ProductUpdate = {
|
||||||
name: string;
|
name?: string;
|
||||||
detail: string;
|
detail?: string;
|
||||||
process?: string;
|
process?: number;
|
||||||
price: number;
|
price?: number;
|
||||||
agentPrice: number;
|
agentPrice?: number;
|
||||||
serviceCharge: number;
|
serviceCharge?: number;
|
||||||
|
remark?: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
function imageLocation(id: string) {
|
function imageLocation(id: string) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue