I am using Sequelize as Data ORM.
I have a simple User Class.
import { Model } from "sequelize";
class User extends BaseModel {
}
export default User;
and I am able to use the User class like this User.findByPk(1) Sequelize findByPk
What I want is a BaseModel Class which will extend Sequelize Model class so that I can put some common methods in BaseClass.
For Example: Instead of using findByPk, I would want to define find method in BaseModel which will call findByPk on the Inherited class, but I am unable to find any solution to get child reference in Parent class.
something like static in PHP.