3 ms·
Seems more of a stackoverflow question? But: https://github.com/kamranahmedse/design-patterns-for-humans#-strategy https://github.com/kamranahmedse/design-pat
by lnxg33k1 3y ago
Seems more of a stackoverflow question?
But:
https://github.com/kamranahmedse/design-patterns-for-humans#-strategy https://github.com/kamranahmedse/design-patterns-for-humans#...
https://www.postgresql.org/docs/current/datatype-enum.html https://www.postgresql.org/docs/current/datatype-enum.html
I'd have multiple classes handling each one a use-case, and a enum on user's record in order to specify which class to use for each, so that you can compute it from the nationality, but you could also potentially give each user the chance to set it for themselves