mirror of
https://github.com/He4eT/simple-spaceapi.git
synced 2026-05-04 17:37:24 +00:00
State: init
This commit is contained in:
parent
e222f39b90
commit
fab7c1eb05
5 changed files with 81 additions and 0 deletions
33
src/api/state/content-types/state/schema.json
Normal file
33
src/api/state/content-types/state/schema.json
Normal 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"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
7
src/api/state/controllers/state.ts
Normal file
7
src/api/state/controllers/state.ts
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
/**
|
||||||
|
* state controller
|
||||||
|
*/
|
||||||
|
|
||||||
|
import { factories } from '@strapi/strapi'
|
||||||
|
|
||||||
|
export default factories.createCoreController('api::state.state');
|
||||||
7
src/api/state/routes/state.ts
Normal file
7
src/api/state/routes/state.ts
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
/**
|
||||||
|
* state router
|
||||||
|
*/
|
||||||
|
|
||||||
|
import { factories } from '@strapi/strapi';
|
||||||
|
|
||||||
|
export default factories.createCoreRouter('api::state.state');
|
||||||
7
src/api/state/services/state.ts
Normal file
7
src/api/state/services/state.ts
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
/**
|
||||||
|
* state service
|
||||||
|
*/
|
||||||
|
|
||||||
|
import { factories } from '@strapi/strapi';
|
||||||
|
|
||||||
|
export default factories.createCoreService('api::state.state');
|
||||||
27
src/components/state/state-icon.json
Normal file
27
src/components/state/state-icon.json
Normal 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"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue