Base class for models requiring a code-to-id lookup