feat: change database field to enum with default

This commit is contained in:
Methapon2001 2024-04-02 11:54:11 +07:00
parent e633adc67d
commit 9f95bbd745

View file

@ -203,7 +203,7 @@ model Customer {
customerNameEN String
imageUrl String?
status String?
status Status @default(CREATED)
createdBy String?
createdAt DateTime @default(now())
@ -290,7 +290,7 @@ model Employee {
customerBranch CustomerBranch? @relation(fields: [customerBranchId], references: [id], onDelete: SetNull)
customerBranchId String?
status String?
status Status @default(CREATED)
createdBy String?
createdAt DateTime @default(now())
@ -368,11 +368,11 @@ model EmployeeOtherInfo {
model Service {
id String @id @default(uuid())
code String
name String
detail String
imageUrl String
status String?
code String
name String
detail String
status Status @default(CREATED)
createdBy String?
createdAt DateTime @default(now())
@ -384,12 +384,14 @@ model Service {
model Work {
id String @id @default(uuid())
order String
order Int
name String
service Service @relation(fields: [serviceId], references: [id], onDelete: Cascade)
serviceId String
status Status @default(CREATED)
createdBy String?
createdAt DateTime @default(now())
updateBy String?
@ -416,7 +418,8 @@ model ProductGroup {
name String
detail String
remark String
status String?
status Status @default(CREATED)
createdBy String?
createdAt DateTime @default(now())
@ -432,7 +435,8 @@ model ProductType {
name String
detail String
remark String
status String?
status Status @default(CREATED)
createdBy String?
createdAt DateTime @default(now())
@ -453,7 +457,8 @@ model Product {
agentPrice Int
serviceCharge Int
imageUrl String
status String?
status Status @default(CREATED)
productType ProductType? @relation(fields: [productTypeId], references: [id], onDelete: SetNull)
productTypeId String?