Skip to content

Instantly share code, notes, and snippets.

@mornir
Created February 7, 2021 16:01
Show Gist options
  • Save mornir/cc070bb4ae228a00b1246e13b8d659c0 to your computer and use it in GitHub Desktop.
Save mornir/cc070bb4ae228a00b1246e13b8d659c0 to your computer and use it in GitHub Desktop.
Unused schema snippet for terminofeu
{
name: 'collection',
title: 'Terminologiesammlung',
type: 'string',
options: {
list: [{ title: 'BSV 10-15', value: 'bsv_10-15' }],
},
},
{
name: 'domain',
title: 'Sachgebiet',
type: 'reference',
to: [{ type: 'domain' }],
},
{
title: 'Verwandte Einträge',
name: 'relatedEntries',
type: 'array',
description: 'Verweis auf einen Ober-, Unter- oder Nebenbegriff',
validation: (Rule) => Rule.unique(),
of: [
{
type: 'reference',
to: [{ type: 'entry' }],
options: {
filter: ({ document }) => {
return {
filter: '_id != $id',
params: {
id: getPublishedId(document._id),
},
}
},
},
},
],
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment