I have a need for a model(?) on my app which basically contains a status of another entity. In the entity I want to store the id of the status, but in my app, the view is talking in terms of a nice word description. For instance, 1=New, 2=Used etc etc.
How can I go about implementing this in the best way that means I can easily set and retrieve this status column without repeating myself?
Ultimately I would like something like
Foo.status = 'New' (actually sets value to 1)
and
Foo.status (returns 'New', but stores 1)
Am I even thinking about this in the right way?