This commit is contained in:
Julian Krauser 2024-11-03 15:34:29 +01:00
parent 7679f4f6c9
commit bd52f5c996
11 changed files with 1892 additions and 20 deletions

View file

@ -37,10 +37,7 @@
"multiple": false, "multiple": false,
"required": true, "required": true,
"allowedTypes": [ "allowedTypes": [
"images", "images"
"files",
"videos",
"audios"
], ],
"pluginOptions": {} "pluginOptions": {}
}, },
@ -49,9 +46,7 @@
"multiple": true, "multiple": true,
"required": false, "required": false,
"allowedTypes": [ "allowedTypes": [
"images", "images"
"files",
"videos"
], ],
"pluginOptions": {} "pluginOptions": {}
}, },

View file

@ -19,6 +19,11 @@
"collection": { "collection": {
"type": "uid", "type": "uid",
"required": true "required": true
},
"imageItem": {
"type": "boolean",
"default": false,
"required": true
} }
} }
} }

View file

@ -33,9 +33,7 @@
"multiple": true, "multiple": true,
"required": false, "required": false,
"allowedTypes": [ "allowedTypes": [
"images", "images"
"files",
"videos"
], ],
"pluginOptions": {} "pluginOptions": {}
}, },

View file

@ -0,0 +1,53 @@
{
"kind": "collectionType",
"collectionName": "vehicles",
"info": {
"singularName": "vehicle",
"pluralName": "vehicles",
"displayName": "Fahrzeuge"
},
"options": {
"draftAndPublish": true
},
"pluginOptions": {},
"attributes": {
"title": {
"pluginOptions": {},
"type": "string",
"required": true
},
"description": {
"pluginOptions": {},
"type": "string",
"required": true
},
"slug": {
"pluginOptions": {},
"type": "uid",
"targetField": "title",
"required": true
},
"content": {
"pluginOptions": {},
"type": "blocks"
},
"image": {
"type": "media",
"multiple": false,
"required": true,
"allowedTypes": [
"images"
],
"pluginOptions": {}
},
"attachment": {
"type": "media",
"multiple": true,
"required": false,
"allowedTypes": [
"images"
],
"pluginOptions": {}
}
}
}

View file

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

View file

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

View file

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

View file

