add tags to schema
This commit is contained in:
parent
68efe43fbf
commit
9ce4e38301
9 changed files with 89 additions and 72 deletions
|
@ -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"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
/**
|
||||
* media-entry-tag controller
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi'
|
||||
|
||||
export default factories.createCoreController('api::media-entry-tag.media-entry-tag');
|
|
@ -0,0 +1,7 @@
|
|||
/**
|
||||
* media-entry-tag router
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi';
|
||||
|
||||
export default factories.createCoreRouter('api::media-entry-tag.media-entry-tag');
|
|
@ -0,0 +1,7 @@
|
|||
/**
|
||||
* media-entry-tag service
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi';
|
||||
|
||||
export default factories.createCoreService('api::media-entry-tag.media-entry-tag');
|
|
@ -12,12 +12,6 @@
|
|||
},
|
||||
"pluginOptions": {},
|
||||
"attributes": {
|
||||
"tags": {
|
||||
"displayName": "EntryTagCollection",
|
||||
"type": "component",
|
||||
"repeatable": true,
|
||||
"component": "default.entry-tag-collection"
|
||||
},
|
||||
"entries": {
|
||||
"type": "relation",
|
||||
"relation": "manyToMany",
|
||||
|
|
|
@ -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"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,15 +0,0 @@
|
|||
{
|
||||
"collectionName": "components_default_entry_tags",
|
||||
"info": {
|
||||
"displayName": "EntryTag"
|
||||
},
|
||||
"options": {},
|
||||
"attributes": {
|
||||
"category": {
|
||||
"type": "string"
|
||||
},
|
||||
"displayName": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue