There is a website where you can buy courses, after buying a course (30 days), the purchased course appears in your personal account, which you can manage: Put on pause for 7 days (Let's say 15 days have passed, put on pause for 7 days, and after 7 days, the courses continue for 15 days). Also, the administrator can also pause courses. How can this be implemented?
Namely, the pause of courses by the user or administrator. Maybe someone has ready-made solutions, or something similar, or at least thoughts on how it can be implemented, I will be very grateful. Unfortunately I can't provide an example:( But if someone has a ready-made solution and you send it here, then I will be able to adapt it for myself
You can save two dates for your course entity. The startAt date and the endAt date. When someone purchases a course, the purchase-date is stored in the startAt date field and the endAt date is calculated by startAt+30.
When the user then pauses a course you simply extend the endAt date by the pause and set a status-flag, that the course is paused.