Add new method `beforeSave` this method will be called before the
current model saves the data.
The `beforeSave` can be used for saving related models or validate the
current model.