@ -12,7 +12,7 @@
"default": false, "default": false,
"required": true "required": true
}, },
"sammlungs_referenz": { "lookup": {
"type": "relation", "type": "relation",
"relation": "oneToOne", "relation": "oneToOne",
"target": "api::collection-lookup.collection-lookup" "target": "api::collection-lookup.collection-lookup"

View file

@ -180,7 +180,7 @@ export interface SharedList extends Struct.ComponentSchema {
enable_detail: Schema.Attribute.Boolean & enable_detail: Schema.Attribute.Boolean &
Schema.Attribute.Required & Schema.Attribute.Required &
Schema.Attribute.DefaultTo<false>; Schema.Attribute.DefaultTo<false>;
sammlungs_referenz: Schema.Attribute.Relation< lookup: Schema.Attribute.Relation<
'oneToOne', 'oneToOne',
'api::collection-lookup.collection-lookup' 'api::collection-lookup.collection-lookup'
>; >;

View file

@ -381,15 +381,14 @@ export interface ApiArticleArticle extends Struct.CollectionTypeSchema {
draftAndPublish: true; draftAndPublish: true;
}; };
attributes: { attributes: {
attachment: Schema.Attribute.Media<'images' | 'files' | 'videos', true>; attachment: Schema.Attribute.Media<'images', true>;
content: Schema.Attribute.Blocks; content: Schema.Attribute.Blocks;
createdAt: Schema.Attribute.DateTime; createdAt: Schema.Attribute.DateTime;
createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> & createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
Schema.Attribute.Private; Schema.Attribute.Private;
date: Schema.Attribute.Date & Schema.Attribute.Required; date: Schema.Attribute.Date & Schema.Attribute.Required;
description: Schema.Attribute.String & Schema.Attribute.Required; description: Schema.Attribute.String & Schema.Attribute.Required;
image: Schema.Attribute.Media<'images' | 'files' | 'videos' | 'audios'> & image: Schema.Attribute.Media<'images'> & Schema.Attribute.Required;
Schema.Attribute.Required;
locale: Schema.Attribute.String & Schema.Attribute.Private; locale: Schema.Attribute.String & Schema.Attribute.Private;
localizations: Schema.Attribute.Relation< localizations: Schema.Attribute.Relation<
'oneToMany', 'oneToMany',
@ -422,6 +421,9 @@ export interface ApiCollectionLookupCollectionLookup
createdAt: Schema.Attribute.DateTime; createdAt: Schema.Attribute.DateTime;
createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> & createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
Schema.Attribute.Private; Schema.Attribute.Private;
imageItem: Schema.Attribute.Boolean &
Schema.Attribute.Required &
Schema.Attribute.DefaultTo<false>;
locale: Schema.Attribute.String & Schema.Attribute.Private; locale: Schema.Attribute.String & Schema.Attribute.Private;
localizations: Schema.Attribute.Relation< localizations: Schema.Attribute.Relation<
'oneToMany', 'oneToMany',
@ -548,7 +550,7 @@ export interface ApiOperationOperation extends Struct.CollectionTypeSchema {
draftAndPublish: true; draftAndPublish: true;
}; };
attributes: { attributes: {
attachment: Schema.Attribute.Media<'images' | 'files' | 'videos', true>; attachment: Schema.Attribute.Media<'images', true>;
content: Schema.Attribute.Blocks; content: Schema.Attribute.Blocks;
createdAt: Schema.Attribute.DateTime; createdAt: Schema.Attribute.DateTime;
createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> & createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
@ -611,6 +613,39 @@ export interface ApiPagePage extends Struct.CollectionTypeSchema {
}; };
} }
export interface ApiVehicleVehicle extends Struct.CollectionTypeSchema {
collectionName: 'vehicles';
info: {
displayName: 'Fahrzeuge';
pluralName: 'vehicles';
singularName: 'vehicle';
};
options: {
draftAndPublish: true;
};
attributes: {
attachment: Schema.Attribute.Media<'images', true>;
content: Schema.Attribute.Blocks;
createdAt: Schema.Attribute.DateTime;
createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
Schema.Attribute.Private;
description: Schema.Attribute.String & Schema.Attribute.Required;
image: Schema.Attribute.Media<'images'> & Schema.Attribute.Required;
locale: Schema.Attribute.String & Schema.Attribute.Private;
localizations: Schema.Attribute.Relation<
'oneToMany',
'api::vehicle.vehicle'
> &
Schema.Attribute.Private;
publishedAt: Schema.Attribute.DateTime;
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 PluginContentReleasesRelease export interface PluginContentReleasesRelease
extends Struct.CollectionTypeSchema { extends Struct.CollectionTypeSchema {
collectionName: 'strapi_releases'; collectionName: 'strapi_releases';
@ -1123,6 +1158,7 @@ declare module '@strapi/strapi' {
'api::homepage.homepage': ApiHomepageHomepage; 'api::homepage.homepage': ApiHomepageHomepage;
'api::operation.operation': ApiOperationOperation; 'api::operation.operation': ApiOperationOperation;
'api::page.page': ApiPagePage; 'api::page.page': ApiPagePage;
'api::vehicle.vehicle': ApiVehicleVehicle;
'plugin::content-releases.release': PluginContentReleasesRelease; 'plugin::content-releases.release': PluginContentReleasesRelease;
'plugin::content-releases.release-action': PluginContentReleasesReleaseAction; 'plugin::content-releases.release-action': PluginContentReleasesReleaseAction;
'plugin::i18n.locale': PluginI18NLocale; 'plugin::i18n.locale': PluginI18NLocale;