@chevre/domain 21.4.0-alpha.3 → 21.4.0-alpha.31
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/example/src/chevre/cleanActions.ts +23 -0
- package/example/src/chevre/cleanEventsByMovieTheater.ts +32 -0
- package/example/src/chevre/createDeleteTransactionTasksOfDeletedPeople.ts +126 -0
- package/example/src/chevre/createManyEventsIfNotExist.ts +6 -0
- package/example/src/chevre/iam/searchMemberOfIdsByMemberId.ts +31 -0
- package/example/src/chevre/iam/searchProjectIdsByMemberId.ts +32 -0
- package/example/src/chevre/migrateEventOrganizer.ts +125 -0
- package/example/src/chevre/migrateIAMMemberMemberOf.ts +59 -0
- package/example/src/chevre/migrateReservationProvider.ts +119 -0
- package/example/src/chevre/migrateScreeningRoomOrganizer.ts +91 -0
- package/example/src/chevre/processReserve.ts +0 -1
- package/example/src/chevre/searchEvents.ts +1 -9
- package/example/src/chevre/searchPermissions.ts +7 -15
- package/lib/chevre/factory/event.d.ts +1 -1
- package/lib/chevre/repo/action.d.ts +6 -0
- package/lib/chevre/repo/action.js +13 -0
- package/lib/chevre/repo/assetTransaction.d.ts +4 -1
- package/lib/chevre/repo/assetTransaction.js +6 -12
- package/lib/chevre/repo/event.d.ts +25 -4
- package/lib/chevre/repo/event.js +122 -60
- package/lib/chevre/repo/member.d.ts +76 -1
- package/lib/chevre/repo/member.js +82 -20
- package/lib/chevre/repo/mongoose/schemas/event.d.ts +7 -4
- package/lib/chevre/repo/mongoose/schemas/event.js +15 -2
- package/lib/chevre/repo/mongoose/schemas/member.d.ts +7 -7
- package/lib/chevre/repo/mongoose/schemas/member.js +12 -6
- package/lib/chevre/repo/mongoose/schemas/place.d.ts +6 -6
- package/lib/chevre/repo/mongoose/schemas/place.js +9 -2
- package/lib/chevre/repo/mongoose/schemas/product.d.ts +3 -3
- package/lib/chevre/repo/mongoose/schemas/reservation.d.ts +6 -3
- package/lib/chevre/repo/mongoose/schemas/reservation.js +10 -4
- package/lib/chevre/repo/order.d.ts +21 -0
- package/lib/chevre/repo/order.js +54 -62
- package/lib/chevre/repo/place.d.ts +57 -16
- package/lib/chevre/repo/place.js +112 -167
- package/lib/chevre/repo/product.d.ts +2 -4
- package/lib/chevre/repo/product.js +52 -7
- package/lib/chevre/repo/reservation.d.ts +33 -21
- package/lib/chevre/repo/reservation.js +97 -79
- package/lib/chevre/repo/seller.d.ts +18 -5
- package/lib/chevre/repo/seller.js +53 -46
- package/lib/chevre/repo/stockHolder.d.ts +2 -77
- package/lib/chevre/repo/stockHolder.js +200 -476
- package/lib/chevre/repo/task.d.ts +1 -1
- package/lib/chevre/service/aggregation/event/aggregateScreeningEvent.d.ts +2 -2
- package/lib/chevre/service/aggregation/event/aggregateScreeningEvent.js +3 -2
- package/lib/chevre/service/aggregation/event/aggregateUseActionsOnEvent.js +1 -1
- package/lib/chevre/service/assetTransaction/pay/account/validation.js +9 -1
- package/lib/chevre/service/assetTransaction/pay.js +9 -1
- package/lib/chevre/service/assetTransaction/registerService.js +2 -2
- package/lib/chevre/service/assetTransaction/reserve/factory.d.ts +10 -4
- package/lib/chevre/service/assetTransaction/reserve/factory.js +21 -40
- package/lib/chevre/service/assetTransaction/reserve.d.ts +0 -1
- package/lib/chevre/service/assetTransaction/reserve.js +7 -22
- package/lib/chevre/service/event/createEvent.d.ts +11 -0
- package/lib/chevre/service/event/createEvent.js +112 -0
- package/lib/chevre/service/event.d.ts +2 -0
- package/lib/chevre/service/event.js +26 -26
- package/lib/chevre/service/iam.d.ts +5 -0
- package/lib/chevre/service/iam.js +7 -19
- package/lib/chevre/service/moneyTransfer.js +1 -1
- package/lib/chevre/service/offer/event/authorize.d.ts +0 -1
- package/lib/chevre/service/offer/event/authorize.js +6 -2
- package/lib/chevre/service/offer/event/searchEventTicketOffers.js +16 -2
- package/lib/chevre/service/offer/eventServiceByCOA/factory.d.ts +1 -1
- package/lib/chevre/service/offer/product/searchProductOffers.js +1 -1
- package/lib/chevre/service/order/returnOrder.js +8 -1
- package/lib/chevre/service/order/sendOrder.js +8 -1
- package/lib/chevre/service/payment/creditCard.js +9 -1
- package/lib/chevre/service/payment/movieTicket/factory.d.ts +2 -1
- package/lib/chevre/service/payment/movieTicket/validation.js +9 -1
- package/lib/chevre/service/payment/movieTicket.js +19 -2
- package/lib/chevre/service/payment/paymentCard.js +1 -3
- package/lib/chevre/service/reserve/cancelReservation.js +15 -28
- package/lib/chevre/service/reserve/confirmReservation.js +14 -30
- package/lib/chevre/service/reserve/verifyToken4reservation.d.ts +3 -0
- package/lib/chevre/service/reserve/verifyToken4reservation.js +3 -1
- package/lib/chevre/service/task/{syncScreeningRooms.d.ts → createEvent.d.ts} +1 -1
- package/lib/chevre/service/task/{syncScreeningRooms.js → createEvent.js} +11 -3
- package/lib/chevre/service/task/onAuthorizationCreated.js +1 -0
- package/lib/chevre/service/task/returnPayTransaction.js +1 -0
- package/lib/chevre/service/transaction/moneyTransfer.js +9 -1
- package/lib/chevre/service/transaction/orderProgramMembership/findCreditCard.js +1 -1
- package/lib/chevre/service/transaction/placeOrderInProgress.js +9 -6
- package/lib/chevre/service/transaction/returnOrder.js +9 -3
- package/lib/chevre/settings.d.ts +0 -2
- package/lib/chevre/settings.js +7 -7
- package/package.json +3 -3
- package/example/src/chevre/findByOrderNumberAndReservationId.ts +0 -20
- package/example/src/chevre/findScreeningRoomsByBranchCode.ts +0 -27
- package/example/src/chevre/migrateEventOffersItemOfferedAvailableChannel.ts +0 -90
- package/example/src/chevre/migrateEventOffersItemOfferedTypeOf.ts +0 -75
- package/example/src/chevre/migrateSSKTEventCOAEndpoint.ts +0 -64
- package/example/src/chevre/migrateScreeningEventSeriesVersion.ts +0 -79
- package/example/src/chevre/searchHoldReservations.ts +0 -38
- package/example/src/chevre/searchScreeningRooms.ts +0 -33
- package/example/src/chevre/syncScreeningRooms.ts +0 -21
- package/example/src/chevre/syncScreeningRoomsAll.ts +0 -41
- package/lib/chevre/repo/mongoose/schemas/holdReservation.d.ts +0 -75
- package/lib/chevre/repo/mongoose/schemas/holdReservation.js +0 -93
|
@@ -1,3 +1,27 @@
|
|
|
1
|
+
/// <reference types="mongoose/types/aggregate" />
|
|
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" />
|
|
1
25
|
import { Connection } from 'mongoose';
|
|
2
26
|
import * as factory from '../factory';
|
|
3
27
|
/**
|
|
@@ -19,6 +43,14 @@ export declare class MongoRepository {
|
|
|
19
43
|
id: {
|
|
20
44
|
$eq: string;
|
|
21
45
|
};
|
|
46
|
+
memberOf: {
|
|
47
|
+
id: {
|
|
48
|
+
$eq: string;
|
|
49
|
+
};
|
|
50
|
+
typeOf: {
|
|
51
|
+
$eq: factory.organizationType.Corporation | factory.organizationType.Project;
|
|
52
|
+
};
|
|
53
|
+
};
|
|
22
54
|
};
|
|
23
55
|
}): Promise<{
|
|
24
56
|
roleName: string;
|
|
@@ -43,12 +75,31 @@ export declare class MongoRepository {
|
|
|
43
75
|
id: string;
|
|
44
76
|
};
|
|
45
77
|
member: {
|
|
46
|
-
hasRole?: factory.iam.IMemberHasRole;
|
|
47
78
|
id: string;
|
|
79
|
+
memberOf: {
|
|
80
|
+
id: string;
|
|
81
|
+
typeOf: factory.organizationType.Corporation | factory.organizationType.Project;
|
|
82
|
+
};
|
|
83
|
+
hasRole?: factory.iam.IMemberHasRole;
|
|
48
84
|
image?: string;
|
|
49
85
|
name?: string;
|
|
50
86
|
};
|
|
51
87
|
}): Promise<void>;
|
|
88
|
+
/**
|
|
89
|
+
* 互換性維持プログラム専用
|
|
90
|
+
*/
|
|
91
|
+
updateByMemberMemberOf(params: {
|
|
92
|
+
project: {
|
|
93
|
+
id: string;
|
|
94
|
+
};
|
|
95
|
+
member: {
|
|
96
|
+
id: string;
|
|
97
|
+
memberOf: {
|
|
98
|
+
id: string;
|
|
99
|
+
typeOf: factory.organizationType.Project;
|
|
100
|
+
};
|
|
101
|
+
};
|
|
102
|
+
}): Promise<void>;
|
|
52
103
|
/**
|
|
53
104
|
* メンバー削除
|
|
54
105
|
*/
|
|
@@ -58,6 +109,14 @@ export declare class MongoRepository {
|
|
|
58
109
|
};
|
|
59
110
|
member: {
|
|
60
111
|
id: string;
|
|
112
|
+
memberOf: {
|
|
113
|
+
id: {
|
|
114
|
+
$eq: string;
|
|
115
|
+
};
|
|
116
|
+
typeOf: {
|
|
117
|
+
$eq: factory.organizationType.Corporation | factory.organizationType.Project;
|
|
118
|
+
};
|
|
119
|
+
};
|
|
61
120
|
};
|
|
62
121
|
}): Promise<void>;
|
|
63
122
|
/**
|
|
@@ -75,4 +134,20 @@ export declare class MongoRepository {
|
|
|
75
134
|
limit: number;
|
|
76
135
|
page: number;
|
|
77
136
|
}): Promise<string[]>;
|
|
137
|
+
/**
|
|
138
|
+
* member.memberOf.typeOfからmember.memberOf.idのリストを検索する
|
|
139
|
+
* 権限を持つ販売者IDの検索など
|
|
140
|
+
*/
|
|
141
|
+
searchMemberOfIdsByMemberId(params: {
|
|
142
|
+
member: {
|
|
143
|
+
id: string;
|
|
144
|
+
memberOf: {
|
|
145
|
+
typeOf: factory.organizationType.Corporation | factory.organizationType.Project;
|
|
146
|
+
};
|
|
147
|
+
};
|
|
148
|
+
project: {
|
|
149
|
+
id: string;
|
|
150
|
+
};
|
|
151
|
+
}): Promise<string[]>;
|
|
152
|
+
getCursor(conditions: any, projection: any): import("mongoose").Cursor<any, import("mongoose").QueryOptions<any>>;
|
|
78
153
|
}
|
|
@@ -22,7 +22,7 @@ class MongoRepository {
|
|
|
22
22
|
}
|
|
23
23
|
// tslint:disable-next-line:cyclomatic-complexity max-func-body-length
|
|
24
24
|
static CREATE_MONGO_CONDITIONS(params) {
|
|
25
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
25
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
26
26
|
const andConditions = [];
|
|
27
27
|
// tslint:disable-next-line:no-single-line-block-comment
|
|
28
28
|
/* istanbul ignore else */
|
|
@@ -48,6 +48,14 @@ class MongoRepository {
|
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
|
+
const memberMemberOfTypeOfEq = (_c = (_b = (_a = params.member) === null || _a === void 0 ? void 0 : _a.memberOf) === null || _b === void 0 ? void 0 : _b.typeOf) === null || _c === void 0 ? void 0 : _c.$eq;
|
|
52
|
+
if (typeof memberMemberOfTypeOfEq === 'string') {
|
|
53
|
+
andConditions.push({ 'member.memberOf.typeOf': { $eq: memberMemberOfTypeOfEq } });
|
|
54
|
+
}
|
|
55
|
+
const memberMemberOfIdEq = (_f = (_e = (_d = params.member) === null || _d === void 0 ? void 0 : _d.memberOf) === null || _e === void 0 ? void 0 : _e.id) === null || _f === void 0 ? void 0 : _f.$eq;
|
|
56
|
+
if (typeof memberMemberOfIdEq === 'string') {
|
|
57
|
+
andConditions.push({ 'member.memberOf.id': { $eq: memberMemberOfIdEq } });
|
|
58
|
+
}
|
|
51
59
|
// tslint:disable-next-line:no-single-line-block-comment
|
|
52
60
|
/* istanbul ignore else */
|
|
53
61
|
if (params.member !== undefined && params.member !== null) {
|
|
@@ -71,7 +79,7 @@ class MongoRepository {
|
|
|
71
79
|
}
|
|
72
80
|
}
|
|
73
81
|
}
|
|
74
|
-
const memberIdIn = (
|
|
82
|
+
const memberIdIn = (_h = (_g = params.member) === null || _g === void 0 ? void 0 : _g.id) === null || _h === void 0 ? void 0 : _h.$in;
|
|
75
83
|
if (Array.isArray(memberIdIn)) {
|
|
76
84
|
andConditions.push({
|
|
77
85
|
'member.id': {
|
|
@@ -79,7 +87,7 @@ class MongoRepository {
|
|
|
79
87
|
}
|
|
80
88
|
});
|
|
81
89
|
}
|
|
82
|
-
const memberNameRegex = (
|
|
90
|
+
const memberNameRegex = (_k = (_j = params.member) === null || _j === void 0 ? void 0 : _j.name) === null || _k === void 0 ? void 0 : _k.$regex;
|
|
83
91
|
if (typeof memberNameRegex === 'string' && memberNameRegex.length > 0) {
|
|
84
92
|
andConditions.push({
|
|
85
93
|
'member.name': {
|
|
@@ -88,7 +96,7 @@ class MongoRepository {
|
|
|
88
96
|
}
|
|
89
97
|
});
|
|
90
98
|
}
|
|
91
|
-
const memberHasRoleRoleNameEq = (
|
|
99
|
+
const memberHasRoleRoleNameEq = (_o = (_m = (_l = params.member) === null || _l === void 0 ? void 0 : _l.hasRole) === null || _m === void 0 ? void 0 : _m.roleName) === null || _o === void 0 ? void 0 : _o.$eq;
|
|
92
100
|
if (typeof memberHasRoleRoleNameEq === 'string') {
|
|
93
101
|
andConditions.push({
|
|
94
102
|
'member.hasRole.roleName': {
|
|
@@ -136,7 +144,9 @@ class MongoRepository {
|
|
|
136
144
|
return __awaiter(this, void 0, void 0, function* () {
|
|
137
145
|
const matchStages = [
|
|
138
146
|
{ $match: { 'project.id': { $eq: params.project.id.$eq } } },
|
|
139
|
-
{ $match: { 'member.id': { $eq: params.member.id.$eq } } }
|
|
147
|
+
{ $match: { 'member.id': { $eq: params.member.id.$eq } } },
|
|
148
|
+
{ $match: { 'member.memberOf.id': { $eq: params.member.memberOf.id.$eq } } },
|
|
149
|
+
{ $match: { 'member.memberOf.typeOf': { $eq: params.member.memberOf.typeOf.$eq } } }
|
|
140
150
|
];
|
|
141
151
|
const aggregate = this.memberModel.aggregate([
|
|
142
152
|
// ...(typeof params.sort?.productID === 'number')
|
|
@@ -215,7 +225,9 @@ class MongoRepository {
|
|
|
215
225
|
return __awaiter(this, void 0, void 0, function* () {
|
|
216
226
|
const doc = yield this.memberModel.findOneAndUpdate({
|
|
217
227
|
'project.id': { $eq: params.project.id },
|
|
218
|
-
'member.id': { $eq: params.member.id }
|
|
228
|
+
'member.id': { $eq: params.member.id },
|
|
229
|
+
'member.memberOf.id': { $eq: params.member.memberOf.id },
|
|
230
|
+
'member.memberOf.typeOf': { $eq: params.member.memberOf.typeOf }
|
|
219
231
|
}, Object.assign(Object.assign(Object.assign({ updatedAt: new Date() }, (Array.isArray(params.member.hasRole)) ? { 'member.hasRole': params.member.hasRole } : undefined), (typeof params.member.image === 'string') ? { 'member.image': params.member.image } : undefined), (typeof params.member.name === 'string') ? { 'member.name': params.member.name } : undefined))
|
|
220
232
|
.exec();
|
|
221
233
|
if (doc === null) {
|
|
@@ -223,6 +235,24 @@ class MongoRepository {
|
|
|
223
235
|
}
|
|
224
236
|
});
|
|
225
237
|
}
|
|
238
|
+
/**
|
|
239
|
+
* 互換性維持プログラム専用
|
|
240
|
+
*/
|
|
241
|
+
updateByMemberMemberOf(params) {
|
|
242
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
243
|
+
const doc = yield this.memberModel.findOneAndUpdate({
|
|
244
|
+
'project.id': { $eq: params.project.id },
|
|
245
|
+
'member.id': { $eq: params.member.id },
|
|
246
|
+
'member.memberOf': { $exists: false }
|
|
247
|
+
}, {
|
|
248
|
+
'member.memberOf': params.member.memberOf
|
|
249
|
+
})
|
|
250
|
+
.exec();
|
|
251
|
+
if (doc === null) {
|
|
252
|
+
throw new factory.errors.NotFound(this.memberModel.modelName);
|
|
253
|
+
}
|
|
254
|
+
});
|
|
255
|
+
}
|
|
226
256
|
/**
|
|
227
257
|
* メンバー削除
|
|
228
258
|
*/
|
|
@@ -230,7 +260,9 @@ class MongoRepository {
|
|
|
230
260
|
return __awaiter(this, void 0, void 0, function* () {
|
|
231
261
|
const doc = yield this.memberModel.findOneAndDelete({
|
|
232
262
|
'project.id': { $eq: params.project.id },
|
|
233
|
-
'member.id': { $eq: params.member.id }
|
|
263
|
+
'member.id': { $eq: params.member.id },
|
|
264
|
+
'member.memberOf.id': { $eq: params.member.memberOf.id.$eq },
|
|
265
|
+
'member.memberOf.typeOf': { $eq: params.member.memberOf.typeOf.$eq }
|
|
234
266
|
})
|
|
235
267
|
.exec();
|
|
236
268
|
if (doc === null) {
|
|
@@ -244,22 +276,52 @@ class MongoRepository {
|
|
|
244
276
|
searchProjectIdsByMemberId(params) {
|
|
245
277
|
var _a, _b;
|
|
246
278
|
return __awaiter(this, void 0, void 0, function* () {
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
: undefined);
|
|
250
|
-
const query = this.memberModel.find(searchConditions, { project: 1 })
|
|
251
|
-
// sortを保証する
|
|
252
|
-
.sort({ 'project.id': factory.sortType.Ascending });
|
|
253
|
-
if (typeof params.limit === 'number' && params.limit > 0) {
|
|
254
|
-
const page = (typeof params.page === 'number' && params.page > 0) ? params.page : 1;
|
|
255
|
-
query.limit(params.limit)
|
|
256
|
-
.skip(params.limit * (page - 1));
|
|
279
|
+
if (typeof params.limit !== 'number') {
|
|
280
|
+
throw new factory.errors.ArgumentNull('limit');
|
|
257
281
|
}
|
|
258
|
-
|
|
282
|
+
if (typeof params.page !== 'number') {
|
|
283
|
+
throw new factory.errors.ArgumentNull('page');
|
|
284
|
+
}
|
|
285
|
+
const matchStages = [{ $match: { 'member.id': { $eq: params.member.id } } }];
|
|
286
|
+
if (typeof ((_b = (_a = params.project) === null || _a === void 0 ? void 0 : _a.id) === null || _b === void 0 ? void 0 : _b.$regex) === 'string' && params.project.id.$regex.length > 0) {
|
|
287
|
+
matchStages.push({ $match: { 'project.id': { $regex: new RegExp(params.project.id.$regex) } } });
|
|
288
|
+
}
|
|
289
|
+
const page = (typeof params.page === 'number' && params.page > 0) ? params.page : 1;
|
|
290
|
+
const aggregate = this.memberModel.aggregate([
|
|
291
|
+
...matchStages,
|
|
292
|
+
{
|
|
293
|
+
$group: {
|
|
294
|
+
_id: '$project.id'
|
|
295
|
+
}
|
|
296
|
+
},
|
|
297
|
+
{ $sort: { _id: factory.sortType.Ascending } }
|
|
298
|
+
])
|
|
299
|
+
.limit(params.limit * page)
|
|
300
|
+
.skip(params.limit * (page - 1));
|
|
301
|
+
return aggregate
|
|
259
302
|
.exec()
|
|
260
|
-
.then((docs) => docs.map((doc) => doc.
|
|
261
|
-
|
|
303
|
+
.then((docs) => docs.map((doc) => doc._id));
|
|
304
|
+
});
|
|
305
|
+
}
|
|
306
|
+
/**
|
|
307
|
+
* member.memberOf.typeOfからmember.memberOf.idのリストを検索する
|
|
308
|
+
* 権限を持つ販売者IDの検索など
|
|
309
|
+
*/
|
|
310
|
+
searchMemberOfIdsByMemberId(params) {
|
|
311
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
312
|
+
const query = this.memberModel.distinct('member.memberOf.id', {
|
|
313
|
+
'project.id': { $eq: params.project.id },
|
|
314
|
+
'member.id': { $eq: params.member.id },
|
|
315
|
+
'member.memberOf.typeOf': { $eq: params.member.memberOf.typeOf }
|
|
316
|
+
});
|
|
317
|
+
return query.setOptions({ maxTimeMS: settings_1.MONGO_MAX_TIME_MS })
|
|
318
|
+
.exec();
|
|
262
319
|
});
|
|
263
320
|
}
|
|
321
|
+
getCursor(conditions, projection) {
|
|
322
|
+
return this.memberModel.find(conditions, projection)
|
|
323
|
+
.sort({ 'member.id': factory.sortType.Ascending })
|
|
324
|
+
.cursor();
|
|
325
|
+
}
|
|
264
326
|
}
|
|
265
327
|
exports.MongoRepository = MongoRepository;
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
import { Schema } from 'mongoose';
|
|
26
26
|
declare const modelName = "Event";
|
|
27
27
|
/**
|
|
28
|
-
*
|
|
28
|
+
* イベントスキーマ
|
|
29
29
|
*/
|
|
30
30
|
declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
31
31
|
collection: string;
|
|
@@ -53,11 +53,12 @@ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, a
|
|
|
53
53
|
};
|
|
54
54
|
}, {
|
|
55
55
|
typeOf: string;
|
|
56
|
+
project: any;
|
|
57
|
+
organizer: any;
|
|
56
58
|
checkInCount: number;
|
|
57
59
|
attendeeCount: number;
|
|
58
60
|
_id?: string | undefined;
|
|
59
61
|
name?: any;
|
|
60
|
-
project?: any;
|
|
61
62
|
alternateName?: any;
|
|
62
63
|
description?: any;
|
|
63
64
|
additionalProperty?: any;
|
|
@@ -86,11 +87,12 @@ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, a
|
|
|
86
87
|
kanaName?: string | undefined;
|
|
87
88
|
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
88
89
|
typeOf: string;
|
|
90
|
+
project: any;
|
|
91
|
+
organizer: any;
|
|
89
92
|
checkInCount: number;
|
|
90
93
|
attendeeCount: number;
|
|
91
94
|
_id?: string | undefined;
|
|
92
95
|
name?: any;
|
|
93
|
-
project?: any;
|
|
94
96
|
alternateName?: any;
|
|
95
97
|
description?: any;
|
|
96
98
|
additionalProperty?: any;
|
|
@@ -119,11 +121,12 @@ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, a
|
|
|
119
121
|
kanaName?: string | undefined;
|
|
120
122
|
}>> & Omit<import("mongoose").FlatRecord<{
|
|
121
123
|
typeOf: string;
|
|
124
|
+
project: any;
|
|
125
|
+
organizer: any;
|
|
122
126
|
checkInCount: number;
|
|
123
127
|
attendeeCount: number;
|
|
124
128
|
_id?: string | undefined;
|
|
125
129
|
name?: any;
|
|
126
|
-
project?: any;
|
|
127
130
|
alternateName?: any;
|
|
128
131
|
description?: any;
|
|
129
132
|
additionalProperty?: any;
|
|
@@ -7,10 +7,17 @@ const factory = require("../../../factory");
|
|
|
7
7
|
const modelName = 'Event';
|
|
8
8
|
exports.modelName = modelName;
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
10
|
+
* イベントスキーマ
|
|
11
11
|
*/
|
|
12
12
|
const schema = new mongoose_1.Schema({
|
|
13
|
-
project:
|
|
13
|
+
project: {
|
|
14
|
+
type: mongoose_1.SchemaTypes.Mixed,
|
|
15
|
+
required: true
|
|
16
|
+
},
|
|
17
|
+
organizer: {
|
|
18
|
+
type: mongoose_1.SchemaTypes.Mixed,
|
|
19
|
+
required: true
|
|
20
|
+
},
|
|
14
21
|
_id: String,
|
|
15
22
|
typeOf: {
|
|
16
23
|
type: String,
|
|
@@ -78,6 +85,12 @@ schema.index({ updatedAt: 1 }, { name: 'searchByUpdatedAt' });
|
|
|
78
85
|
schema.index({ 'project.id': 1, startDate: 1 }, {
|
|
79
86
|
name: 'searchByProjectId-v20220721'
|
|
80
87
|
});
|
|
88
|
+
schema.index({ 'organizer.id': 1, startDate: 1 }, {
|
|
89
|
+
name: 'searchByOrganizerId',
|
|
90
|
+
partialFilterExpression: {
|
|
91
|
+
'organizer.id': { $exists: true }
|
|
92
|
+
}
|
|
93
|
+
});
|
|
81
94
|
schema.index({ typeOf: 1, startDate: 1 }, { name: 'searchByTypeOf' });
|
|
82
95
|
schema.index({ eventStatus: 1, startDate: 1 }, { name: 'searchByEventStatus' });
|
|
83
96
|
schema.index({ name: 1, startDate: 1 }, { name: 'searchByName' });
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
import { Schema } from 'mongoose';
|
|
26
26
|
declare const modelName = "Member";
|
|
27
27
|
/**
|
|
28
|
-
*
|
|
28
|
+
* IAMメンバースキーマ
|
|
29
29
|
*/
|
|
30
30
|
declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, any, any>, {}, {}, {}, {}, {
|
|
31
31
|
collection: string;
|
|
@@ -53,16 +53,16 @@ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, a
|
|
|
53
53
|
};
|
|
54
54
|
}, {
|
|
55
55
|
typeOf: string;
|
|
56
|
-
project
|
|
57
|
-
member
|
|
56
|
+
project: any;
|
|
57
|
+
member: any;
|
|
58
58
|
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
59
59
|
typeOf: string;
|
|
60
|
-
project
|
|
61
|
-
member
|
|
60
|
+
project: any;
|
|
61
|
+
member: any;
|
|
62
62
|
}>> & Omit<import("mongoose").FlatRecord<{
|
|
63
63
|
typeOf: string;
|
|
64
|
-
project
|
|
65
|
-
member
|
|
64
|
+
project: any;
|
|
65
|
+
member: any;
|
|
66
66
|
}> & {
|
|
67
67
|
_id: import("mongoose").Types.ObjectId;
|
|
68
68
|
}, never>>;
|
|
@@ -6,15 +6,21 @@ const writeConcern_1 = require("../writeConcern");
|
|
|
6
6
|
const modelName = 'Member';
|
|
7
7
|
exports.modelName = modelName;
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
9
|
+
* IAMメンバースキーマ
|
|
10
10
|
*/
|
|
11
11
|
const schema = new mongoose_1.Schema({
|
|
12
|
-
project:
|
|
12
|
+
project: {
|
|
13
|
+
type: mongoose_1.SchemaTypes.Mixed,
|
|
14
|
+
required: true
|
|
15
|
+
},
|
|
13
16
|
typeOf: {
|
|
14
17
|
type: String,
|
|
15
18
|
required: true
|
|
16
19
|
},
|
|
17
|
-
member:
|
|
20
|
+
member: {
|
|
21
|
+
type: mongoose_1.SchemaTypes.Mixed,
|
|
22
|
+
required: true
|
|
23
|
+
}
|
|
18
24
|
}, {
|
|
19
25
|
collection: 'members',
|
|
20
26
|
id: true,
|
|
@@ -43,9 +49,7 @@ const schema = new mongoose_1.Schema({
|
|
|
43
49
|
exports.schema = schema;
|
|
44
50
|
schema.index({ createdAt: 1 }, { name: 'searchByCreatedAt' });
|
|
45
51
|
schema.index({ updatedAt: 1 }, { name: 'searchByUpdatedAt' });
|
|
46
|
-
schema.index({ 'member.id': 1 }, {
|
|
47
|
-
name: 'searchByMemberId'
|
|
48
|
-
});
|
|
52
|
+
schema.index({ 'member.id': 1 }, { name: 'searchByMemberId' });
|
|
49
53
|
schema.index({ 'project.id': 1, 'member.id': 1 }, {
|
|
50
54
|
name: 'uniqueProjectMember',
|
|
51
55
|
unique: true
|
|
@@ -62,3 +66,5 @@ schema.index({ 'member.hasRole.roleName': 1, 'member.id': 1 }, {
|
|
|
62
66
|
'member.hasRole.roleName': { $exists: true }
|
|
63
67
|
}
|
|
64
68
|
});
|
|
69
|
+
schema.index({ 'member.memberOf.typeOf': 1, 'member.id': 1 }, { name: 'searchByMemberMemberOfTypeOf' });
|
|
70
|
+
schema.index({ 'member.memberOf.id': 1, 'member.id': 1 }, { name: 'searchByMemberMemberOfId' });
|
|
@@ -53,13 +53,14 @@ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, a
|
|
|
53
53
|
};
|
|
54
54
|
}, {
|
|
55
55
|
typeOf: string;
|
|
56
|
+
project: any;
|
|
56
57
|
additionalProperty: any[];
|
|
58
|
+
parentOrganization: any;
|
|
57
59
|
containsPlace: any[];
|
|
58
60
|
hasEntranceGate: any[];
|
|
59
61
|
hasPOS: any[];
|
|
60
62
|
name?: any;
|
|
61
63
|
url?: string | undefined;
|
|
62
|
-
project?: any;
|
|
63
64
|
alternateName?: any;
|
|
64
65
|
description?: any;
|
|
65
66
|
offers?: any;
|
|
@@ -72,18 +73,18 @@ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, a
|
|
|
72
73
|
openingHoursSpecification?: any;
|
|
73
74
|
smokingAllowed?: boolean | undefined;
|
|
74
75
|
sameAs?: string | undefined;
|
|
75
|
-
parentOrganization?: any;
|
|
76
76
|
openSeatingAllowed?: any;
|
|
77
77
|
amenityFeature?: any;
|
|
78
78
|
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
79
79
|
typeOf: string;
|
|
80
|
+
project: any;
|
|
80
81
|
additionalProperty: any[];
|
|
82
|
+
parentOrganization: any;
|
|
81
83
|
containsPlace: any[];
|
|
82
84
|
hasEntranceGate: any[];
|
|
83
85
|
hasPOS: any[];
|
|
84
86
|
name?: any;
|
|
85
87
|
url?: string | undefined;
|
|
86
|
-
project?: any;
|
|
87
88
|
alternateName?: any;
|
|
88
89
|
description?: any;
|
|
89
90
|
offers?: any;
|
|
@@ -96,18 +97,18 @@ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, a
|
|
|
96
97
|
openingHoursSpecification?: any;
|
|
97
98
|
smokingAllowed?: boolean | undefined;
|
|
98
99
|
sameAs?: string | undefined;
|
|
99
|
-
parentOrganization?: any;
|
|
100
100
|
openSeatingAllowed?: any;
|
|
101
101
|
amenityFeature?: any;
|
|
102
102
|
}>> & Omit<import("mongoose").FlatRecord<{
|
|
103
103
|
typeOf: string;
|
|
104
|
+
project: any;
|
|
104
105
|
additionalProperty: any[];
|
|
106
|
+
parentOrganization: any;
|
|
105
107
|
containsPlace: any[];
|
|
106
108
|
hasEntranceGate: any[];
|
|
107
109
|
hasPOS: any[];
|
|
108
110
|
name?: any;
|
|
109
111
|
url?: string | undefined;
|
|
110
|
-
project?: any;
|
|
111
112
|
alternateName?: any;
|
|
112
113
|
description?: any;
|
|
113
114
|
offers?: any;
|
|
@@ -120,7 +121,6 @@ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, a
|
|
|
120
121
|
openingHoursSpecification?: any;
|
|
121
122
|
smokingAllowed?: boolean | undefined;
|
|
122
123
|
sameAs?: string | undefined;
|
|
123
|
-
parentOrganization?: any;
|
|
124
124
|
openSeatingAllowed?: any;
|
|
125
125
|
amenityFeature?: any;
|
|
126
126
|
}> & {
|
|
@@ -9,7 +9,15 @@ exports.modelName = modelName;
|
|
|
9
9
|
* 場所スキーマ
|
|
10
10
|
*/
|
|
11
11
|
const schema = new mongoose_1.Schema({
|
|
12
|
-
project:
|
|
12
|
+
project: {
|
|
13
|
+
type: mongoose_1.SchemaTypes.Mixed,
|
|
14
|
+
required: true
|
|
15
|
+
},
|
|
16
|
+
// 必須化(2023-07-14~)
|
|
17
|
+
parentOrganization: {
|
|
18
|
+
type: mongoose_1.SchemaTypes.Mixed,
|
|
19
|
+
required: true
|
|
20
|
+
},
|
|
13
21
|
typeOf: {
|
|
14
22
|
type: String,
|
|
15
23
|
required: true
|
|
@@ -32,7 +40,6 @@ const schema = new mongoose_1.Schema({
|
|
|
32
40
|
kanaName: String,
|
|
33
41
|
offers: mongoose_1.SchemaTypes.Mixed,
|
|
34
42
|
additionalProperty: [mongoose_1.SchemaTypes.Mixed],
|
|
35
|
-
parentOrganization: mongoose_1.SchemaTypes.Mixed,
|
|
36
43
|
// ↓ルームの施設からの分離に伴い属性追加(2023-06-22~)
|
|
37
44
|
openSeatingAllowed: mongoose_1.SchemaTypes.Mixed,
|
|
38
45
|
amenityFeature: mongoose_1.SchemaTypes.Mixed
|
|
@@ -54,9 +54,9 @@ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, a
|
|
|
54
54
|
}, {
|
|
55
55
|
typeOf: string;
|
|
56
56
|
additionalProperty: any[];
|
|
57
|
+
provider: any[];
|
|
57
58
|
offers: any[];
|
|
58
59
|
productID: string;
|
|
59
|
-
provider: any[];
|
|
60
60
|
name?: any;
|
|
61
61
|
project?: any;
|
|
62
62
|
description?: any;
|
|
@@ -67,9 +67,9 @@ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, a
|
|
|
67
67
|
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
68
68
|
typeOf: string;
|
|
69
69
|
additionalProperty: any[];
|
|
70
|
+
provider: any[];
|
|
70
71
|
offers: any[];
|
|
71
72
|
productID: string;
|
|
72
|
-
provider: any[];
|
|
73
73
|
name?: any;
|
|
74
74
|
project?: any;
|
|
75
75
|
description?: any;
|
|
@@ -80,9 +80,9 @@ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, a
|
|
|
80
80
|
}>> & Omit<import("mongoose").FlatRecord<{
|
|
81
81
|
typeOf: string;
|
|
82
82
|
additionalProperty: any[];
|
|
83
|
+
provider: any[];
|
|
83
84
|
offers: any[];
|
|
84
85
|
productID: string;
|
|
85
|
-
provider: any[];
|
|
86
86
|
name?: any;
|
|
87
87
|
project?: any;
|
|
88
88
|
description?: any;
|
|
@@ -53,12 +53,13 @@ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, a
|
|
|
53
53
|
};
|
|
54
54
|
}, {
|
|
55
55
|
typeOf: string;
|
|
56
|
+
project: any;
|
|
56
57
|
reservationNumber: string;
|
|
58
|
+
provider: any;
|
|
57
59
|
reservationStatus: string;
|
|
58
60
|
checkedIn: boolean;
|
|
59
61
|
attended: boolean;
|
|
60
62
|
_id?: string | undefined;
|
|
61
|
-
project?: any;
|
|
62
63
|
broker?: any;
|
|
63
64
|
price?: any;
|
|
64
65
|
priceCurrency?: string | undefined;
|
|
@@ -81,12 +82,13 @@ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, a
|
|
|
81
82
|
previousReservationStatus?: string | undefined;
|
|
82
83
|
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
83
84
|
typeOf: string;
|
|
85
|
+
project: any;
|
|
84
86
|
reservationNumber: string;
|
|
87
|
+
provider: any;
|
|
85
88
|
reservationStatus: string;
|
|
86
89
|
checkedIn: boolean;
|
|
87
90
|
attended: boolean;
|
|
88
91
|
_id?: string | undefined;
|
|
89
|
-
project?: any;
|
|
90
92
|
broker?: any;
|
|
91
93
|
price?: any;
|
|
92
94
|
priceCurrency?: string | undefined;
|
|
@@ -109,12 +111,13 @@ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, a
|
|
|
109
111
|
previousReservationStatus?: string | undefined;
|
|
110
112
|
}>> & Omit<import("mongoose").FlatRecord<{
|
|
111
113
|
typeOf: string;
|
|
114
|
+
project: any;
|
|
112
115
|
reservationNumber: string;
|
|
116
|
+
provider: any;
|
|
113
117
|
reservationStatus: string;
|
|
114
118
|
checkedIn: boolean;
|
|
115
119
|
attended: boolean;
|
|
116
120
|
_id?: string | undefined;
|
|
117
|
-
project?: any;
|
|
118
121
|
broker?: any;
|
|
119
122
|
price?: any;
|
|
120
123
|
priceCurrency?: string | undefined;
|
|
@@ -9,7 +9,14 @@ exports.modelName = modelName;
|
|
|
9
9
|
* 予約スキーマ
|
|
10
10
|
*/
|
|
11
11
|
const schema = new mongoose_1.Schema({
|
|
12
|
-
project:
|
|
12
|
+
project: {
|
|
13
|
+
type: mongoose_1.SchemaTypes.Mixed,
|
|
14
|
+
required: true
|
|
15
|
+
},
|
|
16
|
+
provider: {
|
|
17
|
+
type: mongoose_1.SchemaTypes.Mixed,
|
|
18
|
+
required: true
|
|
19
|
+
},
|
|
13
20
|
_id: String,
|
|
14
21
|
typeOf: {
|
|
15
22
|
type: String,
|
|
@@ -74,9 +81,8 @@ exports.schema = schema;
|
|
|
74
81
|
schema.index({ createdAt: 1 }, { name: 'searchByCreatedAt' });
|
|
75
82
|
schema.index({ updatedAt: 1 }, { name: 'searchByUpdatedAt' });
|
|
76
83
|
schema.index({ bookingTime: -1 }, { name: 'searchByBookingTime-v3' });
|
|
77
|
-
schema.index({ 'project.id': 1, bookingTime: -1 }, {
|
|
78
|
-
|
|
79
|
-
});
|
|
84
|
+
schema.index({ 'project.id': 1, bookingTime: -1 }, { name: 'searchByProjectId-v20220721' });
|
|
85
|
+
schema.index({ 'provider.id': 1, bookingTime: -1 }, { name: 'searchByProviderId' });
|
|
80
86
|
schema.index({ typeOf: 1, bookingTime: -1 }, { name: 'searchByTypeOf-v3' });
|
|
81
87
|
schema.index({ reservationNumber: 1, bookingTime: -1 }, { name: 'searchByReservationNumber-v3' });
|
|
82
88
|
schema.index({ reservationStatus: 1, bookingTime: -1 }, { name: 'searchByReservationStatus-v3' });
|