Mines are kind of cheaty infinite ways of keeping a colony going forever. I think each tile on a planet choice, should save an integer to it, of a resource of a table of resources.
When a mine is placed on these tiles, the mine calculates all the resources from the table type that mine allows (Ore/Regolith for example), and output "this mine has x resources before depleted). When mining, it drains an amount from one tile in a cycle as miners take from it. So if a miner takes 8 at a time. Tile 1 loses 8, then another miner takes 8 more, Tile 2 loses 8, so on so forth.
Mines would calculate the tiles in the vicinity around them. So a 2x2 sized mine, will calculate a 4x4 sized area getting a total of 16 tiles worth of data. Mines can't be built within range of another mine to prevent overlapping these zones.
Once that resource is drained, a new mine for that resource type can not be built there, it will check the mine size of tiles (2x2) for an ore of that type before allowing placement meaning the mine will require direct placement on top of an available source of ore.
Eventually, if the entire map is drained of all resources on all tiles which, I doubt would happen, the only way to get more would be through trade.
This is an issue however with how the game works, because players frequently cheat by making infinite colonies to self support their other colonies. www.ape-apps.com/viewpage.php?p=17120