BusinessMongoDbContextModelCreatingExtensions.cs 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  1. using Business.Domain;
  2. using Microsoft.Extensions.Hosting;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Linq;
  6. using System.Security.Cryptography.Xml;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. using Volo.Abp.MongoDB;
  10. using Volo.Abp;
  11. namespace Bussiness.MongoDB
  12. {
  13. public static class BusinessMongoDbContextModelCreatingExtensions
  14. {
  15. public static void Configure(this IMongoModelBuilder builder)
  16. {
  17. Check.NotNull(builder, nameof(builder));
  18. builder.Entity<mo_ic_bom>(b =>
  19. {
  20. b.CollectionName = "mo_ic_bom";
  21. b.BsonMap.AutoMap();
  22. b.BsonMap.SetIgnoreExtraElements(true);
  23. });
  24. builder.Entity<mo_ic_bom_child>(b =>
  25. {
  26. b.CollectionName = "mo_ic_bom_child";
  27. b.BsonMap.AutoMap();
  28. b.BsonMap.SetIgnoreExtraElements(true);
  29. });
  30. builder.Entity<mo_ic_item>(b =>
  31. {
  32. b.CollectionName = "mo_ic_item";
  33. b.BsonMap.AutoMap();
  34. b.BsonMap.SetIgnoreExtraElements(true);
  35. });
  36. builder.Entity<mo_ic_item_stock>(b =>
  37. {
  38. b.CollectionName = "mo_ic_item_stock";
  39. b.BsonMap.AutoMap();
  40. b.BsonMap.SetIgnoreExtraElements(true);
  41. });
  42. builder.Entity<mo_ic_item_stockoccupy>(b =>
  43. {
  44. b.CollectionName = "mo_ic_item_stockoccupy";
  45. b.BsonMap.AutoMap();
  46. b.BsonMap.SetIgnoreExtraElements(true);
  47. });
  48. builder.Entity<mo_ic_substitute>(b =>
  49. {
  50. b.CollectionName = "mo_ic_substitute";
  51. b.BsonMap.AutoMap();
  52. b.BsonMap.SetIgnoreExtraElements(true);
  53. });
  54. builder.Entity<mo_ic_substitute_group>(b =>
  55. {
  56. b.CollectionName = "mo_ic_substitute_group";
  57. b.BsonMap.AutoMap();
  58. b.BsonMap.SetIgnoreExtraElements(true);
  59. });
  60. builder.Entity<mo_ic_substitute_group_detail>(b =>
  61. {
  62. b.CollectionName = "mo_ic_substitute_group_detail";
  63. b.BsonMap.AutoMap();
  64. b.BsonMap.SetIgnoreExtraElements(true);
  65. });
  66. builder.Entity<mo_mes_moentry>(b =>
  67. {
  68. b.CollectionName = "mo_mes_moentry";
  69. b.BsonMap.AutoMap();
  70. b.BsonMap.SetIgnoreExtraElements(true);
  71. });
  72. builder.Entity<mo_mes_mooccupy>(b =>
  73. {
  74. b.CollectionName = "mo_mes_mooccupy";
  75. b.BsonMap.AutoMap();
  76. b.BsonMap.SetIgnoreExtraElements(true);
  77. });
  78. builder.Entity<mo_mes_morder>(b =>
  79. {
  80. b.CollectionName = "mo_mes_morder";
  81. b.BsonMap.AutoMap();
  82. b.BsonMap.SetIgnoreExtraElements(true);
  83. });
  84. builder.Entity<mo_mes_oorder>(b =>
  85. {
  86. b.CollectionName = "mo_mes_oorder";
  87. b.BsonMap.AutoMap();
  88. b.BsonMap.SetIgnoreExtraElements(true);
  89. });
  90. builder.Entity<mo_srm_po_list>(b =>
  91. {
  92. b.CollectionName = "mo_srm_po_list";
  93. b.BsonMap.AutoMap();
  94. b.BsonMap.SetIgnoreExtraElements(true);
  95. });
  96. builder.Entity<mo_srm_po_main>(b =>
  97. {
  98. b.CollectionName = "mo_srm_po_main";
  99. b.BsonMap.AutoMap();
  100. b.BsonMap.SetIgnoreExtraElements(true);
  101. });
  102. builder.Entity<mo_srm_po_occupy>(b =>
  103. {
  104. b.CollectionName = "mo_srm_po_occupy";
  105. b.BsonMap.AutoMap();
  106. b.BsonMap.SetIgnoreExtraElements(true);
  107. });
  108. builder.Entity<mo_srm_pr_main>(b =>
  109. {
  110. b.CollectionName = "mo_srm_pr_main";
  111. b.BsonMap.AutoMap();
  112. b.BsonMap.SetIgnoreExtraElements(true);
  113. });
  114. builder.Entity<mo_srm_purchase>(b =>
  115. {
  116. b.CollectionName = "mo_srm_purchase";
  117. b.BsonMap.AutoMap();
  118. b.BsonMap.SetIgnoreExtraElements(true);
  119. });
  120. builder.Entity<mo_srm_supplier>(b =>
  121. {
  122. b.CollectionName = "mo_srm_supplier";
  123. b.BsonMap.AutoMap();
  124. b.BsonMap.SetIgnoreExtraElements(true);
  125. });
  126. builder.Entity<mo_mes_process>(b =>
  127. {
  128. b.CollectionName = "mo_mes_process";
  129. b.BsonMap.AutoMap();
  130. b.BsonMap.SetIgnoreExtraElements(true);
  131. });
  132. builder.Entity<mo_mes_tech_proc_workshop>(b =>
  133. {
  134. b.CollectionName = "mo_mes_tech_proc_workshop";
  135. b.BsonMap.AutoMap();
  136. b.BsonMap.SetIgnoreExtraElements(true);
  137. });
  138. builder.Entity<mo_mes_tech_process>(b =>
  139. {
  140. b.CollectionName = "mo_mes_tech_process";
  141. b.BsonMap.AutoMap();
  142. b.BsonMap.SetIgnoreExtraElements(true);
  143. });
  144. builder.Entity<mo_mes_technique>(b =>
  145. {
  146. b.CollectionName = "mo_mes_technique";
  147. b.BsonMap.AutoMap();
  148. b.BsonMap.SetIgnoreExtraElements(true);
  149. });
  150. }
  151. }
  152. }