feat: add installments data
This commit is contained in:
parent
2e9bf4e120
commit
127db88056
2 changed files with 21 additions and 9 deletions
|
|
@ -0,0 +1,8 @@
|
||||||
|
-- AlterTable
|
||||||
|
ALTER TABLE "RequestWork" ADD COLUMN "attributes" JSONB;
|
||||||
|
|
||||||
|
-- AlterTable
|
||||||
|
ALTER TABLE "Service" ADD COLUMN "installments" INTEGER NOT NULL DEFAULT 0;
|
||||||
|
|
||||||
|
-- AlterTable
|
||||||
|
ALTER TABLE "WorkProduct" ADD COLUMN "installmentNo" INTEGER NOT NULL DEFAULT 0;
|
||||||
|
|
@ -1004,10 +1004,11 @@ model Product {
|
||||||
model Service {
|
model Service {
|
||||||
id String @id @default(cuid())
|
id String @id @default(cuid())
|
||||||
|
|
||||||
code String
|
code String
|
||||||
name String
|
name String
|
||||||
detail String
|
detail String
|
||||||
attributes Json?
|
attributes Json?
|
||||||
|
installments Int @default(0)
|
||||||
|
|
||||||
status Status @default(CREATED)
|
status Status @default(CREATED)
|
||||||
statusOrder Int @default(0)
|
statusOrder Int @default(0)
|
||||||
|
|
@ -1057,11 +1058,12 @@ model Work {
|
||||||
}
|
}
|
||||||
|
|
||||||
model WorkProduct {
|
model WorkProduct {
|
||||||
order Int
|
order Int
|
||||||
work Work @relation(fields: [workId], references: [id], onDelete: Cascade)
|
work Work @relation(fields: [workId], references: [id], onDelete: Cascade)
|
||||||
workId String
|
workId String
|
||||||
product Product @relation(fields: [productId], references: [id], onDelete: Cascade)
|
product Product @relation(fields: [productId], references: [id], onDelete: Cascade)
|
||||||
productId String
|
productId String
|
||||||
|
installmentNo Int @default(0)
|
||||||
|
|
||||||
createdAt DateTime @default(now())
|
createdAt DateTime @default(now())
|
||||||
createdBy User? @relation(name: "WorkProductCreatedByUser", fields: [createdByUserId], references: [id], onDelete: SetNull)
|
createdBy User? @relation(name: "WorkProductCreatedByUser", fields: [createdByUserId], references: [id], onDelete: SetNull)
|
||||||
|
|
@ -1256,4 +1258,6 @@ model RequestWork {
|
||||||
|
|
||||||
processByUser User? @relation(fields: [processByUserId], references: [id])
|
processByUser User? @relation(fields: [processByUserId], references: [id])
|
||||||
processByUserId String?
|
processByUserId String?
|
||||||
|
|
||||||
|
attributes Json?
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue