.
This commit is contained in:
17
server/api/models/notification.js
Normal file
17
server/api/models/notification.js
Normal file
@@ -0,0 +1,17 @@
|
||||
'use strict';
|
||||
module.exports = (sequelize, DataTypes) => {
|
||||
const notification = sequelize.define('notification', {
|
||||
filters: DataTypes.JSON,
|
||||
email: DataTypes.STRING,
|
||||
remove_code: DataTypes.STRING,
|
||||
type: {
|
||||
type: DataTypes.ENUM,
|
||||
values: ['mail', 'admin_email', 'mastodon']
|
||||
}
|
||||
}, {});
|
||||
notification.associate = function(models) {
|
||||
notification.belongsToMany(models.event, { through: 'event_notification' })
|
||||
// associations can be defined here
|
||||
};
|
||||
return notification;
|
||||
};
|
||||
Reference in New Issue
Block a user