A factory and base class to create models for aura framework