chore: update field quotation

This commit is contained in:
Methapon Metanipat 2024-10-04 09:22:52 +07:00
parent c27620c2b5
commit 59bb873b1c
3 changed files with 20 additions and 4 deletions

View file

@ -0,0 +1,12 @@
/*
Warnings:
- You are about to drop the column `workerCount` on the `Quotation` table. All the data in the column will be lost.
*/
-- CreateEnum
CREATE TYPE "QuotationStatus" AS ENUM ('PaymentWait', 'PaymentSuccess');
-- AlterTable
ALTER TABLE "Quotation" DROP COLUMN "workerCount",
ADD COLUMN "quotationStatus" "QuotationStatus" NOT NULL DEFAULT 'PaymentWait';

View file

@ -1010,6 +1010,11 @@ model WorkProduct {
@@id([workId, productId])
}
enum QuotationStatus {
PaymentWait
PaymentSuccess
}
enum PayCondition {
Full
Split
@ -1026,6 +1031,8 @@ model Quotation {
status Status @default(CREATED)
statusOrder Int @default(0)
quotationStatus QuotationStatus @default(PaymentWait)
code String
actorName String
@ -1043,8 +1050,7 @@ model Quotation {
payBillDate DateTime? @db.Date
workerCount Int
worker QuotationWorker[]
worker QuotationWorker[]
urgent Boolean @default(false)

View file

@ -40,7 +40,6 @@ type QuotationCreate = {
payBillDate?: Date;
workerCount: number;
// EmployeeId or Create new employee
worker: (
| string
@ -98,7 +97,6 @@ type QuotationUpdate = {
payBillDate?: Date;
workerCount?: number;
// EmployeeId or Create new employee
worker?: (
| string