How to efficiently set up an item system.

I had originally planed on using Data Tables to set up my items.
But to avoid bloat i split off each item class (Generic, Weapon, Equipment) into their own data tables. But each struct had a reference to a master struct for universal variables, like Name, Icon ect.
This was working great because i could just assume the struct from getDataTableRow for the respective classes.

The trouble came when trying to access the Data Tables from a more generic standpoint, something not tied to a class of item type such as a generic inventory slot, because i could no longer assume the returning struct. Even though each Data Table has the generic variables in them from the other struct i just have no way of accessing them without a static reference to a struct

So basically that leaves me with having one Data Table to hold the information for every item, and have a struct with every possible variable one of these classes might need, wheather or not i use them. I can foresee that getting out of hand very quickly.

I’m sure that’s not the only solution, but its the only solution i know of currently;
So my question is what are some efficient ways of handling data this way? Is there a way to make my current idea work? or do i need to abandon the idea of clean data tables?

Hi, you can have one Data Table with all the items, while having multiple Structs to handle variables.

So, for example, you can have a Struct for weapons in which you have all variables that are specific to weapons. Another Struct for potions where you have all the variables specific to potions.
Combine everything in an Item Struct and use that for the Data Table. You’ll have to have a single Data Table, but at least you won’t have thousands of columns for each item.