@fluentity/core
    Preparing search index...

    Type Alias Relation<T>

    Relation: T extends Model<any>
        ? HasOneRelationBuilder<T>
        : T extends Model<any>[] ? HasManyRelationBuilder<T[number]> : never

    Type that determines the appropriate relation builder based on the model type. Maps model types to their corresponding relation builder types:

    • Single model -> HasOneRelationBuilder
    • Array of models -> HasManyRelationBuilder

    Type Parameters

    • T

      The model type to determine the relation builder for

    type UserRelation = Relation<User>; // HasOneRelationBuilder<User>
    type UsersRelation = Relation<User[]>; // HasManyRelationBuilder<User>