I'm creating listings and I wanted some suggestions on how to deal with expiration dates.
I'd like to be able to:
Questions:
I'd appreciate some input and suggestion on how to achieve this.
I would suggest a few fields
start time - DateTime
duration - Int
pause time - DateTime
This way, if they pause it, you store a time, then when they unpause it, you can add however many seconds have passed since they paused it to the duration. With this setup, you can do a simple query that adds duration to the start date to see what has expired.
You could also make this simpler, but less precise, by simply using date fields, and having duration be a number of days instead of seconds.