Files
gancio/server/api/models/comment.js

14 lines
354 B
JavaScript
Raw Normal View History

2019-06-07 17:02:33 +02:00
'use strict'
2019-06-06 23:54:32 +02:00
module.exports = (sequelize, DataTypes) => {
const comment = sequelize.define('comment', {
2019-06-25 01:05:38 +02:00
activitypub_id: DataTypes.STRING(18),
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
// Event.hasMany(Comment)
2019-06-06 23:54:32 +02:00
// associations can be defined here
2019-06-07 17:02:33 +02:00
}
return comment
};