mysql – Maximum limit of the implementation feature (Logical)


So this is a more logical question.

I have trouble deciding what I will use to implement the limit, say, for example, ticket limit where I have 2 plans, one is standard that has a limit of 100 tickets and premium that has a limit of 500 tickets.

Which of these two is better for implementing such logic? I have 2 ideas:

A. Only count the number of unique tickets in the database for a specific user and, if it reached 100 or 500, implement a method that will restrict the opening of additional tickets.

B. Create a table, which will have the user ID, and a column that will have an upper limit of 100 or 500 depending on the plan used by the user. Then, each ticket opening will be subtracted from the upper limit in the table. And if the registration reached 0, implement a method that will restrict a greater opening of the ticket.

Or if you have any other ideas, I'll be glad to have it