Answer the question
In order to leave comments, you need to log in
How to make order statuses in the database correctly?
Tell me, how would it be better to make different statuses in the database (paid, delivery, not paid)? There are many options, but I still don’t know how it would be
better
. fields
3) As in option 1, but only make the identifier not a numeric one, but a string one (delivery, paid, etc.)
I tend to option 1, but you can get confused later what status means what .. How would you do it?
Answer the question
In order to leave comments, you need to log in
make different statuses in the database (paid, delivery, not paid)By linking the order table with the documents in the above table of payment, delivery. Specify the status in the view (if there is a payment, paid, and so on).
Option 2 is closer to reality.
Only in fact, some statuses may not be quite bool
For example, the same delivery may turn out to be “packaging”, “assembly”, “packing”, “transfer to courier / shopping mall”, “delivery”
Yes, and payment by and large can be different " prepaid", "there is a copy of the PP", "money received"
(paid, delivery, not paid)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question