Extending models, creating base model class with common functions