@rxdrag/rxcms-models 0.2.8 → 0.2.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/dist/classes/AttachmentOnProductQueryOptions.d.ts +14 -0
  2. package/dist/classes/MediaOnProductQueryOptions.d.ts +15 -0
  3. package/dist/classes/MediaQueryOptions.d.ts +16 -12
  4. package/dist/classes/ProductQueryOptions.d.ts +15 -12
  5. package/dist/classes/index.d.ts +2 -1
  6. package/dist/entries/attachmentOnProductEntry.d.ts +2 -0
  7. package/dist/entries/index.d.ts +2 -1
  8. package/dist/entries/mediaOnProductEntry.d.ts +2 -0
  9. package/dist/fields/AttachmentOnProductFields.d.ts +8 -0
  10. package/dist/fields/MediaFields.d.ts +5 -5
  11. package/dist/fields/MediaOnProductFields.d.ts +9 -0
  12. package/dist/fields/ProductFields.d.ts +4 -4
  13. package/dist/fields/index.d.ts +2 -1
  14. package/dist/index.mjs +228 -214
  15. package/dist/index.mjs.map +1 -1
  16. package/dist/interfaces/AttachmentOnProduct.d.ts +10 -0
  17. package/dist/interfaces/AttachmentOnProductBoolExp.d.ts +13 -0
  18. package/dist/interfaces/AttachmentOnProductDistinctExp.d.ts +5 -0
  19. package/dist/interfaces/AttachmentOnProductInput.d.ts +12 -0
  20. package/dist/interfaces/{AttachmentAddonOrderBy.d.ts → AttachmentOnProductOrderBy.d.ts} +2 -1
  21. package/dist/interfaces/Media.d.ts +7 -7
  22. package/dist/interfaces/MediaBoolExp.d.ts +5 -3
  23. package/dist/interfaces/MediaInput.d.ts +5 -5
  24. package/dist/interfaces/MediaOnProduct.d.ts +11 -0
  25. package/dist/interfaces/MediaOnProductBoolExp.d.ts +15 -0
  26. package/dist/interfaces/MediaOnProductDistinctExp.d.ts +6 -0
  27. package/dist/interfaces/MediaOnProductInput.d.ts +13 -0
  28. package/dist/interfaces/{MediaAddonOrderBy.d.ts → MediaOnProductOrderBy.d.ts} +2 -1
  29. package/dist/interfaces/Product.d.ts +7 -7
  30. package/dist/interfaces/ProductBoolExp.d.ts +5 -3
  31. package/dist/interfaces/ProductInput.d.ts +5 -5
  32. package/dist/interfaces/index.d.ts +16 -8
  33. package/package.json +2 -2
  34. package/dist/classes/MailQueryOptions.d.ts +0 -20
  35. package/dist/entries/mailEntry.d.ts +0 -2
  36. package/dist/fields/MailFields.d.ts +0 -18
  37. package/dist/interfaces/AttachmentAddon.d.ts +0 -3
  38. package/dist/interfaces/Mail.d.ts +0 -18
  39. package/dist/interfaces/MailBoolExp.d.ts +0 -22
  40. package/dist/interfaces/MailDistinctExp.d.ts +0 -17
  41. package/dist/interfaces/MailInput.d.ts +0 -19
  42. package/dist/interfaces/MailOrderBy.d.ts +0 -17
  43. package/dist/interfaces/MailType.d.ts +0 -18
  44. package/dist/interfaces/MediaAddon.d.ts +0 -4
package/dist/index.mjs CHANGED
@@ -5,16 +5,7 @@ var __publicField = (obj, key, value) => {
5
5
  return value;
6
6
  };
7
7
  import { processHasManyClear, convertHasManyToInput, processHasOneClear, convertHasOneToInput } from "@rxdrag/entify-hooks";
