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,
|
order: wIdx + 1,
|
||||||
attributes: w.attributes,
|
attributes: w.attributes,
|
||||||
productOnWork: {
|
productOnWork: {
|
||||||
create: w.product.map((p, pIdx) => ({
|
createMany: {
|
||||||
productId: p.id,
|
data: w.product.map((p, pIdx) => ({
|
||||||
installmentNo: p.installmentNo,
|
productId: p.id,
|
||||||
order: pIdx + 1,
|
installmentNo: p.installmentNo,
|
||||||
})),
|
order: pIdx + 1,
|
||||||
|
})),
|
||||||
|
skipDuplicates: true,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
update: {
|
update: {
|
||||||
|
|
@ -424,6 +427,7 @@ export class ServiceController extends Controller {
|
||||||
order: wIdx + 1,
|
order: wIdx + 1,
|
||||||
attributes: w.attributes,
|
attributes: w.attributes,
|
||||||
productOnWork: {
|
productOnWork: {
|
||||||
|
deleteMany: {},
|
||||||
create: w.product.map((p, pIdx) => ({
|
create: w.product.map((p, pIdx) => ({
|
||||||
productId: p.id,
|
productId: p.id,
|
||||||
installmentNo: p.installmentNo,
|
installmentNo: p.installmentNo,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue