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
|
||||
name String
|
||||
detail String
|
||||
process String
|
||||
process Int
|
||||
price Int
|
||||
agentPrice Int
|
||||
serviceCharge Int
|
||||
|
||||
status Status @default(CREATED)
|
||||
|
||||
remark String?
|
||||
|
||||
productType ProductType? @relation(fields: [productTypeId], references: [id], onDelete: SetNull)
|
||||
productTypeId String?
|
||||
|
||||
|
|
|
|||
|
|
@ -30,19 +30,21 @@ type ProductCreate = {
|
|||
code: "AC" | "DO" | "ac" | "do";
|
||||
name: string;
|
||||
detail: string;
|
||||
process: string;
|
||||
process: number;
|
||||
price: number;
|
||||
agentPrice: number;
|
||||
serviceCharge: number;
|
||||
remark?: string;
|
||||
};
|
||||
|
||||
type ProductUpdate = {
|
||||
name: string;
|
||||
detail: string;
|
||||
process?: string;
|
||||
price: number;
|
||||
agentPrice: number;
|
||||
serviceCharge: number;
|
||||
name?: string;
|
||||
detail?: string;
|
||||
process?: number;
|
||||
price?: number;
|
||||
agentPrice?: number;
|
||||
serviceCharge?: number;
|
||||
remark?: string;
|
||||
};
|
||||
|
||||
function imageLocation(id: string) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue