@chevre/domain
Version:
Chevre Domain Library for Node.js
43 lines (42 loc) • 1.12 kB
TypeScript
import * as factory from '../factory';
export interface IOffer {
itemOffered?: {
serviceOutput?: {
/**
* 予約ID
*/
id?: string;
};
};
seatSection: string;
seatNumber: string;
}
export interface IAbout {
identifier: string;
typeOf: 'Thing';
}
export interface IAudience {
identifier: string;
typeOf: 'Audience';
}
export interface IConcurrentLock {
project: {
id: string;
typeOf: factory.organizationType.Project;
};
typeOf: factory.creativeWorkType.Certification;
about: IAbout;
dateCreated: Date;
expires: Date;
audience: IAudience;
}
export type ILockParams = Pick<IConcurrentLock, 'about' | 'audience' | 'expires' | 'project'>;
export type IUnlockParams = Pick<IConcurrentLock, 'about' | 'audience'>;
export type IGetHolderResult = string | null;
/**
* 抽象同時実行ロックリポジトリ
*/
export declare abstract class AbstractConcurrentLockRepo {
abstract lock(lockKey: ILockParams): Promise<void>;
abstract unlock(params: IUnlockParams): Promise<void>;
}