2019-06-07 17:02:33 +02:00
|
|
|
'use strict'
|
2019-09-11 19:12:24 +02:00
|
|
|
module.exports = (sequelize, DataTypes) => {
|
2019-06-06 23:54:32 +02:00
|
|
|
const comment = sequelize.define('comment', {
|
2019-07-03 16:58:24 +02:00
|
|
|
activitypub_id: {
|
2019-11-12 14:32:34 +01:00
|
|
|
type: DataTypes.STRING,
|
2019-07-03 16:58:24 +02:00
|
|
|
index: true,
|
2019-09-11 19:12:24 +02:00
|
|
|
unique: true
|
2019-07-03 16:58:24 +02:00
|
|
|
},
|
2019-06-06 23:54:32 +02:00
|
|
|
data: DataTypes.JSON
|
2019-06-07 17:02:33 +02:00
|
|
|
}, {})
|
|
|
|
|
comment.associate = function (models) {
|
2019-06-06 23:54:32 +02:00
|
|
|
comment.belongsTo(models.event)
|
2019-06-07 17:02:33 +02:00
|
|
|
}
|
|
|
|
|
return comment
|
2019-09-11 19:12:24 +02:00
|
|
|
}
|