Lookup table

This commit is contained in:
Julian Krauser 2024-11-03 11:01:51 +01:00
parent 832994d13e
commit 693aa352a4
13 changed files with 1138 additions and 335 deletions

View file

@ -10,46 +10,26 @@
"options": {
"draftAndPublish": true
},
"pluginOptions": {
"i18n": {
"localized": true
}
},
"pluginOptions": {},
"attributes": {
"title": {
"pluginOptions": {
"i18n": {
"localized": true
}
},
"pluginOptions": {},
"type": "string",
"required": true
},
"description": {
"pluginOptions": {
"i18n": {
"localized": true
}
},
"pluginOptions": {},
"type": "string",
"required": true
},
"slug": {
"pluginOptions": {
"i18n": {
"localized": true
}
},
"pluginOptions": {},
"type": "uid",
"targetField": "title",
"required": true
},
"content": {
"pluginOptions": {
"i18n": {
"localized": true
}
},
"pluginOptions": {},
"type": "blocks"
},
"image": {
@ -62,11 +42,7 @@
"videos",
"audios"
],
"pluginOptions": {
"i18n": {
"localized": false
}
}
"pluginOptions": {}
},
"attachment": {
"type": "media",
@ -77,18 +53,10 @@
"files",
"videos"
],
"pluginOptions": {
"i18n": {
"localized": false
}
}
"pluginOptions": {}
},
"date": {
"pluginOptions": {
"i18n": {
"localized": true
}
},
"pluginOptions": {},
"type": "date",
"required": true
}

View file

@ -0,0 +1,24 @@
{
"kind": "collectionType",
"collectionName": "collection_lookups",
"info": {
"singularName": "collection-lookup",
"pluralName": "collection-lookups",
"displayName": "Sammlungs Referenz",
"description": ""
},
"options": {
"draftAndPublish": true
},
"pluginOptions": {},
"attributes": {
"reference": {
"type": "uid",
"required": true
},
"collection": {
"type": "uid",
"required": true
}
}
}

View file

@ -0,0 +1,7 @@
/**
* collection-lookup controller
*/
import { factories } from '@strapi/strapi'
export default factories.createCoreController('api::collection-lookup.collection-lookup');

View file

@ -0,0 +1,7 @@
/**
* collection-lookup router
*/
import { factories } from '@strapi/strapi';
export default factories.createCoreRouter('api::collection-lookup.collection-lookup');

View file

@ -0,0 +1,7 @@
/**
* collection-lookup service
*/
import { factories } from '@strapi/strapi';
export default factories.createCoreService('api::collection-lookup.collection-lookup');

View file

