mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-01-11 02:30:21 +08:00
15 lines
346 B
JavaScript
15 lines
346 B
JavaScript
module.exports = (sequelize, Sequelize) => {
|
|
const Thread = sequelize.define('Thread', {
|
|
threadId: Sequelize.STRING,
|
|
subject: Sequelize.STRING,
|
|
cleanedSubject: Sequelize.STRING,
|
|
}, {
|
|
classMethods: {
|
|
associate: ({Message}) => {
|
|
Thread.hasMany(Message, {as: 'messages'})
|
|
},
|
|
},
|
|
});
|
|
|
|
return Thread;
|
|
};
|