I am creating a simple internal asset tracking app for my company. Currently we do this through excel (terrible). I'm breaking this down to:
Asset/Item - The tool, hardware, part etc. Site - The overall location it's at: Facility A, Site Location B Bin - A sublocation an asset is located, this could be a building, a toolbox, a crate.
The Bin is causing me problems because an Item can be location at a Site without a Bin, or a Bin can be located inside another Bin, I am not yet sure the best way to structure this database.
I have tried having multiple foreign keys but that gets messy or atleast feels so. I have also tried using the alternatives to Django's GenericForeign Keys as listed here I have used them before with subtly different apps but the self referencing is confusing me. In the end I want to be able to gather a list of items at a site and then have indented lines for each toolbox and the items inside, is there a good method for setting up the models so this can happen?