I am creating a website where people will be able to register and post "events" (jobs, accommodation etc) in my local area.
I was thinking of having a credit system where by i would give all new users say 10 credits as a thankyou for signing up then each "event" they post on the site will cost a certain amout of credits.
So if the user wants an event listed for 1 week that could be 10 credits say. then they would need to buy more credits if they wanted to create further"events" or extend the length of the current "event".
I would use paypal for this as i wont have to store any card details in my database and is a safer option.
thats the idea, so my question is what is the best way to approach this? what tables would i need?
Im thinking something along these lines
tbl_users(userID, username, currentcredits, datejoined)
transactions(transaction_id, userID, credits, timestamp)
transactions_types(transaction_id, type) => type(brought/spent)
transactions_items(transaction_id, item) => item(purchased credits or event id)
the more i think about this the harder it sounds in my head
appreciate any help/advice