add tags to schema

This commit is contained in:
lightling 2024-10-17 17:11:57 -04:00
parent 68efe43fbf
commit 9ce4e38301
9 changed files with 89 additions and 72 deletions

View file

@ -0,0 +1,30 @@
{
"kind": "collectionType",
"collectionName": "media_entry_tags",
"info": {
"singularName": "media-entry-tag",
"pluralName": "media-entry-tags",
"displayName": "Media Entry Tag",
"description": ""
},
"options": {
"draftAndPublish": true
},
"pluginOptions": {},
"attributes": {
"tagId": {
"type": "string",
"required": true,
"unique": true
},
"displayName": {
"type": "string"
},
"category": {
"type": "string"
},
"description": {
"type": "text"
}
}
}

View file

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

View file

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

View file

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

View file

@ -12,12 +12,6 @@
},
"pluginOptions": {},
"attributes": {
"tags": {
"displayName": "EntryTagCollection",
"type": "component",
"repeatable": true,
"component": "default.entry-tag-collection"
},
"entries": {
"type": "relation",
"relation": "manyToMany",

View file

@ -1,18 +0,0 @@
{
"collectionName": "components_default_entry_tag_collections",
"info": {
"displayName": "EntryTagCollection"
},
"options": {},
"attributes": {
"key": {
"type": "string"
},
"value": {
"displayName": "EntryTag",
"type": "component",
"repeatable": false,
"component": "default.entry-tag"
}
}
}

View file

@ -1,15 +0,0 @@
{
"collectionName": "components_default_entry_tags",
"info": {
"displayName": "EntryTag"
},
"options": {},
"attributes": {
"category": {
"type": "string"
},
"displayName": {
"type": "string"
}
}
}