UNPKG

@chevre/domain

Version:

Chevre Domain Library for Node.js

25 lines (24 loc) 901 B
import { IndexDefinition, IndexOptions, Model, Schema, SchemaDefinition } from 'mongoose'; import * as factory from '../../../factory'; interface IAggregateReservation { project: { id: string; typeOf: factory.organizationType.Project; }; typeOf: 'AggregateReservation'; reservationCount: number; reservationFor: { id: string; startDate: Date; }; reservationIds: string[]; expires: Date; } type IDocType = IAggregateReservation; type IModel = Model<IDocType>; type ISchemaDefinition = SchemaDefinition<IDocType>; type ISchema = Schema<IDocType, IModel, {}, {}, {}, {}, ISchemaDefinition, IDocType>; declare const modelName = "PendingReservationAggregate"; declare const indexes: [d: IndexDefinition, o: IndexOptions][]; declare function createSchema(): ISchema; export { createSchema, IModel, IAggregateReservation, indexes, modelName };