pub fn convert_items_to_database_items(
    loadout_container_id: i64,
    inventory: &Inventory,
    inventory_container_id: i64,
    overflow_items_container_id: i64,
    recipe_book_container_id: i64,
    next_id: &mut i64,
) -> Vec<ItemModelPair>
Expand description

Returns a vector that contains all item rows to upsert; parent is responsible for deleting items from the same owner that aren’t affirmatively kept by this.

NOTE: This method does not yet handle persisting nested items within inventories. Although loadout items do store items inside them this does not currently utilise parent_container_id - all loadout items have the loadout pseudo-container as their parent.