UNPKG

mongocat

Version:

✨ Mongocat 😺 is easy to use, configuration based Denormalization mongoose plugin for read heavy applications. Mongocat reduces write complexity too.

14 lines (13 loc) 412 B
import { IConsumer } from '../types'; import { Schema } from 'mongoose'; /** * It's used on sub schema on ConsumerModel * @param options = { key: '_id', toPath: 'category', // no neccessary when we need duplicate with other collection fromRef: 'Category', toRef: 'Blog', withTimestamp: true, } */ export declare const consumer: (ops: IConsumer) => (schema: Schema) => void;