UNPKG

@chevre/domain

Version:

Chevre Domain Library for Node.js

25 lines (24 loc) 952 B
import { IndexDefinition, IndexOptions, Model, Schema, SchemaDefinition } from 'mongoose'; import * as factory from '../../../factory'; export type IOrder4report = factory.report.accountingReport.IOrderAsMainEntity; export interface IChildReport { typeOf: 'Report'; mainEntity: factory.report.accountingReport.IAction; } export interface IAccountingReport { project: { id: string; typeOf: factory.organizationType.Project; }; typeOf: 'Report'; hasPart: IChildReport[]; mainEntity: IOrder4report; } type IDocType = IAccountingReport; type IModel = Model<IDocType>; type ISchemaDefinition = SchemaDefinition<IDocType>; type ISchema = Schema<IDocType, IModel, {}, {}, {}, {}, ISchemaDefinition, IDocType>; declare const modelName = "AccountingReport"; declare const indexes: [d: IndexDefinition, o: IndexOptions][]; declare function createSchema(): ISchema; export { createSchema, IModel, indexes, modelName };