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
|
customerNameEN String
|
||||||
imageUrl String?
|
imageUrl String?
|
||||||
|
|
||||||
status String?
|
status Status @default(CREATED)
|
||||||
|
|
||||||
createdBy String?
|
createdBy String?
|
||||||
createdAt DateTime @default(now())
|
createdAt DateTime @default(now())
|
||||||
|
|
@ -290,7 +290,7 @@ model Employee {
|
||||||
customerBranch CustomerBranch? @relation(fields: [customerBranchId], references: [id], onDelete: SetNull)
|
customerBranch CustomerBranch? @relation(fields: [customerBranchId], references: [id], onDelete: SetNull)
|
||||||
customerBranchId String?
|
customerBranchId String?
|
||||||
|
|
||||||
status String?
|
status Status @default(CREATED)
|
||||||
|
|
||||||
createdBy String?
|
createdBy String?
|
||||||
createdAt DateTime @default(now())
|
createdAt DateTime @default(now())
|
||||||
|
|
@ -371,8 +371,8 @@ model Service {
|
||||||
code String
|
code String
|
||||||
name String
|
name String
|
||||||
detail String
|
detail String
|
||||||
imageUrl String
|
|
||||||
status String?
|
status Status @default(CREATED)
|
||||||
|
|
||||||
createdBy String?
|
createdBy String?
|
||||||
createdAt DateTime @default(now())
|
createdAt DateTime @default(now())
|
||||||
|
|
@ -384,12 +384,14 @@ model Service {
|
||||||
model Work {
|
model Work {
|
||||||
id String @id @default(uuid())
|
id String @id @default(uuid())
|
||||||
|
|
||||||
order String
|
order Int
|
||||||
name String
|
name String
|
||||||
|
|
||||||
service Service @relation(fields: [serviceId], references: [id], onDelete: Cascade)
|
service Service @relation(fields: [serviceId], references: [id], onDelete: Cascade)
|
||||||
serviceId String
|
serviceId String
|
||||||
|
|
||||||
|
status Status @default(CREATED)
|
||||||
|
|
||||||
createdBy String?
|
createdBy String?
|
||||||
createdAt DateTime @default(now())
|
createdAt DateTime @default(now())
|
||||||
updateBy String?
|
updateBy String?
|
||||||
|
|
@ -416,7 +418,8 @@ model ProductGroup {
|
||||||
name String
|
name String
|
||||||
detail String
|
detail String
|
||||||
remark String
|
remark String
|
||||||
status String?
|
|
||||||
|
status Status @default(CREATED)
|
||||||
|
|
||||||
createdBy String?
|
createdBy String?
|
||||||
createdAt DateTime @default(now())
|
createdAt DateTime @default(now())
|
||||||
|
|
@ -432,7 +435,8 @@ model ProductType {
|
||||||
name String
|
name String
|
||||||
detail String
|
detail String
|
||||||
remark String
|
remark String
|
||||||
status String?
|
|
||||||
|
status Status @default(CREATED)
|
||||||
|
|
||||||
createdBy String?
|
createdBy String?
|
||||||
createdAt DateTime @default(now())
|
createdAt DateTime @default(now())
|
||||||
|
|
@ -453,7 +457,8 @@ model Product {
|
||||||
agentPrice Int
|
agentPrice Int
|
||||||
serviceCharge Int
|
serviceCharge Int
|
||||||
imageUrl String
|
imageUrl String
|
||||||
status String?
|
|
||||||
|
status Status @default(CREATED)
|
||||||
|
|
||||||
productType ProductType? @relation(fields: [productTypeId], references: [id], onDelete: SetNull)
|
productType ProductType? @relation(fields: [productTypeId], references: [id], onDelete: SetNull)
|
||||||
productTypeId String?
|
productTypeId String?
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue