@chevre/domain 21.2.0-alpha.132 → 21.2.0-alpha.133
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.
|
@@ -73,6 +73,8 @@ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, a
|
|
|
73
73
|
smokingAllowed?: boolean | undefined;
|
|
74
74
|
sameAs?: string | undefined;
|
|
75
75
|
parentOrganization?: any;
|
|
76
|
+
openSeatingAllowed?: any;
|
|
77
|
+
amenityFeature?: any;
|
|
76
78
|
}, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<{
|
|
77
79
|
typeOf: string;
|
|
78
80
|
additionalProperty: any[];
|
|
@@ -95,6 +97,8 @@ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, a
|
|
|
95
97
|
smokingAllowed?: boolean | undefined;
|
|
96
98
|
sameAs?: string | undefined;
|
|
97
99
|
parentOrganization?: any;
|
|
100
|
+
openSeatingAllowed?: any;
|
|
101
|
+
amenityFeature?: any;
|
|
98
102
|
}>> & Omit<import("mongoose").FlatRecord<{
|
|
99
103
|
typeOf: string;
|
|
100
104
|
additionalProperty: any[];
|
|
@@ -117,6 +121,8 @@ declare const schema: Schema<any, import("mongoose").Model<any, any, any, any, a
|
|
|
117
121
|
smokingAllowed?: boolean | undefined;
|
|
118
122
|
sameAs?: string | undefined;
|
|
119
123
|
parentOrganization?: any;
|
|
124
|
+
openSeatingAllowed?: any;
|
|
125
|
+
amenityFeature?: any;
|
|
120
126
|
}> & {
|
|
121
127
|
_id: import("mongoose").Types.ObjectId;
|
|
122
128
|
}, never>>;
|
|
@@ -32,7 +32,10 @@ const schema = new mongoose_1.Schema({
|
|
|
32
32
|
kanaName: String,
|
|
33
33
|
offers: mongoose_1.SchemaTypes.Mixed,
|
|
34
34
|
additionalProperty: [mongoose_1.SchemaTypes.Mixed],
|
|
35
|
-
parentOrganization: mongoose_1.SchemaTypes.Mixed
|
|
35
|
+
parentOrganization: mongoose_1.SchemaTypes.Mixed,
|
|
36
|
+
// ↓ルームの施設からの分離に伴い属性追加(2023-06-22~)
|
|
37
|
+
openSeatingAllowed: mongoose_1.SchemaTypes.Mixed,
|
|
38
|
+
amenityFeature: mongoose_1.SchemaTypes.Mixed
|
|
36
39
|
}, {
|
|
37
40
|
collection: 'places',
|
|
38
41
|
id: true,
|
|
@@ -132,3 +135,15 @@ schema.index({ 'containsPlace.containsPlace.containsPlace.additionalProperty': 1
|
|
|
132
135
|
'containsPlace.containsPlace.containsPlace.additionalProperty': { $exists: true }
|
|
133
136
|
}
|
|
134
137
|
});
|
|
138
|
+
schema.index({ 'containedInPlace.id': 1, branchCode: 1 }, {
|
|
139
|
+
name: 'searchByContainedInPlaceId',
|
|
140
|
+
partialFilterExpression: {
|
|
141
|
+
'containedInPlace.id': { $exists: true }
|
|
142
|
+
}
|
|
143
|
+
});
|
|
144
|
+
schema.index({ 'containedInPlace.branchCode': 1, branchCode: 1 }, {
|
|
145
|
+
name: 'searchByContainedInPlaceBranchCode',
|
|
146
|
+
partialFilterExpression: {
|
|
147
|
+
'containedInPlace.branchCode': { $exists: true }
|
|
148
|
+
}
|
|
149
|
+
});
|
|
@@ -56,16 +56,25 @@ function findEntranceGates(params) {
|
|
|
56
56
|
return (repos) => __awaiter(this, void 0, void 0, function* () {
|
|
57
57
|
let movieTheater;
|
|
58
58
|
try {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
59
|
+
const searchMovieTheatersResult = yield repos.place.searchMovieTheaters({
|
|
60
|
+
limit: 1,
|
|
61
|
+
page: 1,
|
|
62
|
+
id: { $eq: params.event.superEvent.location.id },
|
|
63
|
+
$projection: {
|
|
64
|
+
containsPlace: 0,
|
|
65
|
+
hasPOS: 0,
|
|
66
|
+
offers: 0,
|
|
67
|
+
parentOrganization: 0,
|
|
68
|
+
name: 0
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
movieTheater = searchMovieTheatersResult.shift();
|
|
72
|
+
// movieTheater = await repos.place.findById(
|
|
73
|
+
// { id: params.event.superEvent.location.id },
|
|
74
|
+
// // 不要な属性を取得しない
|
|
75
|
+
// ['hasEntranceGate'],
|
|
76
|
+
// []
|
|
77
|
+
// );
|
|
69
78
|
}
|
|
70
79
|
catch (error) {
|
|
71
80
|
let throwsError = true;
|
|
@@ -66,6 +66,13 @@ function onResourceUpdated(params) {
|
|
|
66
66
|
ids: params.id,
|
|
67
67
|
typeOf: params.typeOf
|
|
68
68
|
})(repos);
|
|
69
|
+
// tslint:disable-next-line:no-suspicious-comment
|
|
70
|
+
// TODO ルーム同期タスクを作成
|
|
71
|
+
yield syncScreeningRooms({
|
|
72
|
+
project: { id: params.project.id },
|
|
73
|
+
ids: params.id,
|
|
74
|
+
typeOf: params.typeOf
|
|
75
|
+
})(repos);
|
|
69
76
|
break;
|
|
70
77
|
case 'AccountTitle':
|
|
71
78
|
yield createInformAccountTitleTasks({
|
|
@@ -235,17 +242,29 @@ function createInformMovieTheaterTasks(params) {
|
|
|
235
242
|
'project',
|
|
236
243
|
'telephone',
|
|
237
244
|
'url',
|
|
238
|
-
'typeOf'
|
|
239
|
-
'containsPlace.branchCode',
|
|
240
|
-
'containsPlace.name',
|
|
241
|
-
'containsPlace.typeOf',
|
|
242
|
-
'containsPlace.additionalProperty',
|
|
243
|
-
'containsPlace.address'
|
|
245
|
+
'typeOf'
|
|
246
|
+
// 'containsPlace.branchCode',
|
|
247
|
+
// 'containsPlace.name',
|
|
248
|
+
// 'containsPlace.typeOf',
|
|
249
|
+
// 'containsPlace.additionalProperty',
|
|
250
|
+
// 'containsPlace.address'
|
|
244
251
|
], []);
|
|
245
252
|
if (movieTheater.project.id !== params.project.id) {
|
|
246
253
|
throw new factory.errors.Argument('project.id', 'project.id not matched');
|
|
247
254
|
}
|
|
248
|
-
|
|
255
|
+
// ルームを検索
|
|
256
|
+
const screeningRooms = yield repos.place.searchScreeningRooms({
|
|
257
|
+
containedInPlace: { id: { $eq: movieTheater.id } }
|
|
258
|
+
});
|
|
259
|
+
const movieTheaters4inform = [Object.assign(Object.assign({}, movieTheater), { containsPlace: screeningRooms.map((room) => {
|
|
260
|
+
return {
|
|
261
|
+
branchCode: room.branchCode,
|
|
262
|
+
name: room.name,
|
|
263
|
+
typeOf: room.typeOf,
|
|
264
|
+
additionalProperty: room.additionalProperty,
|
|
265
|
+
address: room.address
|
|
266
|
+
};
|
|
267
|
+
}) })];
|
|
249
268
|
if (movieTheaters4inform.length > 0) {
|
|
250
269
|
const taskRunsAt = new Date();
|
|
251
270
|
const informTasks = [];
|
|
@@ -350,3 +369,35 @@ function createInformAccountTitleTasks(params) {
|
|
|
350
369
|
}
|
|
351
370
|
});
|
|
352
371
|
}
|
|
372
|
+
function syncScreeningRooms(__) {
|
|
373
|
+
return (__2) => __awaiter(this, void 0, void 0, function* () {
|
|
374
|
+
// if (params.ids.length !== 1) {
|
|
375
|
+
// throw new factory.errors.Argument('id', 'id.length must be 1');
|
|
376
|
+
// }
|
|
377
|
+
// const movieTheater = await repos.place.findById(
|
|
378
|
+
// { id: params.ids[0] },
|
|
379
|
+
// [
|
|
380
|
+
// 'additionalProperty',
|
|
381
|
+
// 'branchCode',
|
|
382
|
+
// 'hasEntranceGate',
|
|
383
|
+
// 'hasPOS',
|
|
384
|
+
// 'kanaName',
|
|
385
|
+
// 'name',
|
|
386
|
+
// 'parentOrganization',
|
|
387
|
+
// 'project',
|
|
388
|
+
// 'telephone',
|
|
389
|
+
// 'url',
|
|
390
|
+
// 'typeOf',
|
|
391
|
+
// 'containsPlace.branchCode',
|
|
392
|
+
// 'containsPlace.name',
|
|
393
|
+
// 'containsPlace.typeOf',
|
|
394
|
+
// 'containsPlace.additionalProperty',
|
|
395
|
+
// 'containsPlace.address'
|
|
396
|
+
// ],
|
|
397
|
+
// []
|
|
398
|
+
// );
|
|
399
|
+
// if (movieTheater.project.id !== params.project.id) {
|
|
400
|
+
// throw new factory.errors.Argument('project.id', 'project.id not matched');
|
|
401
|
+
// }
|
|
402
|
+
});
|
|
403
|
+
}
|
package/package.json
CHANGED