Yes Now you have to call the Section.setup()
at the end. This is the default User
model.
So basically,
module.exports = function(User) {
User.setup = function() {
// We need to call the base class's setup method
User.base.setup.call(this);
var UserModel = this;
UserModel.setter.email = function(value) {
if (!UserModel.settings.caseSensitiveEmail) {
this.$email = value.toLowerCase();
} else {
this.$email = value;
}
};
return UserModel;
};
/*!
* Setup the base user.
*/
User.setup();
};
I don't know properly how to do that, but I made one MCVE that seemed to work(with bugs):
module.exports = function(Some) {
Some.setup = function() {
Some.base.setup.call(this);
var UserModel = this;
Some.getter.name = function(){
console.log(this.$name);
return this.$name+"lol";
}
}
Some.setup();
};