add content, add swagger

This commit is contained in:
Zotov Ivan Yuryevich
2026-04-05 15:06:27 +03:00
parent 981a01e8ef
commit 2ed71cfa30
24 changed files with 11889 additions and 11 deletions

View File

@@ -0,0 +1,47 @@
{
"kind": "collectionType",
"collectionName": "categories",
"info": {
"singularName": "category",
"pluralName": "categories",
"displayName": "Category"
},
"options": {
"draftAndPublish": true
},
"pluginOptions": {},
"attributes": {
"slug": {
"type": "uid",
"required": true
},
"title": {
"type": "string"
},
"description": {
"type": "text"
},
"comment": {
"type": "string"
},
"group": {
"type": "enumeration",
"required": true,
"enum": [
"service",
"solution"
]
},
"sortOrder": {
"type": "integer",
"required": true,
"default": 0
},
"vendors": {
"type": "relation",
"relation": "manyToMany",
"target": "api::vendor.vendor",
"inversedBy": "categories"
}
}
}

View File

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

View File

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

View File

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