UNPKG

@chevre/domain

Version:

Chevre Domain Library for Node.js

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