@chevre/domain 21.12.0 → 21.13.0-alpha.0
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.
- package/lib/chevre/repo/account.js +1 -1
- package/lib/chevre/repo/accountTitle.js +1 -1
- package/lib/chevre/repo/accountTransaction.js +1 -1
- package/lib/chevre/repo/accountingReport.js +1 -1
- package/lib/chevre/repo/action.js +1 -1
- package/lib/chevre/repo/additionalProperty.js +1 -1
- package/lib/chevre/repo/aggregateOffer.js +1 -1
- package/lib/chevre/repo/aggregation.js +1 -1
- package/lib/chevre/repo/assetTransaction.js +1 -1
- package/lib/chevre/repo/categoryCode.js +1 -1
- package/lib/chevre/repo/code.js +1 -1
- package/lib/chevre/repo/comment.js +1 -1
- package/lib/chevre/repo/creativeWork.js +1 -1
- package/lib/chevre/repo/customer.js +1 -1
- package/lib/chevre/repo/emailMessage.js +1 -1
- package/lib/chevre/repo/event.js +1 -1
- package/lib/chevre/repo/member.js +1 -1
- package/lib/chevre/repo/merchantReturnPolicy.js +1 -1
- package/lib/chevre/repo/mongoose/schemas/account.d.ts +4 -56
- package/lib/chevre/repo/mongoose/schemas/account.js +80 -32
- package/lib/chevre/repo/mongoose/schemas/accountTitle.d.ts +4 -90
- package/lib/chevre/repo/mongoose/schemas/accountTitle.js +81 -44
- package/lib/chevre/repo/mongoose/schemas/accountTransaction.d.ts +4 -95
- package/lib/chevre/repo/mongoose/schemas/accountTransaction.js +129 -62
- package/lib/chevre/repo/mongoose/schemas/accountingReport.d.ts +4 -68
- package/lib/chevre/repo/mongoose/schemas/accountingReport.js +108 -63
- package/lib/chevre/repo/mongoose/schemas/action.d.ts +4 -113
- package/lib/chevre/repo/mongoose/schemas/action.js +345 -215
- package/lib/chevre/repo/mongoose/schemas/additionalProperty.d.ts +4 -74
- package/lib/chevre/repo/mongoose/schemas/additionalProperty.js +65 -32
- package/lib/chevre/repo/mongoose/schemas/aggregateOffer.d.ts +4 -73
- package/lib/chevre/repo/mongoose/schemas/aggregateOffer.js +258 -155
- package/lib/chevre/repo/mongoose/schemas/aggregation.d.ts +4 -56
- package/lib/chevre/repo/mongoose/schemas/aggregation.js +28 -10
- package/lib/chevre/repo/mongoose/schemas/assetTransaction.d.ts +4 -113
- package/lib/chevre/repo/mongoose/schemas/assetTransaction.js +258 -146
- package/lib/chevre/repo/mongoose/schemas/authorization.d.ts +4 -77
- package/lib/chevre/repo/mongoose/schemas/authorization.js +110 -61
- package/lib/chevre/repo/mongoose/schemas/categoryCode.d.ts +4 -86
- package/lib/chevre/repo/mongoose/schemas/categoryCode.js +85 -46
- package/lib/chevre/repo/mongoose/schemas/comments.d.ts +4 -89
- package/lib/chevre/repo/mongoose/schemas/comments.js +59 -28
- package/lib/chevre/repo/mongoose/schemas/creativeWork.d.ts +4 -104
- package/lib/chevre/repo/mongoose/schemas/creativeWork.js +121 -70
- package/lib/chevre/repo/mongoose/schemas/customer.d.ts +4 -86
- package/lib/chevre/repo/mongoose/schemas/customer.js +56 -26
- package/lib/chevre/repo/mongoose/schemas/emailMessages.d.ts +4 -80
- package/lib/chevre/repo/mongoose/schemas/emailMessages.js +41 -17
- package/lib/chevre/repo/mongoose/schemas/event.d.ts +4 -158
- package/lib/chevre/repo/mongoose/schemas/event.js +307 -193
- package/lib/chevre/repo/mongoose/schemas/member.d.ts +4 -68
- package/lib/chevre/repo/mongoose/schemas/member.js +65 -37
- package/lib/chevre/repo/mongoose/schemas/merchantReturnPolicy.d.ts +4 -80
- package/lib/chevre/repo/mongoose/schemas/merchantReturnPolicy.js +29 -11
- package/lib/chevre/repo/mongoose/schemas/offerCatalog.d.ts +4 -91
- package/lib/chevre/repo/mongoose/schemas/offerCatalog.js +85 -45
- package/lib/chevre/repo/mongoose/schemas/offerCatalogItem.d.ts +4 -91
- package/lib/chevre/repo/mongoose/schemas/offerCatalogItem.js +29 -10
- package/lib/chevre/repo/mongoose/schemas/offerItemCondition.d.ts +4 -73
- package/lib/chevre/repo/mongoose/schemas/offerItemCondition.js +37 -12
- package/lib/chevre/repo/mongoose/schemas/order.d.ts +4 -128
- package/lib/chevre/repo/mongoose/schemas/order.js +407 -259
- package/lib/chevre/repo/mongoose/schemas/ownershipInfo.d.ts +4 -86
- package/lib/chevre/repo/mongoose/schemas/ownershipInfo.js +187 -111
- package/lib/chevre/repo/mongoose/schemas/place.d.ts +4 -128
- package/lib/chevre/repo/mongoose/schemas/place.js +159 -93
- package/lib/chevre/repo/mongoose/schemas/priceSpecification.d.ts +4 -92
- package/lib/chevre/repo/mongoose/schemas/priceSpecification.js +94 -49
- package/lib/chevre/repo/mongoose/schemas/product.d.ts +4 -95
- package/lib/chevre/repo/mongoose/schemas/product.js +109 -61
- package/lib/chevre/repo/mongoose/schemas/project.d.ts +4 -83
- package/lib/chevre/repo/mongoose/schemas/project.js +20 -9
- package/lib/chevre/repo/mongoose/schemas/reservation.d.ts +4 -143
- package/lib/chevre/repo/mongoose/schemas/reservation.js +377 -229
- package/lib/chevre/repo/mongoose/schemas/role.d.ts +4 -65
- package/lib/chevre/repo/mongoose/schemas/role.js +43 -19
- package/lib/chevre/repo/mongoose/schemas/seller.d.ts +4 -95
- package/lib/chevre/repo/mongoose/schemas/seller.js +96 -51
- package/lib/chevre/repo/mongoose/schemas/serviceOutput.d.ts +4 -65
- package/lib/chevre/repo/mongoose/schemas/serviceOutput.js +112 -63
- package/lib/chevre/repo/mongoose/schemas/task.d.ts +4 -95
- package/lib/chevre/repo/mongoose/schemas/task.js +214 -126
- package/lib/chevre/repo/mongoose/schemas/telemetry.d.ts +4 -80
- package/lib/chevre/repo/mongoose/schemas/telemetry.js +44 -24
- package/lib/chevre/repo/mongoose/schemas/transaction.d.ts +4 -107
- package/lib/chevre/repo/mongoose/schemas/transaction.js +291 -176
- package/lib/chevre/repo/mongoose/schemas/trip.d.ts +4 -65
- package/lib/chevre/repo/mongoose/schemas/trip.js +20 -9
- package/lib/chevre/repo/offer.js +3 -3
- package/lib/chevre/repo/offerCatalog.js +1 -1
- package/lib/chevre/repo/offerCatalogItem.js +1 -1
- package/lib/chevre/repo/offerItemCondition.js +1 -1
- package/lib/chevre/repo/order.js +1 -1
- package/lib/chevre/repo/ownershipInfo.js +1 -1
- package/lib/chevre/repo/paymentServiceProvider.js +1 -1
- package/lib/chevre/repo/permit.js +1 -1
- package/lib/chevre/repo/place/hasPOS.js +1 -1
- package/lib/chevre/repo/place.js +1 -1
- package/lib/chevre/repo/priceSpecification.js +1 -1
- package/lib/chevre/repo/product.js +1 -1
- package/lib/chevre/repo/productOffer.js +1 -1
- package/lib/chevre/repo/project.js +1 -1
- package/lib/chevre/repo/reservation.js +1 -1
- package/lib/chevre/repo/role.js +1 -1
- package/lib/chevre/repo/seller.js +1 -1
- package/lib/chevre/repo/serviceOutput.js +1 -1
- package/lib/chevre/repo/task.js +1 -1
- package/lib/chevre/repo/telemetry.js +1 -1
- package/lib/chevre/repo/transaction.js +1 -1
- package/lib/chevre/repo/trip.js +1 -1
- package/lib/chevre/settings.d.ts +1 -0
- package/lib/chevre/settings.js +2 -1
- package/package.json +1 -1
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.createSchema = exports.indexes = exports.modelName = void 0;
|
|
4
4
|
const mongoose_1 = require("mongoose");
|
|
5
5
|
const writeConcern_1 = require("../writeConcern");
|
|
6
6
|
const factory = require("../../../factory");
|
|
7
7
|
const settings_1 = require("../../../settings");
|
|
8
8
|
const modelName = 'Event';
|
|
9
9
|
exports.modelName = modelName;
|
|
10
|
-
|
|
11
|
-
* イベントスキーマ
|
|
12
|
-
*/
|
|
13
|
-
const schema = new mongoose_1.Schema({
|
|
10
|
+
const schemaDefinition = {
|
|
14
11
|
project: {
|
|
15
12
|
type: mongoose_1.SchemaTypes.Mixed,
|
|
16
13
|
required: true
|
|
@@ -55,14 +52,16 @@ const schema = new mongoose_1.Schema({
|
|
|
55
52
|
aggregateReservation: mongoose_1.SchemaTypes.Mixed,
|
|
56
53
|
aggregateOffer: mongoose_1.SchemaTypes.Mixed,
|
|
57
54
|
coaInfo: mongoose_1.SchemaTypes.Mixed
|
|
58
|
-
}
|
|
55
|
+
};
|
|
56
|
+
const schemaOptions = {
|
|
57
|
+
autoIndex: settings_1.MONGO_AUTO_INDEX,
|
|
58
|
+
autoCreate: false,
|
|
59
59
|
collection: 'events',
|
|
60
60
|
id: true,
|
|
61
61
|
read: settings_1.MONGO_READ_PREFERENCE,
|
|
62
62
|
writeConcern: writeConcern_1.writeConcern,
|
|
63
63
|
strict: true,
|
|
64
64
|
strictQuery: false,
|
|
65
|
-
useNestedStrict: true,
|
|
66
65
|
timestamps: {
|
|
67
66
|
createdAt: 'createdAt',
|
|
68
67
|
updatedAt: 'updatedAt'
|
|
@@ -79,190 +78,305 @@ const schema = new mongoose_1.Schema({
|
|
|
79
78
|
minimize: false,
|
|
80
79
|
versionKey: false
|
|
81
80
|
}
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
schema
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
schema
|
|
90
|
-
name: 'searchByOrganizerId',
|
|
91
|
-
partialFilterExpression: {
|
|
92
|
-
'organizer.id': { $exists: true }
|
|
93
|
-
}
|
|
94
|
-
});
|
|
95
|
-
schema.index({ typeOf: 1, startDate: 1 }, { name: 'searchByTypeOf' });
|
|
96
|
-
schema.index({ eventStatus: 1, startDate: 1 }, { name: 'searchByEventStatus' });
|
|
97
|
-
schema.index({ name: 1, startDate: 1 }, { name: 'searchByName' });
|
|
98
|
-
schema.index({ 'superEvent.id': 1, startDate: 1 }, {
|
|
99
|
-
name: 'searchBySuperEventId',
|
|
100
|
-
partialFilterExpression: {
|
|
101
|
-
'superEvent.id': { $exists: true }
|
|
102
|
-
}
|
|
103
|
-
});
|
|
104
|
-
schema.index({ 'location.id': 1, startDate: 1 }, {
|
|
105
|
-
name: 'searchByLocationId',
|
|
106
|
-
partialFilterExpression: {
|
|
107
|
-
'location.id': { $exists: true }
|
|
108
|
-
}
|
|
109
|
-
});
|
|
110
|
-
schema.index({ 'location.branchCode': 1, startDate: 1 }, {
|
|
111
|
-
name: 'searchByLocationBranchCode',
|
|
112
|
-
partialFilterExpression: {
|
|
113
|
-
'location.branchCode': { $exists: true }
|
|
114
|
-
}
|
|
115
|
-
});
|
|
116
|
-
schema.index({ 'superEvent.location.branchCode': 1, startDate: 1 }, {
|
|
117
|
-
name: 'searchBySuperEventLocationBranchCode',
|
|
118
|
-
partialFilterExpression: {
|
|
119
|
-
'superEvent.location.branchCode': { $exists: true }
|
|
120
|
-
}
|
|
121
|
-
});
|
|
122
|
-
schema.index({ 'superEvent.location.id': 1, startDate: 1 }, {
|
|
123
|
-
name: 'searchBySuperEventLocationId',
|
|
124
|
-
partialFilterExpression: {
|
|
125
|
-
'superEvent.location.id': { $exists: true }
|
|
126
|
-
}
|
|
127
|
-
});
|
|
128
|
-
schema.index({ 'superEvent.workPerformed.identifier': 1, startDate: 1 }, {
|
|
129
|
-
name: 'searchBySuperEventWorkPerformedIdentifier',
|
|
130
|
-
partialFilterExpression: {
|
|
131
|
-
'superEvent.workPerformed.identifier': { $exists: true }
|
|
132
|
-
}
|
|
133
|
-
});
|
|
134
|
-
schema.index({ 'workPerformed.identifier': 1, startDate: 1 }, {
|
|
135
|
-
name: 'searchByWorkPerformedIdentifier',
|
|
136
|
-
partialFilterExpression: {
|
|
137
|
-
'workPerformed.identifier': { $exists: true }
|
|
138
|
-
}
|
|
139
|
-
});
|
|
140
|
-
schema.index({ 'workPerformed.version': 1, startDate: 1 }, {
|
|
141
|
-
name: 'searchByWorkPerformedVersion',
|
|
142
|
-
partialFilterExpression: {
|
|
143
|
-
'workPerformed.version': { $exists: true }
|
|
144
|
-
}
|
|
145
|
-
});
|
|
146
|
-
// コンテンツ+バージョンに対するuniqueness
|
|
147
|
-
schema.index({
|
|
148
|
-
'project.id': 1,
|
|
149
|
-
'location.branchCode': 1,
|
|
150
|
-
'workPerformed.identifier': 1,
|
|
151
|
-
'workPerformed.version': 1
|
|
152
|
-
}, {
|
|
153
|
-
unique: true,
|
|
154
|
-
name: 'uniqueScreeningEventSeries',
|
|
155
|
-
partialFilterExpression: {
|
|
156
|
-
typeOf: factory.eventType.ScreeningEventSeries,
|
|
157
|
-
'location.branchCode': { $exists: true },
|
|
158
|
-
'workPerformed.identifier': { $exists: true },
|
|
159
|
-
'workPerformed.version': { $exists: true }
|
|
160
|
-
}
|
|
161
|
-
});
|
|
162
|
-
schema.index({ startDate: 1 }, { name: 'searchByStartDate' });
|
|
163
|
-
schema.index({ endDate: 1, startDate: 1 }, { name: 'searchByEndDate' });
|
|
164
|
-
schema.index({ 'hasOfferCatalog.id': 1, startDate: 1 }, {
|
|
165
|
-
name: 'searchByHasOfferCatalog',
|
|
166
|
-
partialFilterExpression: {
|
|
167
|
-
'hasOfferCatalog.id': { $exists: true }
|
|
168
|
-
}
|
|
169
|
-
});
|
|
170
|
-
schema.index({ 'offers.availabilityEnds': 1, startDate: 1 }, {
|
|
171
|
-
name: 'searchByOffersAvailabilityEnds-v2',
|
|
172
|
-
partialFilterExpression: {
|
|
173
|
-
'offers.availabilityEnds': { $exists: true }
|
|
174
|
-
}
|
|
175
|
-
});
|
|
176
|
-
schema.index({ 'offers.availabilityStarts': 1, startDate: 1 }, {
|
|
177
|
-
name: 'searchByOffersAvailabilityStarts-v2',
|
|
178
|
-
partialFilterExpression: {
|
|
179
|
-
'offers.availabilityStarts': { $exists: true }
|
|
180
|
-
}
|
|
181
|
-
});
|
|
182
|
-
schema.index({ 'offers.validThrough': 1, startDate: 1 }, {
|
|
183
|
-
name: 'searchByOffersValidThrough-v2',
|
|
184
|
-
partialFilterExpression: {
|
|
185
|
-
'offers.validThrough': { $exists: true }
|
|
186
|
-
}
|
|
187
|
-
});
|
|
188
|
-
schema.index({ 'offers.validFrom': 1, startDate: 1 }, {
|
|
189
|
-
name: 'searchByOffersValidFrom-v2',
|
|
190
|
-
partialFilterExpression: {
|
|
191
|
-
'offers.validFrom': { $exists: true }
|
|
192
|
-
}
|
|
193
|
-
});
|
|
194
|
-
schema.index({ 'offers.id': 1, startDate: 1 }, {
|
|
195
|
-
name: 'searchByOffersId-v2',
|
|
196
|
-
partialFilterExpression: {
|
|
197
|
-
'offers.id': { $exists: true }
|
|
198
|
-
}
|
|
199
|
-
});
|
|
200
|
-
schema.index({
|
|
201
|
-
'offers.itemOffered.serviceOutput.reservedTicket.ticketedSeat.typeOf': 1,
|
|
202
|
-
startDate: 1
|
|
203
|
-
}, {
|
|
204
|
-
partialFilterExpression: {
|
|
205
|
-
'offers.itemOffered.serviceOutput.reservedTicket.ticketedSeat.typeOf': { $exists: true }
|
|
206
|
-
},
|
|
207
|
-
name: 'searchByOffersItemOfferedServiceOutputReservedTicketTicketedSeatTypeOf'
|
|
208
|
-
});
|
|
209
|
-
schema.index({
|
|
210
|
-
'offers.itemOffered.serviceType.id': 1,
|
|
211
|
-
startDate: 1
|
|
212
|
-
}, {
|
|
213
|
-
partialFilterExpression: {
|
|
214
|
-
'offers.itemOffered.serviceType.id': { $exists: true }
|
|
215
|
-
},
|
|
216
|
-
name: 'searchByOffersItemOfferedServiceTypeId'
|
|
217
|
-
});
|
|
218
|
-
schema.index({
|
|
219
|
-
'offers.itemOffered.id': 1,
|
|
220
|
-
startDate: 1
|
|
221
|
-
}, {
|
|
222
|
-
partialFilterExpression: {
|
|
223
|
-
'offers.itemOffered.id': { $exists: true }
|
|
224
|
-
},
|
|
225
|
-
name: 'searchByOffersItemOfferedId'
|
|
226
|
-
});
|
|
227
|
-
schema.index({ 'offers.seller.makesOffer': 1, startDate: 1 }, {
|
|
228
|
-
name: 'searchBySellerMakesOffer',
|
|
229
|
-
partialFilterExpression: {
|
|
230
|
-
'offers.seller.makesOffer': { $exists: true }
|
|
231
|
-
}
|
|
232
|
-
});
|
|
233
|
-
schema.index({ 'videoFormat.typeOf': 1, startDate: 1 }, {
|
|
234
|
-
name: 'searchByVideoFormatTypeOf',
|
|
235
|
-
partialFilterExpression: {
|
|
236
|
-
'videoFormat.typeOf': { $exists: true }
|
|
237
|
-
}
|
|
238
|
-
});
|
|
239
|
-
schema.index({ 'soundFormat.typeOf': 1, startDate: 1 }, {
|
|
240
|
-
name: 'searchBySoundFormatTypeOf',
|
|
241
|
-
partialFilterExpression: {
|
|
242
|
-
'soundFormat.typeOf': { $exists: true }
|
|
243
|
-
}
|
|
244
|
-
});
|
|
245
|
-
schema.index({ 'name.ja': 1, startDate: 1 }, {
|
|
246
|
-
name: 'searchByNameJa',
|
|
247
|
-
partialFilterExpression: {
|
|
248
|
-
'name.ja': { $exists: true }
|
|
249
|
-
}
|
|
250
|
-
});
|
|
251
|
-
schema.index({ 'name.en': 1, startDate: 1 }, {
|
|
252
|
-
name: 'searchByNameEn',
|
|
253
|
-
partialFilterExpression: {
|
|
254
|
-
'name.en': { $exists: true }
|
|
255
|
-
}
|
|
256
|
-
});
|
|
257
|
-
schema.index({ kanaName: 1, startDate: 1 }, {
|
|
258
|
-
name: 'searchByKanaName',
|
|
259
|
-
partialFilterExpression: {
|
|
260
|
-
kanaName: { $exists: true }
|
|
261
|
-
}
|
|
262
|
-
});
|
|
263
|
-
schema.index({ additionalProperty: 1, startDate: 1 }, {
|
|
264
|
-
name: 'searchByAdditionalProperty',
|
|
265
|
-
partialFilterExpression: {
|
|
266
|
-
additionalProperty: { $exists: true }
|
|
81
|
+
};
|
|
82
|
+
/**
|
|
83
|
+
* イベントスキーマ
|
|
84
|
+
*/
|
|
85
|
+
let schema;
|
|
86
|
+
function createSchema() {
|
|
87
|
+
if (schema === undefined) {
|
|
88
|
+
schema = new mongoose_1.Schema(schemaDefinition, schemaOptions);
|
|
267
89
|
}
|
|
268
|
-
|
|
90
|
+
return schema;
|
|
91
|
+
}
|
|
92
|
+
exports.createSchema = createSchema;
|
|
93
|
+
const indexes = [
|
|
94
|
+
[
|
|
95
|
+
{ createdAt: 1 },
|
|
96
|
+
{ name: 'searchByCreatedAt' }
|
|
97
|
+
],
|
|
98
|
+
[
|
|
99
|
+
{ updatedAt: 1 },
|
|
100
|
+
{ name: 'searchByUpdatedAt' }
|
|
101
|
+
],
|
|
102
|
+
[
|
|
103
|
+
{ 'project.id': 1, startDate: 1 },
|
|
104
|
+
{
|
|
105
|
+
name: 'searchByProjectId-v20220721'
|
|
106
|
+
}
|
|
107
|
+
],
|
|
108
|
+
[
|
|
109
|
+
{ 'organizer.id': 1, startDate: 1 },
|
|
110
|
+
{
|
|
111
|
+
name: 'searchByOrganizerId',
|
|
112
|
+
partialFilterExpression: {
|
|
113
|
+
'organizer.id': { $exists: true }
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
],
|
|
117
|
+
[
|
|
118
|
+
{ typeOf: 1, startDate: 1 },
|
|
119
|
+
{ name: 'searchByTypeOf' }
|
|
120
|
+
],
|
|
121
|
+
[
|
|
122
|
+
{ eventStatus: 1, startDate: 1 },
|
|
123
|
+
{ name: 'searchByEventStatus' }
|
|
124
|
+
],
|
|
125
|
+
[
|
|
126
|
+
{ name: 1, startDate: 1 },
|
|
127
|
+
{ name: 'searchByName' }
|
|
128
|
+
],
|
|
129
|
+
[
|
|
130
|
+
{ 'superEvent.id': 1, startDate: 1 },
|
|
131
|
+
{
|
|
132
|
+
name: 'searchBySuperEventId',
|
|
133
|
+
partialFilterExpression: {
|
|
134
|
+
'superEvent.id': { $exists: true }
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
],
|
|
138
|
+
[
|
|
139
|
+
{ 'location.id': 1, startDate: 1 },
|
|
140
|
+
{
|
|
141
|
+
name: 'searchByLocationId',
|
|
142
|
+
partialFilterExpression: {
|
|
143
|
+
'location.id': { $exists: true }
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
],
|
|
147
|
+
[
|
|
148
|
+
{ 'location.branchCode': 1, startDate: 1 },
|
|
149
|
+
{
|
|
150
|
+
name: 'searchByLocationBranchCode',
|
|
151
|
+
partialFilterExpression: {
|
|
152
|
+
'location.branchCode': { $exists: true }
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
],
|
|
156
|
+
[
|
|
157
|
+
{ 'superEvent.location.branchCode': 1, startDate: 1 },
|
|
158
|
+
{
|
|
159
|
+
name: 'searchBySuperEventLocationBranchCode',
|
|
160
|
+
partialFilterExpression: {
|
|
161
|
+
'superEvent.location.branchCode': { $exists: true }
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
],
|
|
165
|
+
[
|
|
166
|
+
{ 'superEvent.location.id': 1, startDate: 1 },
|
|
167
|
+
{
|
|
168
|
+
name: 'searchBySuperEventLocationId',
|
|
169
|
+
partialFilterExpression: {
|
|
170
|
+
'superEvent.location.id': { $exists: true }
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
],
|
|
174
|
+
[
|
|
175
|
+
{ 'superEvent.workPerformed.identifier': 1, startDate: 1 },
|
|
176
|
+
{
|
|
177
|
+
name: 'searchBySuperEventWorkPerformedIdentifier',
|
|
178
|
+
partialFilterExpression: {
|
|
179
|
+
'superEvent.workPerformed.identifier': { $exists: true }
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
],
|
|
183
|
+
[
|
|
184
|
+
{ 'workPerformed.identifier': 1, startDate: 1 },
|
|
185
|
+
{
|
|
186
|
+
name: 'searchByWorkPerformedIdentifier',
|
|
187
|
+
partialFilterExpression: {
|
|
188
|
+
'workPerformed.identifier': { $exists: true }
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
],
|
|
192
|
+
[
|
|
193
|
+
{ 'workPerformed.version': 1, startDate: 1 },
|
|
194
|
+
{
|
|
195
|
+
name: 'searchByWorkPerformedVersion',
|
|
196
|
+
partialFilterExpression: {
|
|
197
|
+
'workPerformed.version': { $exists: true }
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
],
|
|
201
|
+
[
|
|
202
|
+
// コンテンツ+バージョンに対するuniqueness
|
|
203
|
+
{
|
|
204
|
+
'project.id': 1,
|
|
205
|
+
'location.branchCode': 1,
|
|
206
|
+
'workPerformed.identifier': 1,
|
|
207
|
+
'workPerformed.version': 1
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
unique: true,
|
|
211
|
+
name: 'uniqueScreeningEventSeries',
|
|
212
|
+
partialFilterExpression: {
|
|
213
|
+
typeOf: factory.eventType.ScreeningEventSeries,
|
|
214
|
+
'location.branchCode': { $exists: true },
|
|
215
|
+
'workPerformed.identifier': { $exists: true },
|
|
216
|
+
'workPerformed.version': { $exists: true }
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
],
|
|
220
|
+
[
|
|
221
|
+
{ startDate: 1 },
|
|
222
|
+
{ name: 'searchByStartDate' }
|
|
223
|
+
],
|
|
224
|
+
[
|
|
225
|
+
{ endDate: 1, startDate: 1 },
|
|
226
|
+
{ name: 'searchByEndDate' }
|
|
227
|
+
],
|
|
228
|
+
[
|
|
229
|
+
{ 'hasOfferCatalog.id': 1, startDate: 1 },
|
|
230
|
+
{
|
|
231
|
+
name: 'searchByHasOfferCatalog',
|
|
232
|
+
partialFilterExpression: {
|
|
233
|
+
'hasOfferCatalog.id': { $exists: true }
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
],
|
|
237
|
+
[
|
|
238
|
+
{ 'offers.availabilityEnds': 1, startDate: 1 },
|
|
239
|
+
{
|
|
240
|
+
name: 'searchByOffersAvailabilityEnds-v2',
|
|
241
|
+
partialFilterExpression: {
|
|
242
|
+
'offers.availabilityEnds': { $exists: true }
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
],
|
|
246
|
+
[
|
|
247
|
+
{ 'offers.availabilityStarts': 1, startDate: 1 },
|
|
248
|
+
{
|
|
249
|
+
name: 'searchByOffersAvailabilityStarts-v2',
|
|
250
|
+
partialFilterExpression: {
|
|
251
|
+
'offers.availabilityStarts': { $exists: true }
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
],
|
|
255
|
+
[
|
|
256
|
+
{ 'offers.validThrough': 1, startDate: 1 },
|
|
257
|
+
{
|
|
258
|
+
name: 'searchByOffersValidThrough-v2',
|
|
259
|
+
partialFilterExpression: {
|
|
260
|
+
'offers.validThrough': { $exists: true }
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
],
|
|
264
|
+
[
|
|
265
|
+
{ 'offers.validFrom': 1, startDate: 1 },
|
|
266
|
+
{
|
|
267
|
+
name: 'searchByOffersValidFrom-v2',
|
|
268
|
+
partialFilterExpression: {
|
|
269
|
+
'offers.validFrom': { $exists: true }
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
],
|
|
273
|
+
[
|
|
274
|
+
{ 'offers.id': 1, startDate: 1 },
|
|
275
|
+
{
|
|
276
|
+
name: 'searchByOffersId-v2',
|
|
277
|
+
partialFilterExpression: {
|
|
278
|
+
'offers.id': { $exists: true }
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
],
|
|
282
|
+
[
|
|
283
|
+
{
|
|
284
|
+
'offers.itemOffered.serviceOutput.reservedTicket.ticketedSeat.typeOf': 1,
|
|
285
|
+
startDate: 1
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
partialFilterExpression: {
|
|
289
|
+
'offers.itemOffered.serviceOutput.reservedTicket.ticketedSeat.typeOf': { $exists: true }
|
|
290
|
+
},
|
|
291
|
+
name: 'searchByOffersItemOfferedServiceOutputReservedTicketTicketedSeatTypeOf'
|
|
292
|
+
}
|
|
293
|
+
],
|
|
294
|
+
[
|
|
295
|
+
{
|
|
296
|
+
'offers.itemOffered.serviceType.id': 1,
|
|
297
|
+
startDate: 1
|
|
298
|
+
},
|
|
299
|
+
{
|
|
300
|
+
partialFilterExpression: {
|
|
301
|
+
'offers.itemOffered.serviceType.id': { $exists: true }
|
|
302
|
+
},
|
|
303
|
+
name: 'searchByOffersItemOfferedServiceTypeId'
|
|
304
|
+
}
|
|
305
|
+
],
|
|
306
|
+
[
|
|
307
|
+
{
|
|
308
|
+
'offers.itemOffered.id': 1,
|
|
309
|
+
startDate: 1
|
|
310
|
+
},
|
|
311
|
+
{
|
|
312
|
+
partialFilterExpression: {
|
|
313
|
+
'offers.itemOffered.id': { $exists: true }
|
|
314
|
+
},
|
|
315
|
+
name: 'searchByOffersItemOfferedId'
|
|
316
|
+
}
|
|
317
|
+
],
|
|
318
|
+
[
|
|
319
|
+
{ 'offers.seller.makesOffer': 1, startDate: 1 },
|
|
320
|
+
{
|
|
321
|
+
name: 'searchBySellerMakesOffer',
|
|
322
|
+
partialFilterExpression: {
|
|
323
|
+
'offers.seller.makesOffer': { $exists: true }
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
],
|
|
327
|
+
[
|
|
328
|
+
{ 'videoFormat.typeOf': 1, startDate: 1 },
|
|
329
|
+
{
|
|
330
|
+
name: 'searchByVideoFormatTypeOf',
|
|
331
|
+
partialFilterExpression: {
|
|
332
|
+
'videoFormat.typeOf': { $exists: true }
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
],
|
|
336
|
+
[
|
|
337
|
+
{ 'soundFormat.typeOf': 1, startDate: 1 },
|
|
338
|
+
{
|
|
339
|
+
name: 'searchBySoundFormatTypeOf',
|
|
340
|
+
partialFilterExpression: {
|
|
341
|
+
'soundFormat.typeOf': { $exists: true }
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
],
|
|
345
|
+
[
|
|
346
|
+
{ 'name.ja': 1, startDate: 1 },
|
|
347
|
+
{
|
|
348
|
+
name: 'searchByNameJa',
|
|
349
|
+
partialFilterExpression: {
|
|
350
|
+
'name.ja': { $exists: true }
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
],
|
|
354
|
+
[
|
|
355
|
+
{ 'name.en': 1, startDate: 1 },
|
|
356
|
+
{
|
|
357
|
+
name: 'searchByNameEn',
|
|
358
|
+
partialFilterExpression: {
|
|
359
|
+
'name.en': { $exists: true }
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
],
|
|
363
|
+
[
|
|
364
|
+
{ kanaName: 1, startDate: 1 },
|
|
365
|
+
{
|
|
366
|
+
name: 'searchByKanaName',
|
|
367
|
+
partialFilterExpression: {
|
|
368
|
+
kanaName: { $exists: true }
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
],
|
|
372
|
+
[
|
|
373
|
+
{ additionalProperty: 1, startDate: 1 },
|
|
374
|
+
{
|
|
375
|
+
name: 'searchByAdditionalProperty',
|
|
376
|
+
partialFilterExpression: {
|
|
377
|
+
additionalProperty: { $exists: true }
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
]
|
|
381
|
+
];
|
|
382
|
+
exports.indexes = indexes;
|
|
@@ -1,69 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
/// <reference types="mongoose/types/callback" />
|
|
3
|
-
/// <reference types="mongoose/types/collection" />
|
|
4
|
-
/// <reference types="mongoose/types/connection" />
|
|
5
|
-
/// <reference types="mongoose/types/cursor" />
|
|
6
|
-
/// <reference types="mongoose/types/document" />
|
|
7
|
-
/// <reference types="mongoose/types/error" />
|
|
8
|
-
/// <reference types="mongoose/types/expressions" />
|
|
9
|
-
/// <reference types="mongoose/types/helpers" />
|
|
10
|
-
/// <reference types="mongoose/types/middlewares" />
|
|
11
|
-
/// <reference types="mongoose/types/indexes" />
|
|
12
|
-
/// <reference types="mongoose/types/models" />
|
|
13
|
-
/// <reference types="mongoose/types/mongooseoptions" />
|
|
14
|
-
/// <reference types="mongoose/types/pipelinestage" />
|
|
15
|
-
/// <reference types="mongoose/types/populate" />
|
|
16
|
-
/// <reference types="mongoose/types/query" />
|
|
17
|
-
/// <reference types="mongoose/types/schemaoptions" />
|
|
18
|
-
/// <reference types="mongoose/types/schematypes" />
|
|
19
|
-
/// <reference types="mongoose/types/session" />
|
|
20
|
-
/// <reference types="mongoose/types/types" />
|
|
21
|
-
/// <reference types="mongoose/types/utility" />
|
|
22
|
-
/// <reference types="mongoose/types/validation" />
|
|
23
|
-
/// <reference types="mongoose/types/virtuals" />
|
|
24
|
-
/// <reference types="mongoose/types/inferschematype" />
|
|
25
|
-
import { Schema } from 'mongoose';
|
|
1
|
+
import { IndexDefinition, IndexOptions, Schema } from 'mongoose';
|
|
26
2
|
declare const modelName = "Member";
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
31
|
-
collection: string;
|
|
32
|
-
id: true;
|
|
33
|
-
read: string;
|
|
34
|
-
writeConcern: import("mongodb").WriteConcern;
|
|
35
|
-
strict: true;
|
|
36
|
-
strictQuery: false;
|
|
37
|
-
useNestedStrict: boolean;
|
|
38
|
-
timestamps: {
|
|
39
|
-
createdAt: string;
|
|
40
|
-
updatedAt: string;
|
|
41
|
-
};
|
|
42
|
-
toJSON: {
|
|
43
|
-
getters: false;
|
|
44
|
-
virtuals: false;
|
|
45
|
-
minimize: false;
|
|
46
|
-
versionKey: false;
|
|
47
|
-
};
|
|
48
|
-
toObject: {
|
|
49
|
-
getters: false;
|
|
50
|
-
virtuals: true;
|
|
51
|
-
minimize: false;
|
|
52
|
-
versionKey: false;
|
|
53
|
-
};
|
|
54
|
-
}, {
|
|
55
|
-
typeOf: string;
|
|
56
|
-
project: any;
|
|
57
|
-
member: any;
|
|
58
|
-
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
59
|
-
typeOf: string;
|
|
60
|
-
project: any;
|
|
61
|
-
member: any;
|
|
62
|
-
}>> & Omit<import("mongoose").FlatRecord<{
|
|
63
|
-
typeOf: string;
|
|
64
|
-
project: any;
|
|
65
|
-
member: any;
|
|
66
|
-
}> & {
|
|
67
|
-
_id: import("mongoose").Types.ObjectId;
|
|
68
|
-
}, never>>;
|
|
69
|
-
export { modelName, schema };
|
|
3
|
+
declare function createSchema(): Schema;
|
|
4
|
+
declare const indexes: [d: IndexDefinition, o: IndexOptions][];
|
|
5
|
+
export { modelName, indexes, createSchema };
|