// @generated automatically by Diesel CLI.

diesel::table! {
    api_keys (id) {
        id -> Uuid,
        team_id -> Uuid,
    }
}

diesel::table! {
    browser_sessions (id) {
        id -> Text,
        serialized -> Text,
    }
}

diesel::table! {
    csrf_tokens (id) {
        id -> Uuid,
        user_id -> Nullable<Uuid>,
        expires_at -> Timestamptz,
    }
}

diesel::table! {
    projects (id) {
        id -> Uuid,
        team_id -> Uuid,
        name -> Text,
    }
}

diesel::table! {
    team_memberships (team_id, user_id) {
        team_id -> Uuid,
        user_id -> Uuid,
        roles -> Array<Nullable<Text>>,
    }
}

diesel::table! {
    teams (id) {
        id -> Uuid,
        name -> Text,
    }
}

diesel::table! {
    users (id) {
        id -> Uuid,
        uid -> Text,
        email -> Text,
    }
}

diesel::joinable!(api_keys -> teams (team_id));
diesel::joinable!(csrf_tokens -> users (user_id));
diesel::joinable!(projects -> teams (team_id));
diesel::joinable!(team_memberships -> teams (team_id));
diesel::joinable!(team_memberships -> users (user_id));

diesel::allow_tables_to_appear_in_same_query!(
    api_keys,
    browser_sessions,
    csrf_tokens,
    projects,
    team_memberships,
    teams,
    users,
);
