interface IUserModelWithData<T = []> {
    groups: "groups"[] extends T
        ? Pick<IGroupWithData<"name"[]>, "id" | "name">[]
        : never[];
    id: string;
    model: TUserModelGetModel extends T ? IModel : never;
    owners: "owners"[] extends T
        ? Pick<
            IUserWithData<("lastname" | "firstname" | "email" | "avatar")[]>,
            "id" | "lastname" | "firstname" | "email" | "avatar",
        >[]
        : never[];
    template: TUserModelGetTemplate extends T ? string : never;
    users: "users"[] extends T
        ? Pick<
            IUserWithData<("lastname" | "firstname" | "email" | "avatar")[]>,
            "id" | "lastname" | "firstname" | "email" | "avatar",
        >[]
        : never[];
}

Type Parameters

  • T = []

Hierarchy

  • Omit<IUserModel<T>, "owners" | "groups" | "users">
    • IUserModelWithData

Properties

groups: "groups"[] extends T
    ? Pick<IGroupWithData<"name"[]>, "id" | "name">[]
    : never[]
id: string
model: TUserModelGetModel extends T ? IModel : never
owners: "owners"[] extends T
    ? Pick<
        IUserWithData<("lastname" | "firstname" | "email" | "avatar")[]>,
        "id" | "lastname" | "firstname" | "email" | "avatar",
    >[]
    : never[]
template: TUserModelGetTemplate extends T ? string : never
users: "users"[] extends T
    ? Pick<
        IUserWithData<("lastname" | "firstname" | "email" | "avatar")[]>,
        "id" | "lastname" | "firstname" | "email" | "avatar",
    >[]
    : never[]