시드 생성

This commit is contained in:
2025-04-24 12:01:51 +09:00
parent beac42d60c
commit 7fa99e6988
42 changed files with 938 additions and 1170 deletions
+5 -1
View File
@@ -4,7 +4,7 @@ const bcrypt = require('bcrypt');
const User = sequelize.define('User', {
id: {
type: DataTypes.INTEGER,
type: DataTypes.INTEGER.UNSIGNED,
primaryKey: true,
autoIncrement: true
},
@@ -75,4 +75,8 @@ User.prototype.validatePassword = async function(password) {
return await bcrypt.compare(password, this.password);
};
User.associate = (models) => {
User.hasMany(models.Notification, { foreignKey: 'userId' });
};
module.exports = User;