Mailspring/core/models/shared/account-token.js

19 lines
394 B
JavaScript
Raw Normal View History

2016-06-19 18:02:32 +08:00
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;
};