prorm API Reference
    Preparing search index...

    Interface Association

    A declared relationship between two models, and the metadata the query builder needs to join them.

    interface Association {
        source: ModelStatic<any>;
        target: ModelStatic<any>;
        foreignKey: string | string[];
        type: "belongsTo" | "hasOne" | "hasMany" | "belongsToMany";
        as: string;
        options: AssociationOptions;
        targetKey?: string | string[];
        sourceKey?: string | string[];
    }
    Index
    source: ModelStatic<any>
    target: ModelStatic<any>
    foreignKey: string | string[]
    type: "belongsTo" | "hasOne" | "hasMany" | "belongsToMany"
    as: string
    targetKey?: string | string[]
    sourceKey?: string | string[]