UNPKG

@chevre/domain

Version:

Chevre Domain Library for Node.js

33 lines (32 loc) 1.08 kB
import { IndexDefinition, IndexOptions, Model, Schema, SchemaDefinition } from 'mongoose'; import * as factory from '../../../factory'; export interface IProductModel { id?: string; project: { id: string; typeOf: factory.organizationType.Project; }; typeOf: 'ProductModel'; category: Pick<factory.categoryCode.ICategoryCode, 'codeValue' | 'inCodeSet'> & { /** * 区分ID * 削除時同期に必要 */ id: string; }; name: factory.multilingualString; offers: { typeOf: factory.offerType.Offer; eligibleCustomerType?: { codeValue: string; }[]; }[]; } type IDocType = IProductModel; type IModel = Model<IDocType>; type ISchemaDefinition = SchemaDefinition<IDocType>; type ISchema = Schema<IDocType, IModel, {}, {}, {}, {}, ISchemaDefinition, IDocType>; declare const modelName = "ProductModel"; declare const indexes: [d: IndexDefinition, o: IndexOptions][]; declare function createSchema(): ISchema; export { createSchema, IModel, indexes, modelName };