feat: change database field to enum with default
This commit is contained in:
parent
e633adc67d
commit
9f95bbd745
1 changed files with 16 additions and 11 deletions
|
|
@ -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())
|
||||
|
|
@ -371,8 +371,8 @@ model Service {
|
|||
code String
|
||||
name String
|
||||
detail String
|
||||
imageUrl String
|
||||
status 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?
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue