import { Id, Shape } from '../types'; import { BaseModel } from './base'; import { Keys } from './entities'; /** * @param {BaseModel} parent The parent BaseModel * @param {string} relationKey The name of the property on the parent to refer the relation to (e.g. users.forms where forms is the relationKey) * @param {string} foreignKey The foreignKey on the relation refering to the parent. (e.g userId on a form) * @param {Keys} storeKey The store key of the relation items. */ export declare class HasMany { protected _parent: BaseModel; _foreignKey: string; _relationKey: string; _storeKey: Keys; constructor(parent: BaseModel, relationKey: string, foreignKey: string, storeKey: Keys); create(parentId: Id, item: DataType): Promise; getLocalAll(parentId: Id): Promise; getLocalById(id: Id): Promise; getAll(parentId: Id, filter?: Shape): Promise; updateAll(parentId: Id, item: Partial, where?: Shape): Promise; delAll(parentId: Id, where?: Shape): Promise; } export declare function hasMany({ relationKey, foreignKey, storeKey, }: { relationKey: string; foreignKey: string; storeKey: Keys; }): {}>(ctor: C) => { new (...args: any[]): {}; } & C;