I have the following entities in database that have a corresponding table "entityN_statuses" associated with each of them:
* products * refunds * payments * users * etc...
The "_statuses" tables have the identical structure:
(id, name (unique), description)
Each entity table has "status_name" as a foreign key.
An issue is naming the statuses in each of the "_statuses" table.
This isn't what I want:
* refund_statuses: (new, being_refunded, refunded_successfully, canceled) * payment_statuses: (pending, in_progress, paid_partially, failed, voided, paid_completely) * products: (active, hidden, disabled, out_of_stock, draft) * (and so on)
This is, roughly, what I shoot for:
* refund_statuses: (new, pending, partial, canceled, completed, /*possibly some others */) * payment_statuses: (new, pending, partial, failed, voided, completed, /*possibly some others */) * products: (new, active, hidden, disabled, out_of_stock, /*possibly some others */) * (and so on)
I want the "_statuses" tables to have a certain pattern or overlaps in naming so that it'll be less confusing, there'll be less of unique statuses, it'll easier to reason about and refactor them.
However, naming them this way will make it a little less clear.
Evidently, most or all of the "*_statuses" tables will have some unique statuses that exist only in a single table.
How would you propose to go about the matter?