fix: error constraints
fix: error constraints
This commit is contained in:
parent
990a4687fd
commit
e29ee46a2a
1 changed files with 9 additions and 5 deletions
|
|
@ -412,11 +412,14 @@ export class ServiceController extends Controller {
|
|||
order: wIdx + 1,
|
||||
attributes: w.attributes,
|
||||
productOnWork: {
|
||||
create: w.product.map((p, pIdx) => ({
|
||||
productId: p.id,
|
||||
installmentNo: p.installmentNo,
|
||||
order: pIdx + 1,
|
||||
})),
|
||||
createMany: {
|
||||
data: w.product.map((p, pIdx) => ({
|
||||
productId: p.id,
|
||||
installmentNo: p.installmentNo,
|
||||
order: pIdx + 1,
|
||||
})),
|
||||
skipDuplicates: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
update: {
|
||||
|
|
@ -424,6 +427,7 @@ export class ServiceController extends Controller {
|
|||
order: wIdx + 1,
|
||||
attributes: w.attributes,
|
||||
productOnWork: {
|
||||
deleteMany: {},
|
||||
create: w.product.map((p, pIdx) => ({
|
||||
productId: p.id,
|
||||
installmentNo: p.installmentNo,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue