Trying to get my logic down before I start to code it - not sure if this should be in this forum 🤷
I am trying to set up my Login in page and I need to have it check to make sure that the user’s account is ‘active’. I need a little advice on the best way to do this.
There are 4 different types of accounts, based on months in the year - - 1,3,6,12
I have a bill table, every time a user is billed it will add a new line to the table – is this a good idea?? Or should it over write??
Bill table --
billID
userID
bill_code (this is the 1,3,6,12)
dateBilled
billedAmount
user table --
userID
status
Should I set it up to compare the dateBilled with the bill_code and make a decision as to whether the account status is active or not? I think this might be useful for when the subscription runs out and the user does nothing.
Should I have the bill_code and the dateBilled in the user table as well? Maybe something like this?
Bill table --
billID
userID
dateBilled
billedAmount
user table --
userID
bill_code (this is the 1,3,6,12)
dateLastBilled
status
As you can tell my thought process is not very clear on how I should approach this. Any suggestions would be appreciated.