Skip to content

Commit

Permalink
イベントの予約集計IFを最適化
Browse files Browse the repository at this point in the history
  • Loading branch information
ilovegadd committed Mar 26, 2024
1 parent a8c02b4 commit 987f234
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 15 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -14,6 +14,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/).

- 経理レポートの返金アクションをFailedActionStatusに対応
- 決済承認アクションのobjectを最適化
- イベントの予約集計IFを最適化

### Deprecated

Expand Down
34 changes: 19 additions & 15 deletions src/event/anyEvent.ts
Expand Up @@ -9,7 +9,7 @@ import { IServiceType as IProductServiceType, ProductType } from '../product';
import * as ReservationFactory from '../reservation';
import { ReservationType } from '../reservationType';
import * as WebAPIFactory from '../service/webAPI';
import { IThing } from '../thing';
// import { IThing } from '../thing';
import { ITripWithDetails as IBusTrip } from '../trip/busTrip';

/**
Expand All @@ -26,11 +26,12 @@ export interface IAggregateReservation {
/**
* 予約集計つきオファー
*/
export interface IOfferWithAggregateReservation extends Pick<IThing, 'name'> {
// export interface IOfferWithAggregateReservation extends Pick<IThing, 'name'> {
export interface IOfferWithAggregateReservation {
typeOf: OfferType.Offer;
id?: string;
identifier?: string;
aggregateReservation?: IAggregateReservation;
id: string;
identifier: string;
aggregateReservation?: Pick<IAggregateReservation, 'typeOf' | 'attendeeCount' | 'checkInCount' | 'reservationCount'>;
category?: OfferFactory.ICategory;
maximumAttendeeCapacity?: number;
remainingAttendeeCapacity?: number;
Expand All @@ -40,28 +41,31 @@ export interface IOfferWithAggregateReservation extends Pick<IThing, 'name'> {
*/
export interface IAggregateOffer {
typeOf: OfferType.AggregateOffer;
aggregateDate: Date;
offerCount?: number;
offers?: IOfferWithAggregateReservation[];
}
export interface IAggregateOfferOfPlace {
typeOf: OfferType.AggregateOffer;
offers?: {
typeOf: OfferType.Offer;
id: string;
identifier?: string;
category?: OfferFactory.ICategory;
aggregateReservation?: Pick<IAggregateReservation, 'typeOf' | 'useActionCount'>;
}[];
}
export interface IPlaceWithAggregateOffer {
typeOf: PlaceType;
identifier?: string;
aggregateOffer?: {
typeOf: OfferType.AggregateOffer;
offers?: {
typeOf: OfferType.Offer;
id?: string;
identifier?: string;
category?: OfferFactory.ICategory;
aggregateReservation?: IAggregateReservation;
}[];
};
aggregateOffer?: IAggregateOfferOfPlace;
}
/**
* 入場ゲート集計
*/
export interface IAggregateEntranceGate {
typeOf: PlaceType.AggregatePlace;
aggregateDate: Date;
places: IPlaceWithAggregateOffer[];
}
/**
Expand Down
1 change: 1 addition & 0 deletions src/event/screeningEvent.ts
Expand Up @@ -14,6 +14,7 @@ import * as AnyEventFactory from './anyEvent';
export import IAggregateReservation = AnyEventFactory.IAggregateReservation;
export import IOfferWithAggregateReservation = AnyEventFactory.IOfferWithAggregateReservation;
export import IAggregateOffer = AnyEventFactory.IAggregateOffer;
export import IAggregateOfferOfPlace = AnyEventFactory.IAggregateOfferOfPlace;
export import IPlaceWithAggregateOffer = AnyEventFactory.IPlaceWithAggregateOffer;
export import IAggregateEntranceGate = AnyEventFactory.IAggregateEntranceGate;
export interface IServiceOutput {
Expand Down

0 comments on commit 987f234

Please sign in to comment.