8
- const associationsClasses = {
9
- Product: {
10
- medias: "MediaAddon",
11
- attachments: "AttachmentAddon"
12
- },
13
- Media: {
14
- usedByProducts: "MediaAddon",
15
- attachmentOf: "AttachmentAddon"
16
- }
17
- };
8
+ const associationsClasses = {};
18
9
  const aggregateEntities = {
19
10
  User: {
20
11
  rolesAggregate: "Role",
@@ -27,12 +18,12 @@ const aggregateEntities = {
27
18
  },
28
19
  Media: {
29
20
  coverOfAggregate: "Post",
30
- usedByProductsAggregate: "Product",
31
21
  ogMetaOfPageAggregate: "Page",
32
22
  ogMetaOfProductAggregate: "Product",
33
23
  ogMetaOfPostAggregate: "Post",
34
- attachmentOfAggregate: "Product",
35
- meidaOfProductAggregate: "ProductCategory"
24
+ meidaOfProductAggregate: "ProductCategory",
25
+ productMediaPivotsAggregate: "MediaOnProduct",
26
+ productAttacPivotsAggregate: "AttachmentOnProduct"
36
27
  },
37
28
  Website: {
38
29
  usersAggregate: "User"
@@ -44,9 +35,9 @@ const aggregateEntities = {
44
35
  tagsAggregate: "Tag"
45
36
  },
46
37
  Product: {
47
- mediasAggregate: "Media",
48
38
  tagsAggregate: "Tag",
49
- attachmentsAggregate: "Media"
39
+ mediaPivotsAggregate: "MediaOnProduct",
40
+ attachmentPivotsAggregate: "AttachmentOnProduct"
50
41
  },
51
42
  TemplateCategory: {
52
43
  templatesAggregate: "Template"
@@ -289,31 +280,59 @@ const productCategoryToInput = (entity) => {
289
280
  products: convertHasManyToInput(entity.products)
290
281
  };
291
282
  };
283
+ const mediaOnProductToInputCascade = (entity) => {
284
+ return {
285
+ ...entity,
286
+ media: entity.media ? processHasOneClear({ sync: mediaToInput(entity.media) }) : void 0,
287
+ product: entity.product ? processHasOneClear({ sync: productToInput(entity.product) }) : void 0
288
+ };
289
+ };
290
+ const mediaOnProductToInput = (entity) => {
291
+ return {
292
+ ...entity,
293
+ media: convertHasOneToInput(entity.media),
294
+ product: convertHasOneToInput(entity.product)
295
+ };
296
+ };
297
+ const attachmentOnProductToInputCascade = (entity) => {
298
+ return {
299
+ ...entity,
300
+ attachment: entity.attachment ? processHasOneClear({ sync: mediaToInput(entity.attachment) }) : void 0,
301
+ product: entity.product ? processHasOneClear({ sync: productToInput(entity.product) }) : void 0
302
+ };
303
+ };
304
+ const attachmentOnProductToInput = (entity) => {
305
+ return {
306
+ ...entity,
307
+ attachment: convertHasOneToInput(entity.attachment),
308
+ product: convertHasOneToInput(entity.product)
309
+ };
310
+ };
292
311
  const productToInputCascade = (entity) => {
293
312
  var _a, _b, _c;
294
- const { mediasAggregate, tagsAggregate, attachmentsAggregate, ...rest } = entity;
313
+ const { tagsAggregate, mediaPivotsAggregate, attachmentPivotsAggregate, ...rest } = entity;
295
314
  return {
296
315
  ...rest,
297
316
  category: entity.category ? processHasOneClear({ sync: productCategoryToInput(entity.category) }) : void 0,
298
- medias: entity.medias ? processHasManyClear({ sync: (_a = entity.medias) == null ? void 0 : _a.map((ent) => mediaToInput(ent)) }) : void 0,
299
- tags: entity.tags ? processHasManyClear({ sync: (_b = entity.tags) == null ? void 0 : _b.map((ent) => tagToInput(ent)) }) : void 0,
317
+ tags: entity.tags ? processHasManyClear({ sync: (_a = entity.tags) == null ? void 0 : _a.map((ent) => tagToInput(ent)) }) : void 0,
300
318
  ogImage: entity.ogImage ? processHasOneClear({ sync: mediaToInput(entity.ogImage) }) : void 0,
301
- attachments: entity.attachments ? processHasManyClear({ sync: (_c = entity.attachments) == null ? void 0 : _c.map((ent) => mediaToInput(ent)) }) : void 0,
302
319
  draftOf: entity.draftOf ? processHasOneClear({ sync: productToInput(entity.draftOf) }) : void 0,
320
+ mediaPivots: entity.mediaPivots ? processHasManyClear({ sync: (_b = entity.mediaPivots) == null ? void 0 : _b.map((ent) => mediaOnProductToInput(ent)) }) : void 0,
321
+ attachmentPivots: entity.attachmentPivots ? processHasManyClear({ sync: (_c = entity.attachmentPivots) == null ? void 0 : _c.map((ent) => attachmentOnProductToInput(ent)) }) : void 0,
303
322
  creator: entity.creator ? processHasOneClear({ sync: userToInput(entity.creator) }) : void 0,
304
323
  draft: entity.draft ? processHasOneClear({ sync: productToInput(entity.draft) }) : void 0
305
324
  };
306
325
  };
307
326
  const productToInput = (entity) => {
308
- const { mediasAggregate, tagsAggregate, attachmentsAggregate, ...rest } = entity;
327
+ const { tagsAggregate, mediaPivotsAggregate, attachmentPivotsAggregate, ...rest } = entity;
309
328
  return {
310
329
  ...rest,
311
330
  category: convertHasOneToInput(entity.category),
312
- medias: convertHasManyToInput(entity.medias),
313
331
  tags: convertHasManyToInput(entity.tags),
314
332
  ogImage: convertHasOneToInput(entity.ogImage),
315
- attachments: convertHasManyToInput(entity.attachments),
316
333
  draftOf: convertHasOneToInput(entity.draftOf),
334
+ mediaPivots: convertHasManyToInput(entity.mediaPivots),
335
+ attachmentPivots: convertHasManyToInput(entity.attachmentPivots),
317
336
  creator: convertHasOneToInput(entity.creator),
318
337
  draft: convertHasOneToInput(entity.draft)
319
338
  };
@@ -485,33 +504,33 @@ const pageToInput = (entity) => {
485
504
  };
486
505
  const mediaToInputCascade = (entity) => {
487
506
  var _a, _b, _c, _d, _e, _f, _g;
488
- const { file, coverOfAggregate, usedByProductsAggregate, ogMetaOfPageAggregate, ogMetaOfProductAggregate, ogMetaOfPostAggregate, attachmentOfAggregate, meidaOfProductAggregate, ...rest } = entity;
507
+ const { file, coverOfAggregate, ogMetaOfPageAggregate, ogMetaOfProductAggregate, ogMetaOfPostAggregate, meidaOfProductAggregate, productMediaPivotsAggregate, productAttacPivotsAggregate, ...rest } = entity;
489
508
  return {
490
509
  ...rest,
491
510
  folder: entity.folder ? processHasOneClear({ sync: mediaFolderToInput(entity.folder) }) : void 0,
492
511
  coverOf: entity.coverOf ? processHasManyClear({ sync: (_a = entity.coverOf) == null ? void 0 : _a.map((ent) => postToInput(ent)) }) : void 0,
493
512
  avatarOfUser: entity.avatarOfUser ? processHasOneClear({ sync: userToInput(entity.avatarOfUser) }) : void 0,
494
- usedByProducts: entity.usedByProducts ? processHasManyClear({ sync: (_b = entity.usedByProducts) == null ? void 0 : _b.map((ent) => productToInput(ent)) }) : void 0,
495
- ogMetaOfPage: entity.ogMetaOfPage ? processHasManyClear({ sync: (_c = entity.ogMetaOfPage) == null ? void 0 : _c.map((ent) => pageToInput(ent)) }) : void 0,
496
- ogMetaOfProduct: entity.ogMetaOfProduct ? processHasManyClear({ sync: (_d = entity.ogMetaOfProduct) == null ? void 0 : _d.map((ent) => productToInput(ent)) }) : void 0,
497
- ogMetaOfPost: entity.ogMetaOfPost ? processHasManyClear({ sync: (_e = entity.ogMetaOfPost) == null ? void 0 : _e.map((ent) => postToInput(ent)) }) : void 0,
498
- attachmentOf: entity.attachmentOf ? processHasManyClear({ sync: (_f = entity.attachmentOf) == null ? void 0 : _f.map((ent) => productToInput(ent)) }) : void 0,
499
- meidaOfProduct: entity.meidaOfProduct ? processHasManyClear({ sync: (_g = entity.meidaOfProduct) == null ? void 0 : _g.map((ent) => productCategoryToInput(ent)) }) : void 0
513
+ ogMetaOfPage: entity.ogMetaOfPage ? processHasManyClear({ sync: (_b = entity.ogMetaOfPage) == null ? void 0 : _b.map((ent) => pageToInput(ent)) }) : void 0,
514
+ ogMetaOfProduct: entity.ogMetaOfProduct ? processHasManyClear({ sync: (_c = entity.ogMetaOfProduct) == null ? void 0 : _c.map((ent) => productToInput(ent)) }) : void 0,
515
+ ogMetaOfPost: entity.ogMetaOfPost ? processHasManyClear({ sync: (_d = entity.ogMetaOfPost) == null ? void 0 : _d.map((ent) => postToInput(ent)) }) : void 0,
516
+ meidaOfProduct: entity.meidaOfProduct ? processHasManyClear({ sync: (_e = entity.meidaOfProduct) == null ? void 0 : _e.map((ent) => productCategoryToInput(ent)) }) : void 0,
517
+ productMediaPivots: entity.productMediaPivots ? processHasManyClear({ sync: (_f = entity.productMediaPivots) == null ? void 0 : _f.map((ent) => mediaOnProductToInput(ent)) }) : void 0,
518
+ productAttacPivots: entity.productAttacPivots ? processHasManyClear({ sync: (_g = entity.productAttacPivots) == null ? void 0 : _g.map((ent) => attachmentOnProductToInput(ent)) }) : void 0
500
519
  };
501
520
  };
502
521
  const mediaToInput = (entity) => {
503
- const { file, coverOfAggregate, usedByProductsAggregate, ogMetaOfPageAggregate, ogMetaOfProductAggregate, ogMetaOfPostAggregate, attachmentOfAggregate, meidaOfProductAggregate, ...rest } = entity;
522
+ const { file, coverOfAggregate, ogMetaOfPageAggregate, ogMetaOfProductAggregate, ogMetaOfPostAggregate, meidaOfProductAggregate, productMediaPivotsAggregate, productAttacPivotsAggregate, ...rest } = entity;
504
523
  return {
505
524
  ...rest,
506
525
  folder: convertHasOneToInput(entity.folder),
507
526
  coverOf: convertHasManyToInput(entity.coverOf),
508
527
  avatarOfUser: convertHasOneToInput(entity.avatarOfUser),
509
- usedByProducts: convertHasManyToInput(entity.usedByProducts),
510
528
  ogMetaOfPage: convertHasManyToInput(entity.ogMetaOfPage),
511
529
  ogMetaOfProduct: convertHasManyToInput(entity.ogMetaOfProduct),
512
530
  ogMetaOfPost: convertHasManyToInput(entity.ogMetaOfPost),
513
- attachmentOf: convertHasManyToInput(entity.attachmentOf),
514
- meidaOfProduct: convertHasManyToInput(entity.meidaOfProduct)
531
+ meidaOfProduct: convertHasManyToInput(entity.meidaOfProduct),
532
+ productMediaPivots: convertHasManyToInput(entity.productMediaPivots),
533
+ productAttacPivots: convertHasManyToInput(entity.productAttacPivots)
515
534
  };
516
535
  };
517
536
  const userToInputCascade = (entity) => {
@@ -624,42 +643,6 @@ var MediaType = /* @__PURE__ */ ((MediaType2) => {
624
643
  MediaType2["document"] = "document";
625
644
  return MediaType2;
626
645
  })(MediaType || {});
627
- const MailEntityName = "Mail";
628
- const MailEntityLabel = "";
629
- const mailToInputCascade = (entity) => {
630
- return {
631
- ...entity
632
- };
633
- };
634
- const mailToInput = (entity) => {
635
- return {
636
- ...entity
637
- };
638
- };
639
- var MailDistinctEnum = /* @__PURE__ */ ((MailDistinctEnum2) => {
640
- MailDistinctEnum2["id"] = "id";
641
- MailDistinctEnum2["createdAt"] = "createdAt";
642
- MailDistinctEnum2["updatedAt"] = "updatedAt";
643
- MailDistinctEnum2["taskId"] = "taskId";
644
- MailDistinctEnum2["taskName"] = "taskName";
645
- MailDistinctEnum2["remark"] = "remark";
646
- MailDistinctEnum2["subject"] = "subject";
647
- MailDistinctEnum2["message"] = "message";
648
- MailDistinctEnum2["to"] = "to";
649
- MailDistinctEnum2["cc"] = "cc";
650
- MailDistinctEnum2["label"] = "label";
651
- MailDistinctEnum2["name"] = "name";
652
- MailDistinctEnum2["company"] = "company";
653
- MailDistinctEnum2["mailType"] = "mailType";
654
- return MailDistinctEnum2;
655
- })(MailDistinctEnum || {});
656
- var MailType = /* @__PURE__ */ ((MailType2) => {
657
- MailType2["default"] = "default";
658
- MailType2["getPrice"] = "getPrice";
659
- MailType2["findPassword"] = "findPassword";
660
- MailType2["notice"] = "notice";
661
- return MailType2;
662
- })(MailType || {});
663
646
  const WebsiteEntityName = "Website";
664
647
  const WebsiteEntityLabel = "站点";
665
648
  var WebsiteDistinctEnum = /* @__PURE__ */ ((WebsiteDistinctEnum2) => {
@@ -1243,6 +1226,21 @@ var SpamFilterRuleDistinctEnum = /* @__PURE__ */ ((SpamFilterRuleDistinctEnum2)
1243
1226
  SpamFilterRuleDistinctEnum2["remark"] = "remark";
1244
1227
  return SpamFilterRuleDistinctEnum2;
1245
1228
  })(SpamFilterRuleDistinctEnum || {});
1229
+ const MediaOnProductEntityName = "MediaOnProduct";
1230
+ const MediaOnProductEntityLabel = "";
1231
+ var MediaOnProductDistinctEnum = /* @__PURE__ */ ((MediaOnProductDistinctEnum2) => {
1232
+ MediaOnProductDistinctEnum2["id"] = "id";
1233
+ MediaOnProductDistinctEnum2["altText"] = "altText";
1234
+ MediaOnProductDistinctEnum2["seqValue"] = "seqValue";
1235
+ return MediaOnProductDistinctEnum2;
1236
+ })(MediaOnProductDistinctEnum || {});
1237
+ const AttachmentOnProductEntityName = "AttachmentOnProduct";
1238
+ const AttachmentOnProductEntityLabel = "";
1239
+ var AttachmentOnProductDistinctEnum = /* @__PURE__ */ ((AttachmentOnProductDistinctEnum2) => {
1240
+ AttachmentOnProductDistinctEnum2["id"] = "id";
1241
+ AttachmentOnProductDistinctEnum2["seqValue"] = "seqValue";
1242
+ return AttachmentOnProductDistinctEnum2;
1243
+ })(AttachmentOnProductDistinctEnum || {});
1246
1244
  class RoleQueryOptions extends QueryOptions {
1247
1245
  constructor(fields, queryArgs) {
1248
1246
  super(RoleEntityName, fields, queryArgs);
@@ -1452,6 +1450,68 @@ class ProductCategoryQueryOptions extends QueryOptions {
1452
1450
  return this;
1453
1451
  }
1454
1452
  }
1453
+ class MediaOnProductQueryOptions extends QueryOptions {
1454
+ constructor(fields, queryArgs) {
1455
+ super(MediaOnProductEntityName, fields, queryArgs);
1456
+ }
1457
+ id() {
1458
+ this.addField("id");
1459
+ return this;
1460
+ }
1461
+ altText() {
1462
+ this.addField("altText");
1463
+ return this;
1464
+ }
1465
+ seqValue() {
1466
+ this.addField("seqValue");
1467
+ return this;
1468
+ }
1469
+ media(options) {
1470
+ if (Array.isArray(options)) {
1471
+ this._associations["media"] = new MediaQueryOptions(options);
1472
+ } else {
1473
+ this._associations["media"] = options || new MediaQueryOptions(["id"]);
1474
+ }
1475
+ return this;
1476
+ }
1477
+ product(options) {
1478
+ if (Array.isArray(options)) {
1479
+ this._associations["product"] = new ProductQueryOptions(options);
1480
+ } else {
1481
+ this._associations["product"] = options || new ProductQueryOptions(["id"]);
1482
+ }
1483
+ return this;
1484
+ }
1485
+ }
1486
+ class AttachmentOnProductQueryOptions extends QueryOptions {
1487
+ constructor(fields, queryArgs) {
1488
+ super(AttachmentOnProductEntityName, fields, queryArgs);
1489
+ }
1490
+ id() {
1491
+ this.addField("id");
1492
+ return this;
1493
+ }
1494
+ seqValue() {
1495
+ this.addField("seqValue");
1496
+ return this;
1497
+ }
1498
+ attachment(options) {
1499
+ if (Array.isArray(options)) {
1500
+ this._associations["attachment"] = new MediaQueryOptions(options);
1501
+ } else {
1502
+ this._associations["attachment"] = options || new MediaQueryOptions(["id"]);
1503
+ }
1504
+ return this;
1505
+ }
1506
+ product(options) {
1507
+ if (Array.isArray(options)) {
1508
+ this._associations["product"] = new ProductQueryOptions(options);
1509
+ } else {
1510
+ this._associations["product"] = options || new ProductQueryOptions(["id"]);
1511
+ }
1512
+ return this;
1513
+ }
1514
+ }
1455
1515
  class ProductQueryOptions extends QueryOptions {
1456
1516
  constructor(fields, queryArgs) {
1457
1517
  super(ProductEntityName, fields, queryArgs);
@@ -1619,18 +1679,6 @@ class ProductQueryOptions extends QueryOptions {
1619
1679
  }
1620
1680
  return this;
1621
1681
  }
1622
- medias(options) {
1623
- if (Array.isArray(options)) {
1624
- this._associations["medias"] = new MediaQueryOptions(options);
1625
- } else {
1626
- this._associations["medias"] = options || new MediaQueryOptions(["id"]);
1627
- }
1628
- return this;
1629
- }
1630
- mediasAggregate(aggregate) {
1631
- this._aggregates["mediasAggregate"] = aggregate;
1632
- return this;
1633
- }
1634
1682
  tags(options) {
1635
1683
  if (Array.isArray(options)) {
1636
1684
  this._associations["tags"] = new TagQueryOptions(options);
@@ -1651,26 +1699,38 @@ class ProductQueryOptions extends QueryOptions {
1651
1699
  }
1652
1700
  return this;
1653
1701
  }
1654
- attachments(options) {
1702
+ draftOf(options) {
1655
1703
  if (Array.isArray(options)) {
1656
- this._associations["attachments"] = new MediaQueryOptions(options);
1704
+ this._associations["draftOf"] = new ProductQueryOptions(options);
1657
1705
  } else {
1658
- this._associations["attachments"] = options || new MediaQueryOptions(["id"]);
1706
+ this._associations["draftOf"] = options || new ProductQueryOptions(["id"]);
1659
1707
  }
1660
1708
  return this;
1661
1709
  }
1662
- attachmentsAggregate(aggregate) {
1663
- this._aggregates["attachmentsAggregate"] = aggregate;
1710
+ mediaPivots(options) {
1711
+ if (Array.isArray(options)) {
1712
+ this._associations["mediaPivots"] = new MediaOnProductQueryOptions(options);
1713
+ } else {
1714
+ this._associations["mediaPivots"] = options || new MediaOnProductQueryOptions(["id"]);
1715
+ }
1664
1716
  return this;
1665
1717
  }
1666
- draftOf(options) {
1718
+ mediaPivotsAggregate(aggregate) {
1719
+ this._aggregates["mediaPivotsAggregate"] = aggregate;
1720
+ return this;
1721
+ }
1722
+ attachmentPivots(options) {
1667
1723
  if (Array.isArray(options)) {
1668
- this._associations["draftOf"] = new ProductQueryOptions(options);
1724
+ this._associations["attachmentPivots"] = new AttachmentOnProductQueryOptions(options);
1669
1725
  } else {
1670
- this._associations["draftOf"] = options || new ProductQueryOptions(["id"]);
1726
+ this._associations["attachmentPivots"] = options || new AttachmentOnProductQueryOptions(["id"]);
1671
1727
  }
1672
1728
  return this;
1673
1729
  }
1730
+ attachmentPivotsAggregate(aggregate) {
1731
+ this._aggregates["attachmentPivotsAggregate"] = aggregate;
1732
+ return this;
1733
+ }
1674
1734
  creator(options) {
1675
1735
  if (Array.isArray(options)) {
1676
1736
  this._associations["creator"] = new UserQueryOptions(options);
@@ -2653,18 +2713,6 @@ class MediaQueryOptions extends QueryOptions {
2653
2713
  }
2654
2714
  return this;
2655
2715
  }
2656
- usedByProducts(options) {
2657
- if (Array.isArray(options)) {
2658
- this._associations["usedByProducts"] = new ProductQueryOptions(options);
2659
- } else {
2660
- this._associations["usedByProducts"] = options || new ProductQueryOptions(["id"]);
2661
- }
2662
- return this;
2663
- }
2664
- usedByProductsAggregate(aggregate) {
2665
- this._aggregates["usedByProductsAggregate"] = aggregate;
2666
- return this;
2667
- }
2668
2716
  ogMetaOfPage(options) {
2669
2717
  if (Array.isArray(options)) {
2670
2718
  this._associations["ogMetaOfPage"] = new PageQueryOptions(options);
@@ -2701,28 +2749,40 @@ class MediaQueryOptions extends QueryOptions {
2701
2749
  this._aggregates["ogMetaOfPostAggregate"] = aggregate;
2702
2750
  return this;
2703
2751
  }
2704
- attachmentOf(options) {
2752
+ meidaOfProduct(options) {
2705
2753
  if (Array.isArray(options)) {
2706
- this._associations["attachmentOf"] = new ProductQueryOptions(options);
2754
+ this._associations["meidaOfProduct"] = new ProductCategoryQueryOptions(options);
2707
2755
  } else {
2708
- this._associations["attachmentOf"] = options || new ProductQueryOptions(["id"]);
2756
+ this._associations["meidaOfProduct"] = options || new ProductCategoryQueryOptions(["id"]);
2709
2757
  }
2710
2758
  return this;
2711
2759
  }
2712
- attachmentOfAggregate(aggregate) {
2713
- this._aggregates["attachmentOfAggregate"] = aggregate;
2760
+ meidaOfProductAggregate(aggregate) {
2761
+ this._aggregates["meidaOfProductAggregate"] = aggregate;
2714
2762
  return this;
2715
2763
  }
2716
- meidaOfProduct(options) {
2764
+ productMediaPivots(options) {
2717
2765
  if (Array.isArray(options)) {
2718
- this._associations["meidaOfProduct"] = new ProductCategoryQueryOptions(options);
2766
+ this._associations["productMediaPivots"] = new MediaOnProductQueryOptions(options);
2719
2767
  } else {
2720
- this._associations["meidaOfProduct"] = options || new ProductCategoryQueryOptions(["id"]);
2768
+ this._associations["productMediaPivots"] = options || new MediaOnProductQueryOptions(["id"]);
2721
2769
  }
2722
2770
  return this;
2723
2771
  }
2724
- meidaOfProductAggregate(aggregate) {
2725
- this._aggregates["meidaOfProductAggregate"] = aggregate;
2772
+ productMediaPivotsAggregate(aggregate) {
2773
+ this._aggregates["productMediaPivotsAggregate"] = aggregate;
2774
+ return this;
2775
+ }
2776
+ productAttacPivots(options) {
2777
+ if (Array.isArray(options)) {
2778
+ this._associations["productAttacPivots"] = new AttachmentOnProductQueryOptions(options);
2779
+ } else {
2780
+ this._associations["productAttacPivots"] = options || new AttachmentOnProductQueryOptions(["id"]);
2781
+ }
2782
+ return this;
2783
+ }
2784
+ productAttacPivotsAggregate(aggregate) {
2785
+ this._aggregates["productAttacPivotsAggregate"] = aggregate;
2726
2786
  return this;
2727
2787
  }
2728
2788
  }
@@ -2930,67 +2990,6 @@ class AbilityQueryOptions extends QueryOptions {
2930
2990
  return this;
2931
2991
  }
2932
2992
  }
2933
- class MailQueryOptions extends QueryOptions {
2934
- constructor(fields, queryArgs) {
2935
- super(MailEntityName, fields, queryArgs);
2936
- }
2937
- id() {
2938
- this.addField("id");
2939
- return this;
2940
- }
2941
- createdAt() {
2942
- this.addField("createdAt");
2943
- return this;
2944
- }
2945
- updatedAt() {
2946
- this.addField("updatedAt");
2947
- return this;
2948
- }
2949
- taskId() {
2950
- this.addField("taskId");
2951
- return this;
2952
- }
2953
- taskName() {
2954
- this.addField("taskName");
2955
- return this;
2956
- }
2957
- remark() {
2958
- this.addField("remark");
2959
- return this;
2960
- }
2961
- subject() {
2962
- this.addField("subject");
2963
- return this;
2964
- }
2965
- message() {
2966
- this.addField("message");
2967
- return this;
2968
- }
2969
- to() {
2970
- this.addField("to");
2971
- return this;
2972
- }
2973
- cc() {
2974
- this.addField("cc");
2975
- return this;
2976
- }
2977
- label() {
2978
- this.addField("label");
2979
- return this;
2980
- }
2981
- name() {
2982
- this.addField("name");
2983
- return this;
2984
- }
2985
- company() {
2986
- this.addField("company");
2987
- return this;
2988
- }
2989
- mailType() {
2990
- this.addField("mailType");
2991
- return this;
2992
- }
2993
- }
2994
2993
  class LangQueryOptions extends QueryOptions {
2995
2994
  constructor(fields, queryArgs) {
2996
2995
  super(LangEntityName, fields, queryArgs);
@@ -3482,11 +3481,6 @@ const mediaEntry = {
3482
3481
  entityLabel: MediaEntityLabel,
3483
3482
  toInput: mediaToInput
3484
3483
  };
3485
- const mailEntry = {
3486
- entityName: MailEntityName,
3487
- entityLabel: MailEntityLabel,
3488
- toInput: mailToInput
3489
- };
3490
3484
  const websiteEntry = {
3491
3485
  entityName: WebsiteEntityName,
3492
3486
  entityLabel: WebsiteEntityLabel,
@@ -3572,6 +3566,16 @@ const spamFilterRuleEntry = {
3572
3566
  entityLabel: SpamFilterRuleEntityLabel,
3573
3567
  toInput: spamFilterRuleToInput
3574
3568
  };
3569
+ const mediaOnProductEntry = {
3570
+ entityName: MediaOnProductEntityName,
3571
+ entityLabel: MediaOnProductEntityLabel,
3572
+ toInput: mediaOnProductToInput
3573
+ };
3574
+ const attachmentOnProductEntry = {
3575
+ entityName: AttachmentOnProductEntityName,
3576
+ entityLabel: AttachmentOnProductEntityLabel,
3577
+ toInput: attachmentOnProductToInput
3578
+ };
3575
3579
  var UserFields = /* @__PURE__ */ ((UserFields2) => {
3576
3580
  UserFields2["id"] = "id";
3577
3581
  UserFields2["loginName"] = "loginName";
@@ -3653,39 +3657,20 @@ var MediaAssciations = /* @__PURE__ */ ((MediaAssciations2) => {
3653
3657
  MediaAssciations2["coverOf"] = "coverOf";
3654
3658
  MediaAssciations2["coverOfAggregate"] = "coverOfAggregate";
3655
3659
  MediaAssciations2["avatarOfUser"] = "avatarOfUser";
3656
- MediaAssciations2["usedByProducts"] = "usedByProducts";
3657
- MediaAssciations2["usedByProductsAggregate"] = "usedByProductsAggregate";
3658
3660
  MediaAssciations2["ogMetaOfPage"] = "ogMetaOfPage";
3659
3661
  MediaAssciations2["ogMetaOfPageAggregate"] = "ogMetaOfPageAggregate";
3660
3662
  MediaAssciations2["ogMetaOfProduct"] = "ogMetaOfProduct";
3661
3663
  MediaAssciations2["ogMetaOfProductAggregate"] = "ogMetaOfProductAggregate";
3662
3664
  MediaAssciations2["ogMetaOfPost"] = "ogMetaOfPost";
3663
3665
  MediaAssciations2["ogMetaOfPostAggregate"] = "ogMetaOfPostAggregate";
3664
- MediaAssciations2["attachmentOf"] = "attachmentOf";
3665
- MediaAssciations2["attachmentOfAggregate"] = "attachmentOfAggregate";
3666
3666
  MediaAssciations2["meidaOfProduct"] = "meidaOfProduct";
3667
3667
  MediaAssciations2["meidaOfProductAggregate"] = "meidaOfProductAggregate";
3668
+ MediaAssciations2["productMediaPivots"] = "productMediaPivots";
3669
+ MediaAssciations2["productMediaPivotsAggregate"] = "productMediaPivotsAggregate";
3670
+ MediaAssciations2["productAttacPivots"] = "productAttacPivots";
3671
+ MediaAssciations2["productAttacPivotsAggregate"] = "productAttacPivotsAggregate";
3668
3672
  return MediaAssciations2;
3669
3673
  })(MediaAssciations || {});
3670
- var MailFields = /* @__PURE__ */ ((MailFields2) => {
3671
- MailFields2["id"] = "id";
3672
- MailFields2["createdAt"] = "createdAt";
3673
- MailFields2["updatedAt"] = "updatedAt";
3674
- MailFields2["taskId"] = "taskId";
3675
- MailFields2["taskName"] = "taskName";
3676
- MailFields2["remark"] = "remark";
3677
- MailFields2["subject"] = "subject";
3678
- MailFields2["message"] = "message";
3679
- MailFields2["to"] = "to";
3680
- MailFields2["cc"] = "cc";
3681
- MailFields2["label"] = "label";
3682
- MailFields2["name"] = "name";
3683
- MailFields2["company"] = "company";
3684
- MailFields2["mailType"] = "mailType";
3685
- return MailFields2;
3686
- })(MailFields || {});
3687
- var MailAssciations = /* @__PURE__ */ ((MailAssciations2) => {
3688
- })();
3689
3674
  var WebsiteFields = /* @__PURE__ */ ((WebsiteFields2) => {
3690
3675
  WebsiteFields2["id"] = "id";
3691
3676
  WebsiteFields2["name"] = "name";
@@ -3856,14 +3841,14 @@ var ProductFields = /* @__PURE__ */ ((ProductFields2) => {
3856
3841
  })(ProductFields || {});
3857
3842
  var ProductAssciations = /* @__PURE__ */ ((ProductAssciations2) => {
3858
3843
  ProductAssciations2["category"] = "category";
3859
- ProductAssciations2["medias"] = "medias";
3860
- ProductAssciations2["mediasAggregate"] = "mediasAggregate";
3861
3844
  ProductAssciations2["tags"] = "tags";
3862
3845
  ProductAssciations2["tagsAggregate"] = "tagsAggregate";
3863
3846
  ProductAssciations2["ogImage"] = "ogImage";
3864
- ProductAssciations2["attachments"] = "attachments";
3865
- ProductAssciations2["attachmentsAggregate"] = "attachmentsAggregate";
3866
3847
  ProductAssciations2["draftOf"] = "draftOf";
3848
+ ProductAssciations2["mediaPivots"] = "mediaPivots";
3849
+ ProductAssciations2["mediaPivotsAggregate"] = "mediaPivotsAggregate";
3850
+ ProductAssciations2["attachmentPivots"] = "attachmentPivots";
3851
+ ProductAssciations2["attachmentPivotsAggregate"] = "attachmentPivotsAggregate";
3867
3852
  ProductAssciations2["creator"] = "creator";
3868
3853
  ProductAssciations2["draft"] = "draft";
3869
3854
  return ProductAssciations2;
@@ -4104,6 +4089,27 @@ var SpamFilterRuleFields = /* @__PURE__ */ ((SpamFilterRuleFields2) => {
4104
4089
  })(SpamFilterRuleFields || {});
4105
4090
  var SpamFilterRuleAssciations = /* @__PURE__ */ ((SpamFilterRuleAssciations2) => {
4106
4091
  })();
4092
+ var MediaOnProductFields = /* @__PURE__ */ ((MediaOnProductFields2) => {
4093
+ MediaOnProductFields2["id"] = "id";
4094
+ MediaOnProductFields2["altText"] = "altText";
4095
+ MediaOnProductFields2["seqValue"] = "seqValue";
4096
+ return MediaOnProductFields2;
4097
+ })(MediaOnProductFields || {});
4098
+ var MediaOnProductAssciations = /* @__PURE__ */ ((MediaOnProductAssciations2) => {
4099
+ MediaOnProductAssciations2["media"] = "media";
4100
+ MediaOnProductAssciations2["product"] = "product";
4101
+ return MediaOnProductAssciations2;
4102
+ })(MediaOnProductAssciations || {});
4103
+ var AttachmentOnProductFields = /* @__PURE__ */ ((AttachmentOnProductFields2) => {
4104
+ AttachmentOnProductFields2["id"] = "id";
4105
+ AttachmentOnProductFields2["seqValue"] = "seqValue";
4106
+ return AttachmentOnProductFields2;
4107
+ })(AttachmentOnProductFields || {});
4108
+ var AttachmentOnProductAssciations = /* @__PURE__ */ ((AttachmentOnProductAssciations2) => {
4109
+ AttachmentOnProductAssciations2["attachment"] = "attachment";
4110
+ AttachmentOnProductAssciations2["product"] = "product";
4111
+ return AttachmentOnProductAssciations2;
4112
+ })(AttachmentOnProductAssciations || {});
4107
4113
  export {
4108
4114
  AbilityAssciations,
4109
4115
  AbilityDistinctEnum,
@@ -4112,6 +4118,12 @@ export {
4112
4118
  AbilityFields,
4113
4119
  AbilityQueryOptions,
4114
4120
  AbilityType,
4121
+ AttachmentOnProductAssciations,
4122
+ AttachmentOnProductDistinctEnum,
4123
+ AttachmentOnProductEntityLabel,
4124
+ AttachmentOnProductEntityName,
4125
+ AttachmentOnProductFields,
4126
+ AttachmentOnProductQueryOptions,
4115
4127
  BaseEntityDistinctEnum,
4116
4128
  ComponentType,
4117
4129
  CustomerAssciations,
@@ -4134,13 +4146,6 @@ export {
4134
4146
  LangEntityName,
4135
4147
  LangFields,
4136
4148
  LangQueryOptions,
4137
- MailAssciations,
4138
- MailDistinctEnum,
4139
- MailEntityLabel,
4140
- MailEntityName,
4141
- MailFields,
4142
- MailQueryOptions,
4143
- MailType,
4144
4149
  MediaAssciations,
4145
4150
  MediaDistinctEnum,
4146
4151
  MediaEntityLabel,
@@ -4152,6 +4157,12 @@ export {
4152
4157
  MediaFolderEntityName,
4153
4158
  MediaFolderFields,
4154
4159
  MediaFolderQueryOptions,
4160
+ MediaOnProductAssciations,
4161
+ MediaOnProductDistinctEnum,
4162
+ MediaOnProductEntityLabel,
4163
+ MediaOnProductEntityName,
4164
+ MediaOnProductFields,
4165
+ MediaOnProductQueryOptions,
4155
4166
  MediaQueryOptions,
4156
4167
  MediaType,
4157
4168
  MultiLangableDistinctEnum,
@@ -4262,6 +4273,9 @@ export {
4262
4273
  abilityToInputCascade,
4263
4274
  aggregateEntities,
4264
4275
  associationsClasses,
4276
+ attachmentOnProductEntry,
4277
+ attachmentOnProductToInput,
4278
+ attachmentOnProductToInputCascade,
4265
4279
  customerEntry,
4266
4280
  customerToInput,
4267
4281
  customerToInputCascade,
@@ -4271,13 +4285,13 @@ export {
4271
4285
  langEntry,
4272
4286
  langToInput,
4273
4287
  langToInputCascade,
4274
- mailEntry,
4275
- mailToInput,
4276
- mailToInputCascade,
4277
4288
  mediaEntry,
4278
4289
  mediaFolderEntry,
4279
4290
  mediaFolderToInput,
4280
4291
  mediaFolderToInputCascade,
4292
+ mediaOnProductEntry,
4293
+ mediaOnProductToInput,
4294
+ mediaOnProductToInputCascade,
4281
4295
  mediaToInput,
4282
4296
  mediaToInputCascade,
4283
4297
  pageEntry,