@chevre/domain 21.2.0-alpha.138 → 21.2.0-alpha.139
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/place.d.ts +68 -8
- package/lib/chevre/repo/place.js +35 -14
- package/package.json +1 -1
|
@@ -42,7 +42,7 @@ export declare class MongoRepository {
|
|
|
42
42
|
/**
|
|
43
43
|
* 施設検索
|
|
44
44
|
*/
|
|
45
|
-
searchMovieTheaters(params: factory.place.movieTheater.ISearchConditions & {}, inclusion: string[], exclusion: string[]): Promise<factory.place.movieTheater.
|
|
45
|
+
searchMovieTheaters(params: factory.place.movieTheater.ISearchConditions & {}, inclusion: string[], exclusion: string[]): Promise<factory.place.movieTheater.IPlaceWithoutScreeningRoom[]>;
|
|
46
46
|
/**
|
|
47
47
|
* 施設取得
|
|
48
48
|
* 廃止(2023-06-22~)
|
|
@@ -55,12 +55,18 @@ export declare class MongoRepository {
|
|
|
55
55
|
* 施設ID
|
|
56
56
|
*/
|
|
57
57
|
id: string;
|
|
58
|
+
typeOf: factory.placeType.MovieTheater;
|
|
58
59
|
}>;
|
|
59
|
-
updateScreeningRoom(screeningRoom: Omit<factory.place.screeningRoom.IPlace, 'containsPlace'
|
|
60
|
+
updateScreeningRoom(screeningRoom: Omit<factory.place.screeningRoom.IPlace, 'containedInPlace' | 'containsPlace'> & {
|
|
61
|
+
containedInPlace: {
|
|
62
|
+
branchCode: string;
|
|
63
|
+
};
|
|
64
|
+
}, $unset: any): Promise<{
|
|
60
65
|
/**
|
|
61
66
|
* 施設ID
|
|
62
67
|
*/
|
|
63
68
|
id: string;
|
|
69
|
+
typeOf: factory.placeType.MovieTheater;
|
|
64
70
|
}>;
|
|
65
71
|
deleteScreeningRoom(screeningRoom: {
|
|
66
72
|
project: {
|
|
@@ -81,9 +87,29 @@ export declare class MongoRepository {
|
|
|
81
87
|
* 施設ID
|
|
82
88
|
*/
|
|
83
89
|
id: string;
|
|
90
|
+
typeOf: factory.placeType.MovieTheater;
|
|
91
|
+
}>;
|
|
92
|
+
createScreeningRoomSection(screeningRoomSection: IScreeningRoomSectionWithoutContainsPlace): Promise<{
|
|
93
|
+
/**
|
|
94
|
+
* 施設ID
|
|
95
|
+
*/
|
|
96
|
+
id: string;
|
|
97
|
+
typeOf: factory.placeType.MovieTheater;
|
|
98
|
+
}>;
|
|
99
|
+
updateScreeningRoomSection(screeningRoomSection: Omit<factory.place.screeningRoomSection.IPlace, 'containedInPlace'> & {
|
|
100
|
+
containedInPlace: {
|
|
101
|
+
branchCode: string;
|
|
102
|
+
containedInPlace: {
|
|
103
|
+
branchCode: string;
|
|
104
|
+
};
|
|
105
|
+
};
|
|
106
|
+
}, $unset: any): Promise<{
|
|
107
|
+
/**
|
|
108
|
+
* 施設ID
|
|
109
|
+
*/
|
|
110
|
+
id: string;
|
|
111
|
+
typeOf: factory.placeType.MovieTheater;
|
|
84
112
|
}>;
|
|
85
|
-
createScreeningRoomSection(screeningRoomSection: IScreeningRoomSectionWithoutContainsPlace): Promise<void>;
|
|
86
|
-
updateScreeningRoomSection(screeningRoomSection: factory.place.screeningRoomSection.IPlace, $unset: any): Promise<void>;
|
|
87
113
|
searchScreeningRoomSections(searchConditions: factory.place.screeningRoomSection.ISearchConditions & {
|
|
88
114
|
$projection?: {
|
|
89
115
|
[key: string]: number;
|
|
@@ -109,7 +135,13 @@ export declare class MongoRepository {
|
|
|
109
135
|
branchCode: string;
|
|
110
136
|
};
|
|
111
137
|
};
|
|
112
|
-
}): Promise<
|
|
138
|
+
}): Promise<{
|
|
139
|
+
/**
|
|
140
|
+
* 施設ID
|
|
141
|
+
*/
|
|
142
|
+
id: string;
|
|
143
|
+
typeOf: factory.placeType.MovieTheater;
|
|
144
|
+
}>;
|
|
113
145
|
searchScreeningRooms(searchConditions: factory.place.screeningRoom.ISearchConditions): Promise<Omit<factory.place.screeningRoom.IPlace, 'containsPlace'>[]>;
|
|
114
146
|
findScreeningRoomsByBranchCode(params: {
|
|
115
147
|
branchCode: {
|
|
@@ -121,8 +153,30 @@ export declare class MongoRepository {
|
|
|
121
153
|
};
|
|
122
154
|
};
|
|
123
155
|
}): Promise<IScreeningRoomFoundByBranchCode>;
|
|
124
|
-
createSeat(seat: factory.place.seat.IPlace): Promise<
|
|
125
|
-
|
|
156
|
+
createSeat(seat: factory.place.seat.IPlace): Promise<{
|
|
157
|
+
/**
|
|
158
|
+
* 施設ID
|
|
159
|
+
*/
|
|
160
|
+
id: string;
|
|
161
|
+
typeOf: factory.placeType.MovieTheater;
|
|
162
|
+
}>;
|
|
163
|
+
updateSeat(seat: Omit<factory.place.seat.IPlace, 'containedInPlace'> & {
|
|
164
|
+
containedInPlace: {
|
|
165
|
+
branchCode: string;
|
|
166
|
+
containedInPlace: {
|
|
167
|
+
branchCode: string;
|
|
168
|
+
containedInPlace: {
|
|
169
|
+
branchCode: string;
|
|
170
|
+
};
|
|
171
|
+
};
|
|
172
|
+
};
|
|
173
|
+
}, $unset: any): Promise<{
|
|
174
|
+
/**
|
|
175
|
+
* 施設ID
|
|
176
|
+
*/
|
|
177
|
+
id: string;
|
|
178
|
+
typeOf: factory.placeType.MovieTheater;
|
|
179
|
+
}>;
|
|
126
180
|
searchSeats(params: factory.place.seat.ISearchConditions): Promise<factory.place.seat.IPlace[]>;
|
|
127
181
|
deleteSeat(seat: {
|
|
128
182
|
project: {
|
|
@@ -150,7 +204,13 @@ export declare class MongoRepository {
|
|
|
150
204
|
};
|
|
151
205
|
};
|
|
152
206
|
};
|
|
153
|
-
}): Promise<
|
|
207
|
+
}): Promise<{
|
|
208
|
+
/**
|
|
209
|
+
* 施設ID
|
|
210
|
+
*/
|
|
211
|
+
id: string;
|
|
212
|
+
typeOf: factory.placeType.MovieTheater;
|
|
213
|
+
}>;
|
|
154
214
|
deleteByProject(params: {
|
|
155
215
|
project: {
|
|
156
216
|
id: string;
|
package/lib/chevre/repo/place.js
CHANGED
|
@@ -364,7 +364,7 @@ class MongoRepository {
|
|
|
364
364
|
yield this.placeModel.findOneAndDelete({
|
|
365
365
|
typeOf: { $eq: factory.placeType.MovieTheater },
|
|
366
366
|
_id: { $eq: params.id }
|
|
367
|
-
})
|
|
367
|
+
}, { projection: { _id: 1 } })
|
|
368
368
|
.exec()
|
|
369
369
|
.then((doc) => {
|
|
370
370
|
if (doc === null) {
|
|
@@ -407,8 +407,9 @@ class MongoRepository {
|
|
|
407
407
|
new: true,
|
|
408
408
|
projection: {
|
|
409
409
|
_id: 1,
|
|
410
|
-
'project.id': 1,
|
|
411
|
-
branchCode: 1
|
|
410
|
+
// 'project.id': 1,
|
|
411
|
+
branchCode: 1,
|
|
412
|
+
typeOf: 1
|
|
412
413
|
}
|
|
413
414
|
})
|
|
414
415
|
.exec();
|
|
@@ -441,8 +442,9 @@ class MongoRepository {
|
|
|
441
442
|
],
|
|
442
443
|
projection: {
|
|
443
444
|
_id: 1,
|
|
444
|
-
'project.id': 1,
|
|
445
|
-
branchCode: 1
|
|
445
|
+
// 'project.id': 1,
|
|
446
|
+
branchCode: 1,
|
|
447
|
+
typeOf: 1
|
|
446
448
|
}
|
|
447
449
|
})
|
|
448
450
|
.exec();
|
|
@@ -465,7 +467,8 @@ class MongoRepository {
|
|
|
465
467
|
}
|
|
466
468
|
}, {
|
|
467
469
|
projection: {
|
|
468
|
-
_id: 1
|
|
470
|
+
_id: 1,
|
|
471
|
+
typeOf: 1
|
|
469
472
|
}
|
|
470
473
|
})
|
|
471
474
|
.exec();
|
|
@@ -517,7 +520,8 @@ class MongoRepository {
|
|
|
517
520
|
}
|
|
518
521
|
],
|
|
519
522
|
projection: {
|
|
520
|
-
_id: 1
|
|
523
|
+
_id: 1,
|
|
524
|
+
typeOf: 1
|
|
521
525
|
}
|
|
522
526
|
})
|
|
523
527
|
.exec();
|
|
@@ -525,6 +529,7 @@ class MongoRepository {
|
|
|
525
529
|
if (doc === null) {
|
|
526
530
|
throw new factory.errors.AlreadyInUse(factory.placeType.ScreeningRoomSection, ['branchCode']);
|
|
527
531
|
}
|
|
532
|
+
return doc.toObject();
|
|
528
533
|
});
|
|
529
534
|
}
|
|
530
535
|
updateScreeningRoomSection(screeningRoomSection, $unset) {
|
|
@@ -564,13 +569,15 @@ class MongoRepository {
|
|
|
564
569
|
{ 'screeningRoomSection.branchCode': screeningRoomSection.branchCode }
|
|
565
570
|
],
|
|
566
571
|
projection: {
|
|
567
|
-
_id: 1
|
|
572
|
+
_id: 1,
|
|
573
|
+
typeOf: 1
|
|
568
574
|
}
|
|
569
575
|
})
|
|
570
576
|
.exec();
|
|
571
577
|
if (doc === null) {
|
|
572
578
|
throw new factory.errors.NotFound(factory.placeType.ScreeningRoomSection);
|
|
573
579
|
}
|
|
580
|
+
return doc.toObject();
|
|
574
581
|
});
|
|
575
582
|
}
|
|
576
583
|
// tslint:disable-next-line:max-func-body-length
|
|
@@ -719,12 +726,17 @@ class MongoRepository {
|
|
|
719
726
|
new: true,
|
|
720
727
|
arrayFilters: [
|
|
721
728
|
{ 'screeningRoom.branchCode': screeningRoomSection.containedInPlace.branchCode }
|
|
722
|
-
]
|
|
729
|
+
],
|
|
730
|
+
projection: {
|
|
731
|
+
_id: 1,
|
|
732
|
+
typeOf: 1
|
|
733
|
+
}
|
|
723
734
|
})
|
|
724
735
|
.exec();
|
|
725
736
|
if (doc === null) {
|
|
726
737
|
throw new factory.errors.NotFound(factory.placeType.ScreeningRoomSection);
|
|
727
738
|
}
|
|
739
|
+
return doc.toObject();
|
|
728
740
|
});
|
|
729
741
|
}
|
|
730
742
|
// tslint:disable-next-line:max-func-body-length
|
|
@@ -972,8 +984,9 @@ class MongoRepository {
|
|
|
972
984
|
],
|
|
973
985
|
projection: {
|
|
974
986
|
_id: 1,
|
|
975
|
-
'project.id': 1,
|
|
976
|
-
branchCode: 1
|
|
987
|
+
// 'project.id': 1,
|
|
988
|
+
branchCode: 1,
|
|
989
|
+
typeOf: 1
|
|
977
990
|
}
|
|
978
991
|
})
|
|
979
992
|
.exec();
|
|
@@ -981,6 +994,7 @@ class MongoRepository {
|
|
|
981
994
|
if (doc === null) {
|
|
982
995
|
throw new factory.errors.AlreadyInUse(factory.placeType.Seat, ['branchCode']);
|
|
983
996
|
}
|
|
997
|
+
return doc.toObject();
|
|
984
998
|
});
|
|
985
999
|
}
|
|
986
1000
|
updateSeat(seat, $unset) {
|
|
@@ -1026,14 +1040,16 @@ class MongoRepository {
|
|
|
1026
1040
|
],
|
|
1027
1041
|
projection: {
|
|
1028
1042
|
_id: 1,
|
|
1029
|
-
'project.id': 1,
|
|
1030
|
-
branchCode: 1
|
|
1043
|
+
// 'project.id': 1,
|
|
1044
|
+
branchCode: 1,
|
|
1045
|
+
typeOf: 1
|
|
1031
1046
|
}
|
|
1032
1047
|
})
|
|
1033
1048
|
.exec();
|
|
1034
1049
|
if (doc === null) {
|
|
1035
1050
|
throw new factory.errors.NotFound(factory.placeType.Seat);
|
|
1036
1051
|
}
|
|
1052
|
+
return doc.toObject();
|
|
1037
1053
|
});
|
|
1038
1054
|
}
|
|
1039
1055
|
// tslint:disable-next-line:cyclomatic-complexity max-func-body-length
|
|
@@ -1241,12 +1257,17 @@ class MongoRepository {
|
|
|
1241
1257
|
arrayFilters: [
|
|
1242
1258
|
{ 'screeningRoom.branchCode': seat.containedInPlace.containedInPlace.branchCode },
|
|
1243
1259
|
{ 'screeningRoomSection.branchCode': seat.containedInPlace.branchCode }
|
|
1244
|
-
]
|
|
1260
|
+
],
|
|
1261
|
+
projection: {
|
|
1262
|
+
_id: 1,
|
|
1263
|
+
typeOf: 1
|
|
1264
|
+
}
|
|
1245
1265
|
})
|
|
1246
1266
|
.exec();
|
|
1247
1267
|
if (doc === null) {
|
|
1248
1268
|
throw new factory.errors.NotFound(factory.placeType.Seat);
|
|
1249
1269
|
}
|
|
1270
|
+
return doc.toObject();
|
|
1250
1271
|
});
|
|
1251
1272
|
}
|
|
1252
1273
|
deleteByProject(params) {
|
package/package.json
CHANGED