import type { MongoModel, MongoModelConstructor } from '../model/base_model.js'; /** * Base relation class for MongoDB relationships */ export declare abstract class BaseRelation { /** * The related model */ protected relatedModel: MongoModelConstructor; /** * The owner model */ protected ownerModel: MongoModel; /** * The local key on the owner model */ protected localKey: string; /** * The foreign key on the related model */ protected foreignKey: string; /** * Whether the relation is already booted */ protected booted: boolean; constructor(relatedModel: MongoModelConstructor, ownerModel: MongoModel, foreignKey?: string, localKey?: string); /** * Boot the relation */ boot(): void; /** * Get the local key value */ getLocalKeyValue(): any; /** * Convert a value to ObjectId if needed */ protected ensureObjectId(value: any): any; /** * Execute the relation query */ abstract exec(): Promise; }