@chevre/domain 21.12.0 → 21.13.0-alpha.1

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 (219) hide show
  1. package/example/src/chevre/searchEvents.ts +1 -1
  2. package/example/src/chevre/searchOrders.ts +1 -1
  3. package/example/src/chevre/transaction/processReturnOrder.ts +8 -8
  4. package/example/src/chevre/transaction/startExportTasks.ts +1 -1
  5. package/example/src/chevre/unsetContainsInPlaceFromMovieTheater.ts +1 -1
  6. package/example/src/chevre/unsetUnnecessaryFields.ts +1 -1
  7. package/example/src/chevre/updateOfferCatalogs.ts +1 -1
  8. package/example/src/chevre/updateTransaction.ts +1 -1
  9. package/lib/chevre/index.d.ts +1 -2
  10. package/lib/chevre/index.js +2 -3
  11. package/lib/chevre/repo/account.js +1 -1
  12. package/lib/chevre/repo/accountTitle.js +1 -1
  13. package/lib/chevre/repo/accountTransaction.js +1 -1
  14. package/lib/chevre/repo/accountingReport.js +1 -1
  15. package/lib/chevre/repo/action.js +1 -1
  16. package/lib/chevre/repo/additionalProperty.js +1 -1
  17. package/lib/chevre/repo/aggregateOffer.js +1 -1
  18. package/lib/chevre/repo/aggregation.js +1 -1
  19. package/lib/chevre/repo/assetTransaction.js +1 -1
  20. package/lib/chevre/repo/categoryCode.js +1 -1
  21. package/lib/chevre/repo/code.js +1 -1
  22. package/lib/chevre/repo/comment.js +1 -1
  23. package/lib/chevre/repo/creativeWork.js +1 -1
  24. package/lib/chevre/repo/customer.js +1 -1
  25. package/lib/chevre/repo/emailMessage.js +1 -1
  26. package/lib/chevre/repo/event.d.ts +2 -2
  27. package/lib/chevre/repo/event.js +6 -2
  28. package/lib/chevre/repo/member.js +1 -1
  29. package/lib/chevre/repo/merchantReturnPolicy.js +1 -1
  30. package/lib/chevre/repo/mongoose/schemas/account.d.ts +4 -56
  31. package/lib/chevre/repo/mongoose/schemas/account.js +80 -32
  32. package/lib/chevre/repo/mongoose/schemas/accountTitle.d.ts +4 -90
  33. package/lib/chevre/repo/mongoose/schemas/accountTitle.js +81 -44
  34. package/lib/chevre/repo/mongoose/schemas/accountTransaction.d.ts +4 -95
  35. package/lib/chevre/repo/mongoose/schemas/accountTransaction.js +129 -62
  36. package/lib/chevre/repo/mongoose/schemas/accountingReport.d.ts +4 -68
  37. package/lib/chevre/repo/mongoose/schemas/accountingReport.js +108 -63
  38. package/lib/chevre/repo/mongoose/schemas/action.d.ts +4 -113
  39. package/lib/chevre/repo/mongoose/schemas/action.js +345 -215
  40. package/lib/chevre/repo/mongoose/schemas/additionalProperty.d.ts +4 -74
  41. package/lib/chevre/repo/mongoose/schemas/additionalProperty.js +65 -32
  42. package/lib/chevre/repo/mongoose/schemas/aggregateOffer.d.ts +4 -73
  43. package/lib/chevre/repo/mongoose/schemas/aggregateOffer.js +258 -155
  44. package/lib/chevre/repo/mongoose/schemas/aggregation.d.ts +4 -56
  45. package/lib/chevre/repo/mongoose/schemas/aggregation.js +28 -10
  46. package/lib/chevre/repo/mongoose/schemas/assetTransaction.d.ts +4 -113
  47. package/lib/chevre/repo/mongoose/schemas/assetTransaction.js +258 -146
  48. package/lib/chevre/repo/mongoose/schemas/authorization.d.ts +4 -77
  49. package/lib/chevre/repo/mongoose/schemas/authorization.js +110 -61
  50. package/lib/chevre/repo/mongoose/schemas/categoryCode.d.ts +4 -86
  51. package/lib/chevre/repo/mongoose/schemas/categoryCode.js +85 -46
  52. package/lib/chevre/repo/mongoose/schemas/comments.d.ts +4 -89
  53. package/lib/chevre/repo/mongoose/schemas/comments.js +59 -28
  54. package/lib/chevre/repo/mongoose/schemas/creativeWork.d.ts +4 -104
  55. package/lib/chevre/repo/mongoose/schemas/creativeWork.js +121 -70
  56. package/lib/chevre/repo/mongoose/schemas/customer.d.ts +4 -86
  57. package/lib/chevre/repo/mongoose/schemas/customer.js +56 -26
  58. package/lib/chevre/repo/mongoose/schemas/emailMessages.d.ts +4 -80
  59. package/lib/chevre/repo/mongoose/schemas/emailMessages.js +41 -17
  60. package/lib/chevre/repo/mongoose/schemas/event.d.ts +4 -158
  61. package/lib/chevre/repo/mongoose/schemas/event.js +307 -193
  62. package/lib/chevre/repo/mongoose/schemas/member.d.ts +4 -68
  63. package/lib/chevre/repo/mongoose/schemas/member.js +65 -37
  64. package/lib/chevre/repo/mongoose/schemas/merchantReturnPolicy.d.ts +4 -80
  65. package/lib/chevre/repo/mongoose/schemas/merchantReturnPolicy.js +29 -11
  66. package/lib/chevre/repo/mongoose/schemas/offerCatalog.d.ts +4 -91
  67. package/lib/chevre/repo/mongoose/schemas/offerCatalog.js +85 -45
  68. package/lib/chevre/repo/mongoose/schemas/offerCatalogItem.d.ts +4 -91
  69. package/lib/chevre/repo/mongoose/schemas/offerCatalogItem.js +29 -10
  70. package/lib/chevre/repo/mongoose/schemas/offerItemCondition.d.ts +4 -73
  71. package/lib/chevre/repo/mongoose/schemas/offerItemCondition.js +37 -12
  72. package/lib/chevre/repo/mongoose/schemas/order.d.ts +4 -128
  73. package/lib/chevre/repo/mongoose/schemas/order.js +407 -259
  74. package/lib/chevre/repo/mongoose/schemas/ownershipInfo.d.ts +4 -86
  75. package/lib/chevre/repo/mongoose/schemas/ownershipInfo.js +187 -111
  76. package/lib/chevre/repo/mongoose/schemas/place.d.ts +4 -128
  77. package/lib/chevre/repo/mongoose/schemas/place.js +159 -93
  78. package/lib/chevre/repo/mongoose/schemas/priceSpecification.d.ts +4 -92
  79. package/lib/chevre/repo/mongoose/schemas/priceSpecification.js +94 -49
  80. package/lib/chevre/repo/mongoose/schemas/product.d.ts +4 -95
  81. package/lib/chevre/repo/mongoose/schemas/product.js +109 -61
  82. package/lib/chevre/repo/mongoose/schemas/project.d.ts +4 -83
  83. package/lib/chevre/repo/mongoose/schemas/project.js +20 -9
  84. package/lib/chevre/repo/mongoose/schemas/reservation.d.ts +4 -143
  85. package/lib/chevre/repo/mongoose/schemas/reservation.js +377 -229
  86. package/lib/chevre/repo/mongoose/schemas/role.d.ts +4 -65
  87. package/lib/chevre/repo/mongoose/schemas/role.js +43 -19
  88. package/lib/chevre/repo/mongoose/schemas/seller.d.ts +4 -95
  89. package/lib/chevre/repo/mongoose/schemas/seller.js +96 -51
  90. package/lib/chevre/repo/mongoose/schemas/serviceOutput.d.ts +4 -65
  91. package/lib/chevre/repo/mongoose/schemas/serviceOutput.js +112 -63
  92. package/lib/chevre/repo/mongoose/schemas/task.d.ts +4 -95
  93. package/lib/chevre/repo/mongoose/schemas/task.js +214 -126
  94. package/lib/chevre/repo/mongoose/schemas/telemetry.d.ts +4 -80
  95. package/lib/chevre/repo/mongoose/schemas/telemetry.js +44 -24
  96. package/lib/chevre/repo/mongoose/schemas/transaction.d.ts +4 -107
  97. package/lib/chevre/repo/mongoose/schemas/transaction.js +291 -176
  98. package/lib/chevre/repo/mongoose/schemas/trip.d.ts +4 -65
  99. package/lib/chevre/repo/mongoose/schemas/trip.js +20 -9
  100. package/lib/chevre/repo/offer.js +5 -4
  101. package/lib/chevre/repo/offerCatalog.d.ts +1 -1
  102. package/lib/chevre/repo/offerCatalog.js +2 -2
  103. package/lib/chevre/repo/offerCatalogItem.js +1 -1
  104. package/lib/chevre/repo/offerItemCondition.js +1 -1
  105. package/lib/chevre/repo/order.js +1 -1
  106. package/lib/chevre/repo/ownershipInfo.js +1 -1
  107. package/lib/chevre/repo/paymentServiceProvider.js +1 -1
  108. package/lib/chevre/repo/permit.js +1 -1
  109. package/lib/chevre/repo/place/hasPOS.js +1 -1
  110. package/lib/chevre/repo/place.js +1 -1
  111. package/lib/chevre/repo/priceSpecification.js +1 -1
  112. package/lib/chevre/repo/product.js +1 -1
  113. package/lib/chevre/repo/productOffer.js +1 -1
  114. package/lib/chevre/repo/project.js +1 -1
  115. package/lib/chevre/repo/reservation.js +1 -1
  116. package/lib/chevre/repo/role.js +1 -1
  117. package/lib/chevre/repo/seller.js +1 -1
  118. package/lib/chevre/repo/serviceOutput.js +1 -1
  119. package/lib/chevre/repo/task.js +1 -1
  120. package/lib/chevre/repo/telemetry.js +1 -1
  121. package/lib/chevre/repo/transaction.js +1 -1
  122. package/lib/chevre/repo/trip.js +1 -1
  123. package/lib/chevre/repository.d.ts +160 -137
  124. package/lib/chevre/repository.js +531 -223
  125. package/lib/chevre/service/account.d.ts +2 -2
  126. package/lib/chevre/service/accountTransaction/deposit.d.ts +2 -2
  127. package/lib/chevre/service/accountTransaction/transfer.d.ts +2 -2
  128. package/lib/chevre/service/accountTransaction/withdraw.d.ts +2 -2
  129. package/lib/chevre/service/accountTransaction.d.ts +1 -1
  130. package/lib/chevre/service/aggregation/event/aggregateScreeningEvent.d.ts +7 -7
  131. package/lib/chevre/service/aggregation/event/aggregateUseActionsOnEvent.d.ts +6 -6
  132. package/lib/chevre/service/aggregation/event/findEventOffers.d.ts +4 -4
  133. package/lib/chevre/service/aggregation/event/importFromCOA.d.ts +1 -1
  134. package/lib/chevre/service/aggregation/project.d.ts +3 -3
  135. package/lib/chevre/service/aggregation/system.d.ts +5 -5
  136. package/lib/chevre/service/assetTransaction/cancelReservation.d.ts +4 -4
  137. package/lib/chevre/service/assetTransaction/moneyTransfer.d.ts +4 -4
  138. package/lib/chevre/service/assetTransaction/moneyTransfer.js +1 -1
  139. package/lib/chevre/service/assetTransaction/pay/account/validation.d.ts +1 -1
  140. package/lib/chevre/service/assetTransaction/pay.d.ts +10 -10
  141. package/lib/chevre/service/assetTransaction/refund.d.ts +4 -4
  142. package/lib/chevre/service/assetTransaction/registerService.d.ts +8 -8
  143. package/lib/chevre/service/assetTransaction/reserve.d.ts +14 -14
  144. package/lib/chevre/service/assetTransaction.d.ts +2 -2
  145. package/lib/chevre/service/code.d.ts +2 -2
  146. package/lib/chevre/service/code.js +1 -2
  147. package/lib/chevre/service/delivery.d.ts +5 -5
  148. package/lib/chevre/service/event/createEvent.d.ts +4 -4
  149. package/lib/chevre/service/event.d.ts +7 -7
  150. package/lib/chevre/service/iam.d.ts +2 -2
  151. package/lib/chevre/service/moneyTransfer.d.ts +5 -5
  152. package/lib/chevre/service/notification.d.ts +2 -2
  153. package/lib/chevre/service/offer/event/authorize.d.ts +15 -15
  154. package/lib/chevre/service/offer/event/cancel.d.ts +7 -7
  155. package/lib/chevre/service/offer/event/importFromCOA.d.ts +3 -3
  156. package/lib/chevre/service/offer/event/searchEventTicketOffers.d.ts +7 -7
  157. package/lib/chevre/service/offer/event/voidTransaction.d.ts +7 -7
  158. package/lib/chevre/service/offer/eventServiceByCOA/validateAcceptedOffers.d.ts +1 -1
  159. package/lib/chevre/service/offer/eventServiceByCOA.d.ts +5 -5
  160. package/lib/chevre/service/offer/moneyTransfer/authorize.d.ts +6 -6
  161. package/lib/chevre/service/offer/moneyTransfer/returnMoneyTransfer.d.ts +5 -5
  162. package/lib/chevre/service/offer/moneyTransfer/settleTransaction.d.ts +2 -2
  163. package/lib/chevre/service/offer/moneyTransfer/voidTransaction.d.ts +3 -3
  164. package/lib/chevre/service/offer/product/searchProductOffers.d.ts +3 -3
  165. package/lib/chevre/service/offer/product.d.ts +14 -14
  166. package/lib/chevre/service/offer.d.ts +6 -6
  167. package/lib/chevre/service/order/confirmPayTransaction.d.ts +10 -10
  168. package/lib/chevre/service/order/deleteOrder.d.ts +5 -5
  169. package/lib/chevre/service/order/findPlaceOrderTransaction.d.ts +1 -1
  170. package/lib/chevre/service/order/onAssetTransactionStatusChanged.d.ts +5 -5
  171. package/lib/chevre/service/order/onOrderStatusChanged.d.ts +2 -2
  172. package/lib/chevre/service/order/onOrderUpdated.d.ts +1 -1
  173. package/lib/chevre/service/order/payOrder.d.ts +4 -4
  174. package/lib/chevre/service/order/placeOrder.d.ts +6 -6
  175. package/lib/chevre/service/order/returnOrder.d.ts +6 -6
  176. package/lib/chevre/service/order/sendOrder.d.ts +6 -6
  177. package/lib/chevre/service/payment/any/onPaid.d.ts +3 -3
  178. package/lib/chevre/service/payment/any/onPaymentStatusChanged/onPaid.d.ts +1 -1
  179. package/lib/chevre/service/payment/any/onPaymentStatusChanged/onRefunded.d.ts +1 -1
  180. package/lib/chevre/service/payment/any/onPaymentStatusChanged.d.ts +2 -2
  181. package/lib/chevre/service/payment/any/onRefund.d.ts +3 -3
  182. package/lib/chevre/service/payment/any.d.ts +10 -10
  183. package/lib/chevre/service/payment/creditCard.d.ts +6 -6
  184. package/lib/chevre/service/payment/faceToFace.d.ts +6 -6
  185. package/lib/chevre/service/payment/movieTicket/checkByIdentifier.d.ts +2 -2
  186. package/lib/chevre/service/payment/movieTicket/getCredentials.d.ts +1 -1
  187. package/lib/chevre/service/payment/movieTicket/validation.d.ts +5 -5
  188. package/lib/chevre/service/payment/movieTicket.d.ts +6 -6
  189. package/lib/chevre/service/payment/paymentCard.d.ts +7 -7
  190. package/lib/chevre/service/payment.d.ts +9 -9
  191. package/lib/chevre/service/permit.d.ts +2 -2
  192. package/lib/chevre/service/product.d.ts +3 -3
  193. package/lib/chevre/service/project.d.ts +16 -16
  194. package/lib/chevre/service/report/telemetry.d.ts +19 -16
  195. package/lib/chevre/service/reserve/cancelReservation.d.ts +3 -3
  196. package/lib/chevre/service/reserve/checkInReservation.d.ts +5 -5
  197. package/lib/chevre/service/reserve/confirmReservation.d.ts +4 -4
  198. package/lib/chevre/service/reserve/potentialActions/onReservationCanceled.d.ts +1 -1
  199. package/lib/chevre/service/reserve/potentialActions/onReservationCheckedIn.d.ts +2 -2
  200. package/lib/chevre/service/reserve/potentialActions/onReservationConfirmed.d.ts +1 -1
  201. package/lib/chevre/service/reserve/potentialActions/onReservationUsed.d.ts +1 -1
  202. package/lib/chevre/service/reserve/useReservation.d.ts +5 -5
  203. package/lib/chevre/service/reserve/verifyToken4reservation.d.ts +1 -1
  204. package/lib/chevre/service/task/onResourceUpdated/onHasPOSUpdated.d.ts +2 -2
  205. package/lib/chevre/service/task/onResourceUpdated/onOfferCatalogUpdated.d.ts +3 -3
  206. package/lib/chevre/service/task/onResourceUpdated/onResourceDeleted.d.ts +15 -15
  207. package/lib/chevre/service/task/onResourceUpdated/syncOfferCatalog.d.ts +2 -2
  208. package/lib/chevre/service/task.d.ts +1 -1
  209. package/lib/chevre/service/task.js +3 -4
  210. package/lib/chevre/service/transaction/deleteTransaction.d.ts +9 -9
  211. package/lib/chevre/service/transaction/moneyTransfer.d.ts +9 -9
  212. package/lib/chevre/service/transaction/orderProgramMembership/findPaymentCardPermit.d.ts +2 -2
  213. package/lib/chevre/service/transaction/placeOrder.d.ts +2 -2
  214. package/lib/chevre/service/transaction/placeOrderInProgress.d.ts +7 -7
  215. package/lib/chevre/service/transaction/returnOrder.d.ts +10 -10
  216. package/lib/chevre/service/transaction.d.ts +2 -2
  217. package/lib/chevre/settings.d.ts +1 -0
  218. package/lib/chevre/settings.js +2 -1
  219. package/package.json +1 -1
