mirror of
https://github.com/He4eT/simple-spaceapi.git
synced 2026-05-05 01:47:24 +00:00
Sensors: Power Generation
This commit is contained in:
parent
94b1667f85
commit
27d259b31c
5 changed files with 95 additions and 0 deletions
|
|
@ -0,0 +1,39 @@
|
|||
{
|
||||
"kind": "collectionType",
|
||||
"collectionName": "power_generation_sensors",
|
||||
"info": {
|
||||
"singularName": "power-generation-sensor",
|
||||
"pluralName": "power-generation-sensors",
|
||||
"displayName": "Sensor: Power Generation"
|
||||
},
|
||||
"options": {
|
||||
"draftAndPublish": false
|
||||
},
|
||||
"attributes": {
|
||||
"value": {
|
||||
"type": "decimal",
|
||||
"required": true
|
||||
},
|
||||
"unit": {
|
||||
"type": "enumeration",
|
||||
"enum": [
|
||||
"W",
|
||||
"VA"
|
||||
],
|
||||
"required": true
|
||||
},
|
||||
"location": {
|
||||
"type": "string",
|
||||
"required": true
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": {
|
||||
"type": "text"
|
||||
},
|
||||
"lastchange": {
|
||||
"type": "biginteger"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
/**
|
||||
* power-generation-sensor controller
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi'
|
||||
|
||||
export default factories.createCoreController('api::power-generation-sensor.power-generation-sensor');
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
/**
|
||||
* power-generation-sensor router
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi';
|
||||
|
||||
export default factories.createCoreRouter('api::power-generation-sensor.power-generation-sensor');
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
/**
|
||||
* power-generation-sensor service
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi';
|
||||
|
||||
export default factories.createCoreService('api::power-generation-sensor.power-generation-sensor');
|
||||
35
types/generated/contentTypes.d.ts
vendored
35
types/generated/contentTypes.d.ts
vendored
|
|
@ -645,6 +645,40 @@ export interface ApiPowerConsumptionSensorPowerConsumptionSensor
|
|||
};
|
||||
}
|
||||
|
||||
export interface ApiPowerGenerationSensorPowerGenerationSensor
|
||||
extends Struct.CollectionTypeSchema {
|
||||
collectionName: 'power_generation_sensors';
|
||||
info: {
|
||||
displayName: 'Sensor: Power Generation';
|
||||
pluralName: 'power-generation-sensors';
|
||||
singularName: 'power-generation-sensor';
|
||||
};
|
||||
options: {
|
||||
draftAndPublish: false;
|
||||
};
|
||||
attributes: {
|
||||
createdAt: Schema.Attribute.DateTime;
|
||||
createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
|
||||
Schema.Attribute.Private;
|
||||
description: Schema.Attribute.Text;
|
||||
lastchange: Schema.Attribute.BigInteger;
|
||||
locale: Schema.Attribute.String & Schema.Attribute.Private;
|
||||
localizations: Schema.Attribute.Relation<
|
||||
'oneToMany',
|
||||
'api::power-generation-sensor.power-generation-sensor'
|
||||
> &
|
||||
Schema.Attribute.Private;
|
||||
location: Schema.Attribute.String & Schema.Attribute.Required;
|
||||
name: Schema.Attribute.String;
|
||||
publishedAt: Schema.Attribute.DateTime;
|
||||
unit: Schema.Attribute.Enumeration<['W', 'VA']> & Schema.Attribute.Required;
|
||||
updatedAt: Schema.Attribute.DateTime;
|
||||
updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
|
||||
Schema.Attribute.Private;
|
||||
value: Schema.Attribute.Decimal & Schema.Attribute.Required;
|
||||
};
|
||||
}
|
||||
|
||||
export interface ApiRadiationSensorRadiationSensor
|
||||
extends Struct.CollectionTypeSchema {
|
||||
collectionName: 'radiation_sensors';
|
||||
|
|
@ -1281,6 +1315,7 @@ declare module '@strapi/strapi' {
|
|||
'api::hackspace.hackspace': ApiHackspaceHackspace;
|
||||
'api::humidity-sensor.humidity-sensor': ApiHumiditySensorHumiditySensor;
|
||||
'api::power-consumption-sensor.power-consumption-sensor': ApiPowerConsumptionSensorPowerConsumptionSensor;
|
||||
'api::power-generation-sensor.power-generation-sensor': ApiPowerGenerationSensorPowerGenerationSensor;
|
||||
'api::radiation-sensor.radiation-sensor': ApiRadiationSensorRadiationSensor;
|
||||
'api::state.state': ApiStateState;
|
||||
'api::temperature-sensor.temperature-sensor': ApiTemperatureSensorTemperatureSensor;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue