Using inheritance in model.