custom method
[sequelize] 모델 커스텀 메서드 선언 방법 (ES6)
[sequelize] 모델 커스텀 메서드 선언 방법 (ES6)
2021.09.18예제 모델 // 기존의 sequelize Profile 모델 class Profile extends Sequelize.Model { static init(sequelize, DataTypes) { super.init({ id: { type: DataTypes.INTEGER, allowNull: false, primaryKey: true, autoIncrement: true, }, name: { type: DataTypes.STRING(200), allowNull: false }, email: { type: DataTypes.STRING(200), allowNull: false, }, profile_url: { type: DataTypes.TEXT, allowNull: true, } }); return a..