Project: Spring Boot, Java, Postgres ...
Hi guys. We have something like subscriptions. When a user puts a plus in the checkbox in the personal account to receive a notification by mail, various notifications are sent to him. When he puts this plus in his personal account, the value of hasEmailNotify in the database changes to true, and when he removes the plus from the checkbox, it changes to false.
Now we want the user to be able to define - during what period of time he wants to receive a notification - a week, a month, always. Obviously, from the front, I will receive the value of a certain period of time if the user wants only a temporary subscription, for example, for a week. How can I make the hasemailNotify value in the database automatically change from true to false after this period of time has elapsed?