@chevre/domain
Version:
Chevre Domain Library for Node.js
23 lines (22 loc) • 638 B
TypeScript
import * as redis from 'redis';
/**
* 集計データインターフェース
*/
export interface IAggregation {
id: string;
maximumAttendeeCapacity: number;
remainingAttendeeCapacity: number;
}
export interface IAggregations {
[key: string]: IAggregation;
}
/**
* 上映イベントに関する集計データを保管するリポジトリ
*/
export declare class RedisRepository {
static KEY_PREFIX: string;
readonly redisClient: redis.RedisClient;
constructor(redisClient: redis.RedisClient);
store(aggregations: IAggregation[], ttl: number): Promise<void>;
findAll(): Promise<IAggregations>;
}