Mailspring/core/models/shared/account-token.js
2016-06-19 03:02:32 -07:00

18 lines
394 B
JavaScript

module.exports = (sequelize, Sequelize) => {
const AccountToken = sequelize.define('AccountToken', {
value: Sequelize.STRING,
}, {
classMethods: {
associate: ({Account}) => {
AccountToken.belongsTo(Account, {
onDelete: "CASCADE",
foreignKey: {
allowNull: false,
},
});
},
},
});
return AccountToken;
};