@@ -1,14 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.schema = exports.modelName = void 0;
3
+ exports.createSchema = exports.indexes = exports.modelName = void 0;
4
4
  const mongoose_1 = require("mongoose");
5
5
  const writeConcern_1 = require("../writeConcern");
6
+ const settings_1 = require("../../../settings");
6
7
  const modelName = 'Reservation';
7
8
  exports.modelName = modelName;
8
- /**
9
- * 予約スキーマ
10
- */
11
- const schema = new mongoose_1.Schema({
9
+ const schemaDefinition = {
12
10
  project: {
13
11
  type: mongoose_1.SchemaTypes.Mixed,
14
12
  required: true
@@ -52,14 +50,16 @@ const schema = new mongoose_1.Schema({
52
50
  attended: { type: Boolean, default: false },
53
51
  additionalProperty: mongoose_1.SchemaTypes.Mixed,
54
52
  issuedThrough: mongoose_1.SchemaTypes.Mixed
55
- }, {
53
+ };
54
+ const schemaOptions = {
55
+ autoIndex: settings_1.MONGO_AUTO_INDEX,
56
+ autoCreate: false,
56
57
  collection: 'reservations',
57
58
  id: true,
58
59
  read: 'primary',
59
60
  writeConcern: writeConcern_1.writeConcern,
60
61
  strict: true,
61
62
  strictQuery: false,
62
- useNestedStrict: true,
63
63
  timestamps: {
64
64
  createdAt: 'createdAt',
65
65
  updatedAt: 'updatedAt'
@@ -76,225 +76,373 @@ const schema = new mongoose_1.Schema({
76
76
  minimize: false,
77
77
  versionKey: false
78
78
  }
79
- });
80
- exports.schema = schema;
81
- schema.index({ createdAt: 1 }, { name: 'searchByCreatedAt' });
82
- schema.index({ updatedAt: 1 }, { name: 'searchByUpdatedAt' });
83
- schema.index({ bookingTime: -1 }, { name: 'searchByBookingTime-v3' });
84
- schema.index({ 'project.id': 1, bookingTime: -1 }, { name: 'searchByProjectId-v20220721' });
85
- schema.index({ 'provider.id': 1, bookingTime: -1 }, { name: 'searchByProviderId' });
86
- schema.index({ typeOf: 1, bookingTime: -1 }, { name: 'searchByTypeOf-v3' });
87
- schema.index({ reservationNumber: 1, bookingTime: -1 }, { name: 'searchByReservationNumber-v3' });
88
- schema.index({ reservationStatus: 1, bookingTime: -1 }, { name: 'searchByReservationStatus-v3' });
89
- schema.index({ checkedIn: 1, bookingTime: -1 }, { name: 'searchByCheckedIn-v3' });
90
- schema.index({ attended: 1, bookingTime: -1 }, { name: 'searchByAttended-v3' });
91
- schema.index({ useActionExists: 1, bookingTime: -1 }, {
92
- name: 'searchByUseActionExists',
93
- partialFilterExpression: {
94
- useActionExists: { $exists: true }
95
- }
96
- });
97
- schema.index({ additionalTicketText: 1, bookingTime: -1 }, {
98
- name: 'searchByAdditionalTicketText-v3',
99
- partialFilterExpression: {
100
- additionalTicketText: { $exists: true }
101
- }
102
- });
103
- schema.index({ additionalProperty: 1, bookingTime: -1 }, {
104
- name: 'searchByAdditionalProperty-v3',
105
- partialFilterExpression: {
106
- additionalProperty: { $exists: true }
107
- }
108
- });
109
- schema.index({ 'price.priceComponent.appliesToMovieTicket.identifier': 1, bookingTime: -1 }, {
110
- name: 'searchByPriceComponentAppliesToMovieTicketIdentifier',
111
- partialFilterExpression: {
112
- 'price.priceComponent.appliesToMovieTicket.identifier': { $exists: true }
113
- }
114
- });
115
- schema.index({ 'reservationFor.typeOf': 1, bookingTime: -1 }, {
116
- name: 'searchByReservationForTypeOf-v3',
117
- partialFilterExpression: {
118
- 'reservationFor.typeOf': { $exists: true }
119
- }
120
- });
121
- schema.index({ 'reservationFor.id': 1, bookingTime: -1 }, {
122
- name: 'searchByReservationForId-v3',
123
- partialFilterExpression: {
124
- 'reservationFor.id': { $exists: true }
125
- }
126
- });
127
- schema.index({ 'reservationFor.location.id': 1, bookingTime: -1 }, {
128
- name: 'searchByReservationForLocationId-v3',
129
- partialFilterExpression: {
130
- 'reservationFor.location.id': { $exists: true }
131
- }
132
- });
133
- schema.index({ 'reservationFor.location.branchCode': 1, bookingTime: -1 }, {
134
- name: 'searchByReservationForLocationBranchCode-v3',
135
- partialFilterExpression: {
136
- 'reservationFor.location.branchCode': { $exists: true }
137
- }
138
- });
139
- schema.index({ 'reservationFor.startDate': 1, bookingTime: -1 }, {
140
- name: 'searchByReservationForStartDate-v3',
141
- partialFilterExpression: {
142
- 'reservationFor.startDate': { $exists: true }
143
- }
144
- });
145
- schema.index({ 'reservationFor.endDate': 1, bookingTime: -1 }, {
146
- name: 'searchByReservationForEndDate-v3',
147
- partialFilterExpression: {
148
- 'reservationFor.endDate': { $exists: true }
149
- }
150
- });
151
- schema.index({ 'reservationFor.superEvent.id': 1, bookingTime: -1 }, {
152
- name: 'searchByReservationForSuperEventId-v3',
153
- partialFilterExpression: {
154
- 'reservationFor.superEvent.id': { $exists: true }
155
- }
156
- });
157
- schema.index({ 'reservationFor.superEvent.workPerformed.id': 1, bookingTime: -1 }, {
158
- name: 'searchByReservationForSuperEventWorkPerformedId-v3',
159
- partialFilterExpression: {
160
- 'reservationFor.superEvent.workPerformed.id': { $exists: true }
161
- }
162
- });
163
- schema.index({ 'reservationFor.superEvent.workPerformed.identifier': 1, bookingTime: -1 }, {
164
- name: 'searchByReservationForSuperEventWorkPerformedIdentifier-v3',
165
- partialFilterExpression: {
166
- 'reservationFor.superEvent.workPerformed.identifier': { $exists: true }
167
- }
168
- });
169
- schema.index({ 'reservationFor.superEvent.location.id': 1, bookingTime: -1 }, {
170
- name: 'searchByReservationForSuperEventLocationId-v3',
171
- partialFilterExpression: {
172
- 'reservationFor.superEvent.location.id': { $exists: true }
173
- }
174
- });
175
- schema.index({ 'reservationFor.superEvent.location.branchCode': 1, bookingTime: -1 }, {
176
- name: 'searchByReservationForSuperEventLocationBranchCode-v3',
177
- partialFilterExpression: {
178
- 'reservationFor.superEvent.location.branchCode': { $exists: true }
179
- }
180
- });
181
- schema.index({ 'reservedTicket.ticketedSeat.seatNumber': 1, bookingTime: -1 }, {
182
- name: 'searchByReservedTicketTicketedSeatSeatNumber-v3',
183
- partialFilterExpression: {
184
- 'reservedTicket.ticketedSeat.seatNumber': { $exists: true }
185
- }
186
- });
187
- schema.index({ 'reservedTicket.ticketedSeat.seatRow': 1, bookingTime: -1 }, {
188
- name: 'searchByReservedTicketTicketedSeatSeatRow-v3',
189
- partialFilterExpression: {
190
- 'reservedTicket.ticketedSeat.seatRow': { $exists: true }
191
- }
192
- });
193
- schema.index({ 'reservedTicket.ticketedSeat.seatSection': 1, bookingTime: -1 }, {
194
- name: 'searchByReservedTicketTicketedSeatSeatSection-v3',
195
- partialFilterExpression: {
196
- 'reservedTicket.ticketedSeat.seatSection': { $exists: true }
197
- }
198
- });
199
- schema.index({ 'reservedTicket.ticketType.id': 1, bookingTime: -1 }, {
200
- name: 'searchByReservedTicketTicketTypeId-v3',
201
- partialFilterExpression: {
202
- 'reservedTicket.ticketType.id': { $exists: true }
203
- }
204
- });
205
- schema.index({ 'reservedTicket.ticketType.category.id': 1, bookingTime: -1 }, {
206
- name: 'searchByReservedTicketTicketTypeCategoryId-v3',
207
- partialFilterExpression: {
208
- 'reservedTicket.ticketType.category.id': { $exists: true }
209
- }
210
- });
211
- schema.index({ 'reservedTicket.ticketType.category.codeValue': 1, bookingTime: -1 }, {
212
- name: 'searchByReservedTicketTicketTypeCategoryCodeValue-v3',
213
- partialFilterExpression: {
214
- 'reservedTicket.ticketType.category.codeValue': { $exists: true }
215
- }
216
- });
217
- schema.index({ 'broker.id': 1, bookingTime: -1 }, {
218
- name: 'searchByBrokerId',
219
- partialFilterExpression: {
220
- 'broker.id': { $exists: true }
221
- }
222
- });
223
- schema.index({ 'broker.name': 1, bookingTime: -1 }, {
224
- name: 'searchByBrokerName',
225
- partialFilterExpression: {
226
- 'broker.name': { $exists: true }
227
- }
228
- });
229
- schema.index({ 'broker.familyName': 1, bookingTime: -1 }, {
230
- name: 'searchByBrokerFamilyName',
231
- partialFilterExpression: {
232
- 'broker.familyName': { $exists: true }
233
- }
234
- });
235
- schema.index({ 'broker.givenName': 1, bookingTime: -1 }, {
236
- name: 'searchByBrokerGivenName',
237
- partialFilterExpression: {
238
- 'broker.givenName': { $exists: true }
239
- }
240
- });
241
- schema.index({ 'broker.identifier': 1, bookingTime: -1 }, {
242
- name: 'searchByBrokerIdentifier',
243
- partialFilterExpression: {
244
- 'broker.identifier': { $exists: true }
245
- }
246
- });
247
- schema.index({ 'programMembershipUsed.identifier': 1, bookingTime: -1 }, {
248
- name: 'searchByProgramMembershipUsedIdentifier',
249
- partialFilterExpression: {
250
- 'programMembershipUsed.identifier': { $exists: true }
251
- }
252
- });
253
- schema.index({ 'programMembershipUsed.issuedThrough.serviceType.codeValue': 1, bookingTime: -1 }, {
254
- name: 'searchByMembershipUsedServiceType',
255
- partialFilterExpression: {
256
- 'programMembershipUsed.issuedThrough.serviceType.codeValue': { $exists: true }
257
- }
258
- });
259
- schema.index({ 'underName.id': 1, bookingTime: -1 }, {
260
- name: 'searchByUnderNameId-v3',
261
- partialFilterExpression: {
262
- 'underName.id': { $exists: true }
263
- }
264
- });
265
- schema.index({ 'underName.email': 1, bookingTime: -1 }, {
266
- name: 'searchByUnderNameEmail-v3',
267
- partialFilterExpression: {
268
- 'underName.email': { $exists: true }
269
- }
270
- });
271
- schema.index({ 'underName.name': 1, bookingTime: -1 }, {
272
- name: 'searchByUnderNameName-v3',
273
- partialFilterExpression: {
274
- 'underName.name': { $exists: true }
275
- }
276
- });
277
- schema.index({ 'underName.telephone': 1, bookingTime: -1 }, {
278
- name: 'searchByUnderNameTelephone-v3',
279
- partialFilterExpression: {
280
- 'underName.telephone': { $exists: true }
281
- }
282
- });
283
- schema.index({ 'underName.familyName': 1, bookingTime: -1 }, {
284
- name: 'searchByUnderNameFamilyName-v3',
285
- partialFilterExpression: {
286
- 'underName.familyName': { $exists: true }
287
- }
288
- });
289
- schema.index({ 'underName.givenName': 1, bookingTime: -1 }, {
290
- name: 'searchByUnderNameGivenName-v3',
291
- partialFilterExpression: {
292
- 'underName.givenName': { $exists: true }
293
- }
294
- });
295
- schema.index({ 'underName.identifier': 1, bookingTime: -1 }, {
296
- name: 'searchByUnderNameIdentifier-v3',
297
- partialFilterExpression: {
298
- 'underName.identifier': { $exists: true }
299
- }
300
- });
79
+ };
80
+ /**
81
+ * 予約スキーマ
82
+ */
83
+ let schema;
84
+ function createSchema() {
85
+ if (schema === undefined) {
86
+ schema = new mongoose_1.Schema(schemaDefinition, schemaOptions);
87
+ }
88
+ return schema;
89
+ }
90
+ exports.createSchema = createSchema;
91
+ const indexes = [
92
+ [
93
+ { createdAt: 1 },
94
+ { name: 'searchByCreatedAt' }
95
+ ],
96
+ [
97
+ { updatedAt: 1 },
98
+ { name: 'searchByUpdatedAt' }
99
+ ],
100
+ [
101
+ { bookingTime: -1 },
102
+ { name: 'searchByBookingTime-v3' }
103
+ ],
104
+ [
105
+ { 'project.id': 1, bookingTime: -1 },
106
+ { name: 'searchByProjectId-v20220721' }
107
+ ],
108
+ [
109
+ { 'provider.id': 1, bookingTime: -1 },
110
+ { name: 'searchByProviderId' }
111
+ ],
112
+ [
113
+ { typeOf: 1, bookingTime: -1 },
114
+ { name: 'searchByTypeOf-v3' }
115
+ ],
116
+ [
117
+ { reservationNumber: 1, bookingTime: -1 },
118
+ { name: 'searchByReservationNumber-v3' }
119
+ ],
120
+ [
121
+ { reservationStatus: 1, bookingTime: -1 },
122
+ { name: 'searchByReservationStatus-v3' }
123
+ ],
124
+ [
125
+ { checkedIn: 1, bookingTime: -1 },
126
+ { name: 'searchByCheckedIn-v3' }
127
+ ],
128
+ [
129
+ { attended: 1, bookingTime: -1 },
130
+ { name: 'searchByAttended-v3' }
131
+ ],
132
+ [
133
+ { useActionExists: 1, bookingTime: -1 },
134
+ {
135
+ name: 'searchByUseActionExists',
136
+ partialFilterExpression: {
137
+ useActionExists: { $exists: true }
138
+ }
139
+ }
140
+ ],
141
+ [
142
+ { additionalTicketText: 1, bookingTime: -1 },
143
+ {
144
+ name: 'searchByAdditionalTicketText-v3',
145
+ partialFilterExpression: {
146
+ additionalTicketText: { $exists: true }
147
+ }
148
+ }
149
+ ],
150
+ [
151
+ { additionalProperty: 1, bookingTime: -1 },
152
+ {
153
+ name: 'searchByAdditionalProperty-v3',
154
+ partialFilterExpression: {
155
+ additionalProperty: { $exists: true }
156
+ }
157
+ }
158
+ ],
159
+ [
160
+ { 'price.priceComponent.appliesToMovieTicket.identifier': 1, bookingTime: -1 },
161
+ {
162
+ name: 'searchByPriceComponentAppliesToMovieTicketIdentifier',
163
+ partialFilterExpression: {
164
+ 'price.priceComponent.appliesToMovieTicket.identifier': { $exists: true }
165
+ }
166
+ }
167
+ ],
168
+ [
169
+ { 'reservationFor.typeOf': 1, bookingTime: -1 },
170
+ {
171
+ name: 'searchByReservationForTypeOf-v3',
172
+ partialFilterExpression: {
173
+ 'reservationFor.typeOf': { $exists: true }
174
+ }
175
+ }
176
+ ],
177
+ [
178
+ { 'reservationFor.id': 1, bookingTime: -1 },
179
+ {
180
+ name: 'searchByReservationForId-v3',
181
+ partialFilterExpression: {
182
+ 'reservationFor.id': { $exists: true }
183
+ }
184
+ }
185
+ ],
186
+ [
187
+ { 'reservationFor.location.id': 1, bookingTime: -1 },
188
+ {
189
+ name: 'searchByReservationForLocationId-v3',
190
+ partialFilterExpression: {
191
+ 'reservationFor.location.id': { $exists: true }
192
+ }
193
+ }
194
+ ],
195
+ [
196
+ { 'reservationFor.location.branchCode': 1, bookingTime: -1 },
197
+ {
198
+ name: 'searchByReservationForLocationBranchCode-v3',
199
+ partialFilterExpression: {
200
+ 'reservationFor.location.branchCode': { $exists: true }
201
+ }
202
+ }
203
+ ],
204
+ [
205
+ { 'reservationFor.startDate': 1, bookingTime: -1 },
206
+ {
207
+ name: 'searchByReservationForStartDate-v3',
208
+ partialFilterExpression: {
209
+ 'reservationFor.startDate': { $exists: true }
210
+ }
211
+ }
212
+ ],
213
+ [
214
+ { 'reservationFor.endDate': 1, bookingTime: -1 },
215
+ {
216
+ name: 'searchByReservationForEndDate-v3',
217
+ partialFilterExpression: {
218
+ 'reservationFor.endDate': { $exists: true }
219
+ }
220
+ }
221
+ ],
222
+ [
223
+ { 'reservationFor.superEvent.id': 1, bookingTime: -1 },
224
+ {
225
+ name: 'searchByReservationForSuperEventId-v3',
226
+ partialFilterExpression: {
227
+ 'reservationFor.superEvent.id': { $exists: true }
228
+ }
229
+ }
230
+ ],
231
+ [
232
+ { 'reservationFor.superEvent.workPerformed.id': 1, bookingTime: -1 },
233
+ {
234
+ name: 'searchByReservationForSuperEventWorkPerformedId-v3',
235
+ partialFilterExpression: {
236
+ 'reservationFor.superEvent.workPerformed.id': { $exists: true }
237
+ }
238
+ }
239
+ ],
240
+ [
241
+ { 'reservationFor.superEvent.workPerformed.identifier': 1, bookingTime: -1 },
242
+ {
243
+ name: 'searchByReservationForSuperEventWorkPerformedIdentifier-v3',
244
+ partialFilterExpression: {
245
+ 'reservationFor.superEvent.workPerformed.identifier': { $exists: true }
246
+ }
247
+ }
248
+ ],
249
+ [
250
+ { 'reservationFor.superEvent.location.id': 1, bookingTime: -1 },
251
+ {
252
+ name: 'searchByReservationForSuperEventLocationId-v3',
253
+ partialFilterExpression: {
254
+ 'reservationFor.superEvent.location.id': { $exists: true }
255
+ }
256
+ }
257
+ ],
258
+ [
259
+ { 'reservationFor.superEvent.location.branchCode': 1, bookingTime: -1 },
260
+ {
261
+ name: 'searchByReservationForSuperEventLocationBranchCode-v3',
262
+ partialFilterExpression: {
263
+ 'reservationFor.superEvent.location.branchCode': { $exists: true }
264
+ }
265
+ }
266
+ ],
267
+ [
268
+ { 'reservedTicket.ticketedSeat.seatNumber': 1, bookingTime: -1 },
269
+ {
270
+ name: 'searchByReservedTicketTicketedSeatSeatNumber-v3',
271
+ partialFilterExpression: {
272
+ 'reservedTicket.ticketedSeat.seatNumber': { $exists: true }
273
+ }
274
+ }
275
+ ],
276
+ [
277
+ { 'reservedTicket.ticketedSeat.seatRow': 1, bookingTime: -1 },
278
+ {
279
+ name: 'searchByReservedTicketTicketedSeatSeatRow-v3',
280
+ partialFilterExpression: {
281
+ 'reservedTicket.ticketedSeat.seatRow': { $exists: true }
282
+ }
283
+ }
284
+ ],
285
+ [
286
+ { 'reservedTicket.ticketedSeat.seatSection': 1, bookingTime: -1 },
287
+ {
288
+ name: 'searchByReservedTicketTicketedSeatSeatSection-v3',
289
+ partialFilterExpression: {
290
+ 'reservedTicket.ticketedSeat.seatSection': { $exists: true }
291
+ }
292
+ }
293
+ ],
294
+ [
295
+ { 'reservedTicket.ticketType.id': 1, bookingTime: -1 },
296
+ {
297
+ name: 'searchByReservedTicketTicketTypeId-v3',
298
+ partialFilterExpression: {
299
+ 'reservedTicket.ticketType.id': { $exists: true }
300
+ }
301
+ }
302
+ ],
303
+ [
304
+ { 'reservedTicket.ticketType.category.id': 1, bookingTime: -1 },
305
+ {
306
+ name: 'searchByReservedTicketTicketTypeCategoryId-v3',
307
+ partialFilterExpression: {
308
+ 'reservedTicket.ticketType.category.id': { $exists: true }
309
+ }
310
+ }
311
+ ],
312
+ [
313
+ { 'reservedTicket.ticketType.category.codeValue': 1, bookingTime: -1 },
314
+ {
315
+ name: 'searchByReservedTicketTicketTypeCategoryCodeValue-v3',
316
+ partialFilterExpression: {
317
+ 'reservedTicket.ticketType.category.codeValue': { $exists: true }
318
+ }
319
+ }
320
+ ],
321
+ [
322
+ { 'broker.id': 1, bookingTime: -1 },
323
+ {
324
+ name: 'searchByBrokerId',
325
+ partialFilterExpression: {
326
+ 'broker.id': { $exists: true }
327
+ }
328
+ }
329
+ ],
330
+ [
331
+ { 'broker.name': 1, bookingTime: -1 },
332
+ {
333
+ name: 'searchByBrokerName',
334
+ partialFilterExpression: {
335
+ 'broker.name': { $exists: true }
336
+ }
337
+ }
338
+ ],
339
+ [
340
+ { 'broker.familyName': 1, bookingTime: -1 },
341
+ {
342
+ name: 'searchByBrokerFamilyName',
343
+ partialFilterExpression: {
344
+ 'broker.familyName': { $exists: true }
345
+ }
346
+ }
347
+ ],
348
+ [
349
+ { 'broker.givenName': 1, bookingTime: -1 },
350
+ {
351
+ name: 'searchByBrokerGivenName',
352
+ partialFilterExpression: {
353
+ 'broker.givenName': { $exists: true }
354
+ }
355
+ }
356
+ ],
357
+ [
358
+ { 'broker.identifier': 1, bookingTime: -1 },
359
+ {
360
+ name: 'searchByBrokerIdentifier',
361
+ partialFilterExpression: {
362
+ 'broker.identifier': { $exists: true }
363
+ }
364
+ }
365
+ ],
366
+ [
367
+ { 'programMembershipUsed.identifier': 1, bookingTime: -1 },
368
+ {
369
+ name: 'searchByProgramMembershipUsedIdentifier',
370
+ partialFilterExpression: {
371
+ 'programMembershipUsed.identifier': { $exists: true }
372
+ }
373
+ }
374
+ ],
375
+ [
376
+ { 'programMembershipUsed.issuedThrough.serviceType.codeValue': 1, bookingTime: -1 },
377
+ {
378
+ name: 'searchByMembershipUsedServiceType',
379
+ partialFilterExpression: {
380
+ 'programMembershipUsed.issuedThrough.serviceType.codeValue': { $exists: true }
381
+ }
382
+ }
383
+ ],
384
+ [
385
+ { 'underName.id': 1, bookingTime: -1 },
386
+ {
387
+ name: 'searchByUnderNameId-v3',
388
+ partialFilterExpression: {
389
+ 'underName.id': { $exists: true }
390
+ }
391
+ }
392
+ ],
393
+ [
394
+ { 'underName.email': 1, bookingTime: -1 },
395
+ {
396
+ name: 'searchByUnderNameEmail-v3',
397
+ partialFilterExpression: {
398
+ 'underName.email': { $exists: true }
399
+ }
400
+ }
401
+ ],
402
+ [
403
+ { 'underName.name': 1, bookingTime: -1 },
404
+ {
405
+ name: 'searchByUnderNameName-v3',
406
+ partialFilterExpression: {
407
+ 'underName.name': { $exists: true }
408
+ }
409
+ }
410
+ ],
411
+ [
412
+ { 'underName.telephone': 1, bookingTime: -1 },
413
+ {
414
+ name: 'searchByUnderNameTelephone-v3',
415
+ partialFilterExpression: {
416
+ 'underName.telephone': { $exists: true }
417
+ }
418
+ }
419
+ ],
420
+ [
421
+ { 'underName.familyName': 1, bookingTime: -1 },
422
+ {
423
+ name: 'searchByUnderNameFamilyName-v3',
424
+ partialFilterExpression: {
425
+ 'underName.familyName': { $exists: true }
426
+ }
427
+ }
428
+ ],
429
+ [
430
+ { 'underName.givenName': 1, bookingTime: -1 },
431
+ {
432
+ name: 'searchByUnderNameGivenName-v3',
433
+ partialFilterExpression: {
434
+ 'underName.givenName': { $exists: true }
435
+ }
436
+ }
437
+ ],
438
+ [
439
+ { 'underName.identifier': 1, bookingTime: -1 },
440
+ {
441
+ name: 'searchByUnderNameIdentifier-v3',
442
+ partialFilterExpression: {
443
+ 'underName.identifier': { $exists: true }
444
+ }
445
+ }
446
+ ]
447
+ ];
448
+ exports.indexes = indexes;