@chevre/domain 24.1.0-alpha.2 → 24.1.0-alpha.3

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.
@@ -54,5 +54,11 @@ export declare class AggregateReservationRepo {
54
54
  filter: any;
55
55
  $unset: any;
56
56
  }): Promise<import("mongoose").UpdateWriteOpResult>;
57
+ /**
58
+ * イベント開始日時が指定以前の集計を削除する
59
+ */
60
+ deleteManyByEventStartDate(params: {
61
+ reservationForStartDateLte: Date;
62
+ }): Promise<import("mongodb").DeleteResult>;
57
63
  }
58
64
  export {};
@@ -132,5 +132,14 @@ class AggregateReservationRepo {
132
132
  return this.aggregateReservationModel.updateMany(params.filter, { $unset: params.$unset }, { timestamps: false })
133
133
  .exec();
134
134
  }
135
+ /**
136
+ * イベント開始日時が指定以前の集計を削除する
137
+ */
138
+ async deleteManyByEventStartDate(params) {
139
+ return this.aggregateReservationModel.deleteMany({
140
+ 'reservationFor.startDate': { $lte: params.reservationForStartDateLte }
141
+ })
142
+ .exec();
143
+ }
135
144
  }
136
145
  exports.AggregateReservationRepo = AggregateReservationRepo;
package/package.json CHANGED
@@ -91,5 +91,5 @@
91
91
  "postversion": "git push origin --tags",
92
92
  "prepublishOnly": "npm run clean && npm run build"
93
93
  },
94
- "version": "24.1.0-alpha.2"
94
+ "version": "24.1.0-alpha.3"
95
95
  }