feat: refactor permission product service
This commit is contained in:
parent
f9cc39522c
commit
8c0932f6d8
4 changed files with 189 additions and 292 deletions
|
|
@ -238,8 +238,6 @@ model Branch {
|
|||
contact BranchContact[]
|
||||
user BranchUser[]
|
||||
|
||||
productRegistration Product[]
|
||||
serviceRegistration Service[]
|
||||
customerRegistration Customer[]
|
||||
productGroup ProductGroup[]
|
||||
}
|
||||
|
|
@ -662,8 +660,8 @@ model ProductGroup {
|
|||
status Status @default(CREATED)
|
||||
statusOrder Int @default(0)
|
||||
|
||||
registeredBranchId String?
|
||||
registeredBranch Branch? @relation(fields: [registeredBranchId], references: [id])
|
||||
registeredBranchId String
|
||||
registeredBranch Branch @relation(fields: [registeredBranchId], references: [id])
|
||||
|
||||
createdAt DateTime @default(now())
|
||||
createdBy User? @relation(name: "ProductGroupCreatedByUser", fields: [createdByUserId], references: [id], onDelete: SetNull)
|
||||
|
|
@ -696,11 +694,8 @@ model Product {
|
|||
|
||||
remark String?
|
||||
|
||||
productGroup ProductGroup? @relation(fields: [productGroupId], references: [id], onDelete: SetNull)
|
||||
productGroupId String?
|
||||
|
||||
registeredBranchId String?
|
||||
registeredBranch Branch? @relation(fields: [registeredBranchId], references: [id])
|
||||
productGroup ProductGroup @relation(fields: [productGroupId], references: [id], onDelete: Cascade)
|
||||
productGroupId String
|
||||
|
||||
workProduct WorkProduct[]
|
||||
quotationServiceWorkProduct QuotationServiceWorkProduct[]
|
||||
|
|
@ -729,11 +724,8 @@ model Service {
|
|||
work Work[]
|
||||
quotationService QuotationService[]
|
||||
|
||||
productGroup ProductGroup? @relation(fields: [productGroupId], references: [id], onDelete: SetNull)
|
||||
productGroupId String?
|
||||
|
||||
registeredBranchId String?
|
||||
registeredBranch Branch? @relation(fields: [registeredBranchId], references: [id])
|
||||
productGroup ProductGroup @relation(fields: [productGroupId], references: [id], onDelete: Cascade)
|
||||
productGroupId String
|
||||
|
||||
createdAt DateTime @default(now())
|
||||
createdBy User? @relation(name: "ServiceCreatedByUser", fields: [createdByUserId], references: [id], onDelete: SetNull)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue