feat: update request data table

This commit is contained in:
Methapon Metanipat 2024-11-14 13:09:42 +07:00
parent 82fd331205
commit e77aa8faf4
4 changed files with 23 additions and 0 deletions

View file

@ -0,0 +1,5 @@
-- CreateEnum
CREATE TYPE "RequestDataStatus" AS ENUM ('Pending', 'InProgress', 'Completed');
-- AlterTable
ALTER TABLE "RequestData" ADD COLUMN "requestDataStatus" "RequestDataStatus";

View file

@ -0,0 +1,2 @@
-- AlterTable
ALTER TABLE "RequestData" ALTER COLUMN "requestDataStatus" SET DEFAULT 'Pending';

View file

@ -0,0 +1,8 @@
/*
Warnings:
- Made the column `requestDataStatus` on table `RequestData` required. This step will fail if there are existing NULL values in that column.
*/
-- AlterTable
ALTER TABLE "RequestData" ALTER COLUMN "requestDataStatus" SET NOT NULL;

View file

@ -1360,6 +1360,12 @@ model Payment {
createdByUserId String?
}
enum RequestDataStatus {
Pending
InProgress
Completed
}
model RequestData {
id String @id @default(cuid())
@ -1369,6 +1375,8 @@ model RequestData {
quotation Quotation @relation(fields: [quotationId], references: [id], onDelete: Cascade)
quotationId String
requestDataStatus RequestDataStatus @default(Pending)
flow Json?
requestWork RequestWork[]