@chevre/domain
Version:
Chevre Domain Library for Node.js
40 lines (39 loc) • 1.23 kB
TypeScript
import { IndexDefinition, IndexOptions, Model, Schema, SchemaDefinition } from 'mongoose';
import * as factory from '../../../factory';
interface ISubReservation {
identifier: string;
}
interface IProvider {
/**
* 販売者ID
*/
id: string;
typeOf: factory.organizationType.Corporation;
}
interface IReservationPackage {
project: {
id: string;
typeOf: factory.organizationType.Project;
};
provider: IProvider;
typeOf: factory.reservationType.ReservationPackage;
bookingTime: Date;
dateCreated: Date;
dateModified?: Date;
numSeats: number;
reservationFor: {
id: string;
startDate: Date;
};
reservationNumber: string;
subReservation: ISubReservation[];
expires: Date;
}
type IDocType = IReservationPackage;
type IModel = Model<IDocType>;
type ISchemaDefinition = SchemaDefinition<IDocType>;
type ISchema = Schema<IDocType, IModel, {}, {}, {}, {}, ISchemaDefinition, IDocType>;
declare const modelName = "PendingReservation";
declare const indexes: [d: IndexDefinition, o: IndexOptions][];
declare function createSchema(): ISchema;
export { createSchema, IModel, ISubReservation, IReservationPackage, indexes, modelName };