mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
36 lines
656 B
JavaScript
36 lines
656 B
JavaScript
import uuid from 'uuid/v4'
|
|
|
|
module.exports = {
|
|
id: {
|
|
type: 'uuid',
|
|
primary: true,
|
|
default: uuid,
|
|
},
|
|
read: {
|
|
type: 'boolean',
|
|
default: false,
|
|
},
|
|
reason: {
|
|
type: 'string',
|
|
valid: ['mentioned_in_post', 'mentioned_in_comment', 'comment_on_your_post'],
|
|
default: 'mentioned_in_post',
|
|
},
|
|
createdAt: {
|
|
type: 'string',
|
|
isoDate: true,
|
|
default: () => new Date().toISOString(),
|
|
},
|
|
user: {
|
|
type: 'relationship',
|
|
relationship: 'NOTIFIED',
|
|
target: 'User',
|
|
direction: 'out',
|
|
},
|
|
post: {
|
|
type: 'relationship',
|
|
relationship: 'NOTIFIED',
|
|
target: 'Post',
|
|
direction: 'in',
|
|
},
|
|
}
|