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');

View File

@@ -0,0 +1,21 @@
{
"kind": "singleType",
"collectionName": "home_pages",
"info": {
"singularName": "home-page",
"pluralName": "home-pages",
"displayName": "Home Page"
},
"options": {
"draftAndPublish": true
},
"pluginOptions": {},
"attributes": {
"sections": {
"type": "dynamiczone",
"components": [
"sections.home-hero"
]
}
}
}

View File

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

View File

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

View File

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

View File

@@ -0,0 +1,22 @@
{
"kind": "singleType",
"collectionName": "site_configs",
"info": {
"singularName": "site-config",
"pluralName": "site-configs",
"displayName": "Site config"
},
"options": {
"draftAndPublish": true
},
"pluginOptions": {},
"attributes": {
"title": {
"type": "string",
"required": true
},
"description": {
"type": "text"
}
}
}

View File

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

View File

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

View File

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

View File

@@ -0,0 +1,36 @@
{
"kind": "collectionType",
"collectionName": "vendors",
"info": {
"singularName": "vendor",
"pluralName": "vendors",
"displayName": "Vendor"
},
"options": {
"draftAndPublish": true
},
"pluginOptions": {},
"attributes": {
"slug": {
"type": "uid",
"required": true
},
"title": {
"type": "string"
},
"description": {
"type": "text"
},
"products": {
"type": "component",
"component": "shared.product",
"repeatable": true
},
"categories": {
"type": "relation",
"relation": "manyToMany",
"target": "api::category.category",
"mappedBy": "vendors"
}
}
}

7
src/api/vendor/controllers/vendor.ts vendored Normal file
View File

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

7
src/api/vendor/routes/vendor.ts vendored Normal file
View File

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

7
src/api/vendor/services/vendor.ts vendored Normal file
View File

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

View File

@@ -0,0 +1,24 @@
{
"collectionName": "components_sections_home_heroes",
"info": {
"displayName": "HomeHero"
},
"options": {},
"attributes": {
"title": {
"type": "string"
},
"description": {
"type": "text"
},
"badge": {
"type": "string"
},
"stats": {
"type": "component",
"component": "shared.attribute",
"repeatable": true
}
},
"config": {}
}

View File

@@ -0,0 +1,18 @@
{
"collectionName": "components_shared_attributes",
"info": {
"displayName": "Attribute"
},
"options": {},
"attributes": {
"key": {
"type": "string",
"required": false
},
"value": {
"type": "string",
"required": false
}
},
"config": {}
}

View File

@@ -0,0 +1,14 @@
{
"collectionName": "components_shared_products",
"info": {
"displayName": "Product"
},
"options": {},
"attributes": {
"title": {
"type": "string",
"required": true
}
},
"config": {}
}