Ocelot-Social/backend/src/models/SocialMedia.js
roschaefer bd885b1aac Delete emails and social media, bugfix
The bugfix was missing '(' plus a wrong order for the social media
relationship called 'OWNED_BY'.
2019-09-03 21:28:29 +02:00

16 lines
404 B
JavaScript

import uuid from 'uuid/v4'
module.exports = {
id: { type: 'string', primary: true, default: uuid },
url: { type: 'string', uri: true, required: true },
createdAt: { type: 'string', isoDate: true, default: () => new Date().toISOString() },
ownedBy: {
type: 'relationship',
relationship: 'OWNED_BY',
target: 'User',
direction: 'out',
eager: true,
cascade: 'detach',
},
}