mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-11-11 18:32:20 +08:00
18 lines
488 B
JavaScript
18 lines
488 B
JavaScript
module.exports = (sequelize, Sequelize) => {
|
|
const Transaction = sequelize.define('transaction', {
|
|
type: Sequelize.STRING,
|
|
objectId: Sequelize.STRING,
|
|
modelName: Sequelize.STRING,
|
|
changedFields: {
|
|
type: Sequelize.STRING,
|
|
get: function get() {
|
|
return JSON.parse(this.getDataValue('changedFields'))
|
|
},
|
|
set: function set(val) {
|
|
this.setDataValue('changedFields', JSON.stringify(val));
|
|
},
|
|
},
|
|
});
|
|
|
|
return Transaction;
|
|
};
|