@ -10,46 +10,26 @@
"options": {
"draftAndPublish": true
},
"pluginOptions": {
"i18n": {
"localized": true
}
},
"pluginOptions": {},
"attributes": {
"title": {
"pluginOptions": {
"i18n": {
"localized": true
}
},
"pluginOptions": {},
"type": "string",
"required": true
},
"description": {
"pluginOptions": {
"i18n": {
"localized": true
}
},
"pluginOptions": {},
"type": "string",
"required": true
},
"slug": {
"pluginOptions": {
"i18n": {
"localized": true
}
},
"pluginOptions": {},
"type": "uid",
"targetField": "title",
"required": true
},
"date": {
"pluginOptions": {
"i18n": {
"localized": true
}
},
"pluginOptions": {},
"type": "datetime",
"required": true
}

View file

@ -10,31 +10,19 @@
"options": {
"draftAndPublish": true
},
"pluginOptions": {
"i18n": {
"localized": true
}
},
"pluginOptions": {},
"attributes": {
"navbar": {
"type": "component",
"repeatable": false,
"pluginOptions": {
"i18n": {
"localized": true
}
},
"pluginOptions": {},
"component": "global.navbar",
"required": true
},
"footer": {
"type": "component",
"repeatable": false,
"pluginOptions": {
"i18n": {
"localized": true
}
},
"pluginOptions": {},
"component": "global.footer"
}
}

View file

@ -10,36 +10,20 @@
"options": {
"draftAndPublish": true
},
"pluginOptions": {
"i18n": {
"localized": true
}
},
"pluginOptions": {},
"attributes": {
"title": {
"pluginOptions": {
"i18n": {
"localized": true
}
},
"pluginOptions": {},
"type": "string",
"required": true
},
"description": {
"pluginOptions": {
"i18n": {
"localized": true
}
},
"pluginOptions": {},
"type": "string",
"required": true
},
"slug": {
"pluginOptions": {
"i18n": {
"localized": true
}
},
"pluginOptions": {},
"type": "uid",
"targetField": "title",
"required": true
@ -53,18 +37,10 @@
"files",
"videos"
],
"pluginOptions": {
"i18n": {
"localized": false
}
}
"pluginOptions": {}
},
"date": {
"pluginOptions": {
"i18n": {
"localized": true
}
},
"pluginOptions": {},
"type": "datetime",
"required": true
}

View file

@ -10,28 +10,16 @@
"options": {
"draftAndPublish": true
},
"pluginOptions": {
"i18n": {
"localized": true
}
},
"pluginOptions": {},
"attributes": {
"identifier": {
"pluginOptions": {
"i18n": {
"localized": true
}
},
"pluginOptions": {},
"type": "string",
"required": true,
"unique": true
},
"slug": {
"pluginOptions": {
"i18n": {
"localized": true
}
},
"pluginOptions": {},
"type": "uid",
"targetField": "identifier",
"required": true
@ -39,20 +27,12 @@
"hero": {
"type": "component",
"repeatable": false,
"pluginOptions": {
"i18n": {
"localized": true
}
},
"pluginOptions": {},
"component": "shared.hero",
"required": false
},
"content": {
"pluginOptions": {
"i18n": {
"localized": true
}
},
"pluginOptions": {},
"type": "dynamiczone",
"components": [
"dynamic-zone.gallery",

View file

@ -7,19 +7,15 @@
},
"options": {},
"attributes": {
"list": {
"type": "enumeration",
"enum": [
"articles",
"events",
"operations"
],
"required": true
},
"enable_detail": {
"type": "boolean",
"default": false,
"required": true
},
"sammlungs_referenz": {
"type": "relation",
"relation": "oneToOne",
"target": "api::collection-lookup.collection-lookup"
}
}
}

View file

@ -180,8 +180,10 @@ export interface SharedList extends Struct.ComponentSchema {
enable_detail: Schema.Attribute.Boolean &
Schema.Attribute.Required &
Schema.Attribute.DefaultTo<false>;
list: Schema.Attribute.Enumeration<['articles', 'events', 'operations']> &
Schema.Attribute.Required;
sammlungs_referenz: Schema.Attribute.Relation<
'oneToOne',
'api::collection-lookup.collection-lookup'
>;
};
}

View file

@ -380,68 +380,56 @@ export interface ApiArticleArticle extends Struct.CollectionTypeSchema {
options: {
draftAndPublish: true;
};
pluginOptions: {
i18n: {
localized: true;
};
};
attributes: {
attachment: Schema.Attribute.Media<'images' | 'files' | 'videos', true> &
Schema.Attribute.SetPluginOptions<{
i18n: {
localized: false;
};
}>;
content: Schema.Attribute.Blocks &
Schema.Attribute.SetPluginOptions<{
i18n: {
localized: true;
};
}>;
attachment: Schema.Attribute.Media<'images' | 'files' | 'videos', true>;
content: Schema.Attribute.Blocks;
createdAt: Schema.Attribute.DateTime;
createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
Schema.Attribute.Private;
date: Schema.Attribute.Date &
Schema.Attribute.Required &
Schema.Attribute.SetPluginOptions<{
i18n: {
localized: true;
};
}>;
description: Schema.Attribute.String &
Schema.Attribute.Required &
Schema.Attribute.SetPluginOptions<{
i18n: {
localized: true;
};
}>;
date: Schema.Attribute.Date & Schema.Attribute.Required;
description: Schema.Attribute.String & Schema.Attribute.Required;
image: Schema.Attribute.Media<'images' | 'files' | 'videos' | 'audios'> &
Schema.Attribute.Required &
Schema.Attribute.SetPluginOptions<{
i18n: {
localized: false;
};
}>;
locale: Schema.Attribute.String;
Schema.Attribute.Required;
locale: Schema.Attribute.String & Schema.Attribute.Private;
localizations: Schema.Attribute.Relation<
'oneToMany',
'api::article.article'
>;
> &
Schema.Attribute.Private;
publishedAt: Schema.Attribute.DateTime;
slug: Schema.Attribute.UID<'title'> &
Schema.Attribute.Required &
Schema.Attribute.SetPluginOptions<{
i18n: {
localized: true;
};
}>;
title: Schema.Attribute.String &
Schema.Attribute.Required &
Schema.Attribute.SetPluginOptions<{
i18n: {
localized: true;
};
}>;
slug: Schema.Attribute.UID<'title'> & Schema.Attribute.Required;
title: Schema.Attribute.String & Schema.Attribute.Required;
updatedAt: Schema.Attribute.DateTime;
updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
Schema.Attribute.Private;
};
}
export interface ApiCollectionLookupCollectionLookup
extends Struct.CollectionTypeSchema {
collectionName: 'collection_lookups';
info: {
description: '';
displayName: 'Sammlungs Referenz';
pluralName: 'collection-lookups';
singularName: 'collection-lookup';
};
options: {
draftAndPublish: true;
};
attributes: {
collection: Schema.Attribute.UID & Schema.Attribute.Required;
createdAt: Schema.Attribute.DateTime;
createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
Schema.Attribute.Private;
locale: Schema.Attribute.String & Schema.Attribute.Private;
localizations: Schema.Attribute.Relation<
'oneToMany',
'api::collection-lookup.collection-lookup'
> &
Schema.Attribute.Private;
publishedAt: Schema.Attribute.DateTime;
reference: Schema.Attribute.UID & Schema.Attribute.Required;
updatedAt: Schema.Attribute.DateTime;
updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
Schema.Attribute.Private;
@ -459,46 +447,18 @@ export interface ApiEventEvent extends Struct.CollectionTypeSchema {
options: {
draftAndPublish: true;
};
pluginOptions: {
i18n: {
localized: true;
};
};
attributes: {
createdAt: Schema.Attribute.DateTime;
createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
Schema.Attribute.Private;
date: Schema.Attribute.DateTime &
Schema.Attribute.Required &
Schema.Attribute.SetPluginOptions<{
i18n: {
localized: true;
};
}>;
description: Schema.Attribute.String &
Schema.Attribute.Required &
Schema.Attribute.SetPluginOptions<{
i18n: {
localized: true;
};
}>;
locale: Schema.Attribute.String;
localizations: Schema.Attribute.Relation<'oneToMany', 'api::event.event'>;
date: Schema.Attribute.DateTime & Schema.Attribute.Required;
description: Schema.Attribute.String & Schema.Attribute.Required;
locale: Schema.Attribute.String & Schema.Attribute.Private;
localizations: Schema.Attribute.Relation<'oneToMany', 'api::event.event'> &
Schema.Attribute.Private;
publishedAt: Schema.Attribute.DateTime;
slug: Schema.Attribute.UID<'title'> &
Schema.Attribute.Required &
Schema.Attribute.SetPluginOptions<{
i18n: {
localized: true;
};
}>;
title: Schema.Attribute.String &
Schema.Attribute.Required &
Schema.Attribute.SetPluginOptions<{
i18n: {
localized: true;
};
}>;
slug: Schema.Attribute.UID<'title'> & Schema.Attribute.Required;
title: Schema.Attribute.String & Schema.Attribute.Required;
updatedAt: Schema.Attribute.DateTime;
updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
Schema.Attribute.Private;
@ -516,30 +476,19 @@ export interface ApiGlobalGlobal extends Struct.SingleTypeSchema {
options: {
draftAndPublish: true;
};
pluginOptions: {
i18n: {
localized: true;
};
};
attributes: {
createdAt: Schema.Attribute.DateTime;
createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
Schema.Attribute.Private;
footer: Schema.Attribute.Component<'global.footer', false> &
Schema.Attribute.SetPluginOptions<{
i18n: {
localized: true;
};
}>;
locale: Schema.Attribute.String;
localizations: Schema.Attribute.Relation<'oneToMany', 'api::global.global'>;
footer: Schema.Attribute.Component<'global.footer', false>;
locale: Schema.Attribute.String & Schema.Attribute.Private;
localizations: Schema.Attribute.Relation<
'oneToMany',
'api::global.global'
> &
Schema.Attribute.Private;
navbar: Schema.Attribute.Component<'global.navbar', false> &
Schema.Attribute.Required &
Schema.Attribute.SetPluginOptions<{
i18n: {
localized: true;
};
}>;
Schema.Attribute.Required;
publishedAt: Schema.Attribute.DateTime;
updatedAt: Schema.Attribute.DateTime;
updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
@ -598,55 +547,22 @@ export interface ApiOperationOperation extends Struct.CollectionTypeSchema {
options: {
draftAndPublish: true;
};
pluginOptions: {
i18n: {
localized: true;
};
};
attributes: {
attachment: Schema.Attribute.Media<'images' | 'files' | 'videos', true> &
Schema.Attribute.SetPluginOptions<{
i18n: {
localized: false;
};
}>;
attachment: Schema.Attribute.Media<'images' | 'files' | 'videos', true>;
createdAt: Schema.Attribute.DateTime;
createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
Schema.Attribute.Private;
date: Schema.Attribute.DateTime &
Schema.Attribute.Required &
Schema.Attribute.SetPluginOptions<{
i18n: {
localized: true;
};
}>;
description: Schema.Attribute.String &
Schema.Attribute.Required &
Schema.Attribute.SetPluginOptions<{
i18n: {
localized: true;
};
}>;
locale: Schema.Attribute.String;
date: Schema.Attribute.DateTime & Schema.Attribute.Required;
description: Schema.Attribute.String & Schema.Attribute.Required;
locale: Schema.Attribute.String & Schema.Attribute.Private;
localizations: Schema.Attribute.Relation<
'oneToMany',
'api::operation.operation'
>;
> &
Schema.Attribute.Private;
publishedAt: Schema.Attribute.DateTime;
slug: Schema.Attribute.UID<'title'> &
Schema.Attribute.Required &
Schema.Attribute.SetPluginOptions<{
i18n: {
localized: true;
};
}>;
title: Schema.Attribute.String &
Schema.Attribute.Required &
Schema.Attribute.SetPluginOptions<{
i18n: {
localized: true;
};
}>;
slug: Schema.Attribute.UID<'title'> & Schema.Attribute.Required;
title: Schema.Attribute.String & Schema.Attribute.Required;
updatedAt: Schema.Attribute.DateTime;
updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
Schema.Attribute.Private;
@ -664,11 +580,6 @@ export interface ApiPagePage extends Struct.CollectionTypeSchema {
options: {
draftAndPublish: true;
};
pluginOptions: {
i18n: {
localized: true;
};
};
attributes: {
content: Schema.Attribute.DynamicZone<
[
@ -680,39 +591,19 @@ export interface ApiPagePage extends Struct.CollectionTypeSchema {
'dynamic-zone.column-image-text',
'shared.list',
]
> &
Schema.Attribute.SetPluginOptions<{
i18n: {
localized: true;
};
}>;
>;
createdAt: Schema.Attribute.DateTime;
createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
Schema.Attribute.Private;
hero: Schema.Attribute.Component<'shared.hero', false> &
Schema.Attribute.SetPluginOptions<{
i18n: {
localized: true;
};
}>;
hero: Schema.Attribute.Component<'shared.hero', false>;
identifier: Schema.Attribute.String &
Schema.Attribute.Required &
Schema.Attribute.Unique &
Schema.Attribute.SetPluginOptions<{
i18n: {
localized: true;
};
}>;
locale: Schema.Attribute.String;
localizations: Schema.Attribute.Relation<'oneToMany', 'api::page.page'>;
Schema.Attribute.Unique;
locale: Schema.Attribute.String & Schema.Attribute.Private;
localizations: Schema.Attribute.Relation<'oneToMany', 'api::page.page'> &
Schema.Attribute.Private;
publishedAt: Schema.Attribute.DateTime;
slug: Schema.Attribute.UID<'identifier'> &
Schema.Attribute.Required &
Schema.Attribute.SetPluginOptions<{
i18n: {
localized: true;
};
}>;
slug: Schema.Attribute.UID<'identifier'> & Schema.Attribute.Required;
updatedAt: Schema.Attribute.DateTime;
updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
Schema.Attribute.Private;
@ -1225,6 +1116,7 @@ declare module '@strapi/strapi' {
'admin::transfer-token-permission': AdminTransferTokenPermission;
'admin::user': AdminUser;
'api::article.article': ApiArticleArticle;
'api::collection-lookup.collection-lookup': ApiCollectionLookupCollectionLookup;
'api::event.event': ApiEventEvent;
'api::global.global': ApiGlobalGlobal;
'api::homepage.homepage': ApiHomepageHomepage;