mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-12 23:35:58 +00:00
* detect unused typescript disables * fix lint errors uuid-types remove debug fix config * lint fixes
43 lines
1.1 KiB
TypeScript
43 lines
1.1 KiB
TypeScript
import { v4 as uuid } from 'uuid'
|
|
|
|
export default {
|
|
id: { type: 'string', primary: true, default: uuid },
|
|
createdAt: { type: 'string', isoDate: true, default: () => new Date().toISOString() },
|
|
updatedAt: {
|
|
type: 'string',
|
|
isoDate: true,
|
|
required: true,
|
|
default: () => new Date().toISOString(),
|
|
},
|
|
content: { type: 'string', disallow: [null], min: 3 },
|
|
contentExcerpt: { type: 'string', allow: [null] },
|
|
deleted: { type: 'boolean', default: false },
|
|
disabled: { type: 'boolean', default: false },
|
|
post: {
|
|
type: 'relationship',
|
|
relationship: 'COMMENTS',
|
|
target: 'Post',
|
|
direction: 'out',
|
|
},
|
|
author: {
|
|
type: 'relationship',
|
|
relationship: 'WROTE',
|
|
target: 'User',
|
|
direction: 'in',
|
|
},
|
|
notified: {
|
|
type: 'relationship',
|
|
relationship: 'NOTIFIED',
|
|
target: 'User',
|
|
direction: 'out',
|
|
properties: {
|
|
read: { type: 'boolean', default: false },
|
|
reason: {
|
|
type: 'string',
|
|
valid: ['mentioned_in_post', 'mentioned_in_comment', 'commented_on_post'],
|
|
},
|
|
createdAt: { type: 'string', isoDate: true, default: () => new Date().toISOString() },
|
|
},
|
|
},
|
|
}
|