Should be better decouple the value of the state from its name,
the value could have different type from the name eg number.
eg:
draft:
type: initial
value: 100 # this is the value that will be stored into the db
properties:
deletable: true
editable: true
enabled:
type: initial
value: 200 # this is the value that will be stored into the db
properties:
printable: true
editable: true
The name could advantage the readability, instead the value could be a number.
This could be very good for legacy Classes that have unreadable state code.
Should be better decouple the value of the state from its name, the value could have different type from the name eg number.
eg:
The name could advantage the readability, instead the value could be a number. This could be very good for legacy Classes that have unreadable state code.