Added event during creating a model class