mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
* DRY schema stitching code * Use same `.env` configuration file for cypress tests That last part I couldn't improve a lot. I thought it might be possible with cypress to import all files from a folder. But since it must be browser compatible and our backend is not using webpack or anything, it remains a goal unreached. close #2773 close #2774
22 lines
579 B
JavaScript
22 lines
579 B
JavaScript
import uuid from 'uuid/v4'
|
|
|
|
export default {
|
|
id: { type: 'string', primary: true, default: uuid },
|
|
name: { type: 'string', required: true, default: false },
|
|
slug: { type: 'string' },
|
|
icon: { type: 'string', required: true, default: false },
|
|
createdAt: { type: 'string', isoDate: true, default: () => new Date().toISOString() },
|
|
updatedAt: {
|
|
type: 'string',
|
|
isoDate: true,
|
|
required: true,
|
|
default: () => new Date().toISOString(),
|
|
},
|
|
post: {
|
|
type: 'relationship',
|
|
relationship: 'CATEGORIZED',
|
|
target: 'Post',
|
|
direction: 'in',
|
|
},
|
|
}
|