@chevre/domain
Version:
Chevre Domain Library for Node.js
15 lines (14 loc) • 715 B
TypeScript
import { IndexDefinition, IndexOptions, Model, Schema, SchemaDefinition } from 'mongoose';
import * as factory from '../../../factory';
export type IDocTypeAsProduct = Omit<factory.product.IProduct, 'id'>;
export interface IDocTypeAsProductOffer {
offers?: factory.product.IOffer[];
}
type IDocType = IDocTypeAsProduct & IDocTypeAsProductOffer;
type IModel = Model<IDocType>;
type ISchemaDefinition = SchemaDefinition<IDocType>;
type ISchema = Schema<IDocType, IModel, {}, {}, {}, {}, ISchemaDefinition, IDocType>;
declare const modelName = "Product";
declare const indexes: [d: IndexDefinition, o: IndexOptions][];
declare function createSchema(): ISchema;
export { createSchema, IModel, indexes, modelName };