/**
 * Relationship Types
 * Define how models relate to each other
 */
import type { IModel, Model, ModelStatic } from './Model';
export type RelationshipType = 'hasOne' | 'hasMany' | 'belongsTo' | 'belongsToMany' | 'morphOne' | 'morphMany' | 'morphTo' | 'hasOneThrough' | 'hasManyThrough';
export interface Relation {
    type: RelationshipType;
    related: typeof Model;
    foreignKey: string;
    localKey: string;
    throughTable?: string;
}
export interface IRelationship {
    get(instance: IModel): Promise<unknown>;
    type: RelationshipType;
    related: ModelStatic;
    foreignKey: string;
    localKey: string;
    throughTable?: string;
    relatedKey?: string;
    morphType?: string;
    morphId?: string;
    morphName?: string;
    morphMap?: Record<string, ModelStatic>;
    through?: ModelStatic;
    throughForeignKey?: string;
    throughLocalKey?: string;
    secondLocalKey?: string;
}
/**
 * HasOne Relationship
 * Sealed namespace object following Pattern 2
 *
 * @see FRAMEWORK_REFACTOR_FUNCTION_PATTERN.md for Pattern 2 details
 */
export declare const HasOne: Readonly<{
    create(relatedModel: ModelStatic, foreignKey: string, localKey: string): IRelationship;
}>;
/**
 * HasMany Relationship
 * Sealed namespace object following Pattern 2
 *
 * @see FRAMEWORK_REFACTOR_FUNCTION_PATTERN.md for Pattern 2 details
 */
export declare const HasMany: Readonly<{
    create(relatedModel: ModelStatic, foreignKey: string, localKey: string): IRelationship;
}>;
/**
 * BelongsTo Relationship
 * Sealed namespace object following Pattern 2
 *
 * @see FRAMEWORK_REFACTOR_FUNCTION_PATTERN.md for Pattern 2 details
 */
export declare const BelongsTo: Readonly<{
    create(relatedModel: ModelStatic, foreignKey: string, localKey: string): IRelationship;
}>;
/**
 * BelongsToMany Relationship
 * Sealed namespace object following Pattern 2
 *
 * @see FRAMEWORK_REFACTOR_FUNCTION_PATTERN.md for Pattern 2 details
 */
export declare const BelongsToMany: Readonly<{
    create(relatedModel: ModelStatic, throughTable: string, foreignKey: string, relatedKey: string): IRelationship;
}>;
/**
 * MorphOne Relationship
 * Polymorphic one-to-one relationship
 * Sealed namespace object following Pattern 2
 *
 * @see FRAMEWORK_REFACTOR_FUNCTION_PATTERN.md for Pattern 2 details
 */
export declare const MorphOne: Readonly<{
    create(relatedModel: ModelStatic, morphName: string, morphType?: string, morphId?: string, localKeyColumn?: string): IRelationship;
}>;
/**
 * MorphMany Relationship
 * Polymorphic one-to-many relationship
 * Sealed namespace object following Pattern 2
 *
 * @see FRAMEWORK_REFACTOR_FUNCTION_PATTERN.md for Pattern 2 details
 */
export declare const MorphMany: Readonly<{
    create(relatedModel: ModelStatic, morphName: string, morphType?: string, morphId?: string, localKeyColumn?: string): IRelationship;
}>;
/**
 * MorphTo Relationship
 * Inverse of polymorphic relationships
 * Sealed namespace object following Pattern 2
 *
 * @see FRAMEWORK_REFACTOR_FUNCTION_PATTERN.md for Pattern 2 details
 */
export declare const MorphTo: Readonly<{
    create(morphName: string, morphMap: Record<string, ModelStatic>, morphType?: string, morphId?: string): IRelationship;
}>;
/**
 * HasOneThrough Relationship
 * Access a distant relation through an intermediate model
 * Example: Country -> User -> Post (Country hasOneThrough Post through User)
 * Sealed namespace object following Pattern 2
 *
 * @see FRAMEWORK_REFACTOR_FUNCTION_PATTERN.md for Pattern 2 details
 */
export declare const HasOneThrough: Readonly<{
    create: (relatedModel: ModelStatic, through: ModelStatic, foreignKey?: string, throughForeignKey?: string, localKey?: string, secondLocalKey?: string) => IRelationship;
}>;
/**
 * HasManyThrough Relationship
 * Access distant relations through an intermediate model
 * Example: Country -> User -> Post (Country hasManyThrough Posts through Users)
 * Sealed namespace object following Pattern 2
 *
 * @see FRAMEWORK_REFACTOR_FUNCTION_PATTERN.md for Pattern 2 details
 */
export declare const HasManyThrough: Readonly<{
    create: (relatedModel: ModelStatic, through: ModelStatic, foreignKey?: string, throughForeignKey?: string, localKey?: string, secondLocalKey?: string) => IRelationship;
}>;
//# sourceMappingURL=Relationships.d.ts.map