State: init

This commit is contained in:
He4eT 2025-03-27 09:51:14 +01:00
commit fab7c1eb05
5 changed files with 81 additions and 0 deletions

View file

@ -0,0 +1,33 @@
{
"kind": "singleType",
"collectionName": "states",
"info": {
"singularName": "state",
"pluralName": "states",
"displayName": "State",
"description": ""
},
"options": {
"draftAndPublish": false
},
"attributes": {
"open": {
"type": "boolean",
"default": false
},
"lastchange": {
"type": "biginteger"
},
"trigger_person": {
"type": "string"
},
"message": {
"type": "string"
},
"icon": {
"type": "component",
"repeatable": false,
"component": "state.state-icon"
}
}
}

View file

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

View file

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

View file

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

View file

@ -0,0 +1,27 @@
{
"collectionName": "components_state_state_icons",
"info": {
"displayName": "State Icons",
"icon": "lock",
"description": ""
},
"options": {},
"attributes": {
"open": {
"type": "media",
"multiple": false,
"required": true,
"allowedTypes": [
"images"
]
},
"closed": {
"type": "media",
"multiple": false,
"required": true,
"allowedTypes": [
"images"
]
}
}
}