Files
gancio/server/api/models/notification.js
lesion 3ca818f016 .
2019-06-06 23:54:32 +02:00

17 lines
516 B
JavaScript

'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;
};