Hi Sir thank you for your awesome tutorial on sequelize and typescript please can you let me know how can we add InstanceLevel and ClassLevelMethods in your code i am trying for a day now but could not acheive the desired results :-
const User = sequelize.define('user', { firstname: Sequelize.STRING });
// Adding a class level method
User.classLevelMethod = function() {
return 'foo';
};
// Adding an instance level method
User.prototype.instanceLevelMethod = function() {
return 'bar';
};
Thank You
Hi Sir thank you for your awesome tutorial on sequelize and typescript please can you let me know how can we add InstanceLevel and ClassLevelMethods in your code i am trying for a day now but could not acheive the desired results :-
const User = sequelize.define('user', { firstname: Sequelize.STRING });
// Adding a class level method
User.classLevelMethod = function() {
return 'foo';
};
// Adding an instance level method
User.prototype.instanceLevelMethod = function() {
return 'bar';
};
Thank You