Add blog collections
parent
498a295dab
commit
875963fe41
@ -0,0 +1,45 @@
|
||||
{
|
||||
"kind": "collectionType",
|
||||
"collectionName": "blog_collections",
|
||||
"info": {
|
||||
"singularName": "blog-collection",
|
||||
"pluralName": "blog-collections",
|
||||
"displayName": "Blog Collection",
|
||||
"description": ""
|
||||
},
|
||||
"options": {
|
||||
"draftAndPublish": true
|
||||
},
|
||||
"pluginOptions": {},
|
||||
"attributes": {
|
||||
"name": {
|
||||
"type": "string",
|
||||
"required": true,
|
||||
"unique": true
|
||||
},
|
||||
"slug": {
|
||||
"type": "uid",
|
||||
"targetField": "name"
|
||||
},
|
||||
"picture": {
|
||||
"type": "media",
|
||||
"multiple": false,
|
||||
"required": false,
|
||||
"allowedTypes": [
|
||||
"images",
|
||||
"files",
|
||||
"videos",
|
||||
"audios"
|
||||
]
|
||||
},
|
||||
"description": {
|
||||
"type": "text"
|
||||
},
|
||||
"posts": {
|
||||
"type": "relation",
|
||||
"relation": "oneToMany",
|
||||
"target": "api::blog-post.blog-post",
|
||||
"mappedBy": "collection"
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* blog-collection controller
|
||||
*/
|
||||
|
||||
const { createCoreController } = require('@strapi/strapi').factories;
|
||||
|
||||
module.exports = createCoreController('api::blog-collection.blog-collection');
|
@ -0,0 +1,9 @@
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* blog-collection router
|
||||
*/
|
||||
|
||||
const { createCoreRouter } = require('@strapi/strapi').factories;
|
||||
|
||||
module.exports = createCoreRouter('api::blog-collection.blog-collection');
|
@ -0,0 +1,9 @@
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* blog-collection service
|
||||
*/
|
||||
|
||||
const { createCoreService } = require('@strapi/strapi').factories;
|
||||
|
||||
module.exports = createCoreService('api::blog-collection.blog-collection');
|
Loading…
Reference in New Issue