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 {
|
||||
id String @id @default(cuid())
|
||||
|
||||
code String
|
||||
name String
|
||||
detail String
|
||||
attributes Json?
|
||||
code String
|
||||
name String
|
||||
detail String
|
||||
attributes Json?
|
||||
installments Int @default(0)
|
||||
|
||||
status Status @default(CREATED)
|
||||
statusOrder Int @default(0)
|
||||
|
|
@ -1057,11 +1058,12 @@ model Work {
|
|||
}
|
||||
|
||||
model WorkProduct {
|
||||
order Int
|
||||
work Work @relation(fields: [workId], references: [id], onDelete: Cascade)
|
||||
workId String
|
||||
product Product @relation(fields: [productId], references: [id], onDelete: Cascade)
|
||||
productId String
|
||||
order Int
|
||||
work Work @relation(fields: [workId], references: [id], onDelete: Cascade)
|
||||
workId String
|
||||
product Product @relation(fields: [productId], references: [id], onDelete: Cascade)
|
||||
productId String
|
||||
installmentNo Int @default(0)
|
||||
|
||||
createdAt DateTime @default(now())
|
||||
createdBy User? @relation(name: "WorkProductCreatedByUser", fields: [createdByUserId], references: [id], onDelete: SetNull)
|
||||
|
|
@ -1256,4 +1258,6 @@ model RequestWork {
|
|||
|
||||
processByUser User? @relation(fields: [processByUserId], references: [id])
|
||||
processByUserId String?
|
||||
|
||||
attributes Json?
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue