mirror of
https://github.com/He4eT/simple-spaceapi.git
synced 2026-05-05 01:47:24 +00:00
Sensors: Power Consumption
This commit is contained in:
parent
4ece4eb1c0
commit
94b1667f85
5 changed files with 95 additions and 0 deletions
|
|
@ -0,0 +1,39 @@
|
||||||
|
{
|
||||||
|
"kind": "collectionType",
|
||||||
|
"collectionName": "power_consumption_sensors",
|
||||||
|
"info": {
|
||||||
|
"singularName": "power-consumption-sensor",
|
||||||
|
"pluralName": "power-consumption-sensors",
|
||||||
|
"displayName": "Sensor: Power Consumption"
|
||||||
|
},
|
||||||
|
"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-consumption-sensor controller
|
||||||
|
*/
|
||||||
|
|
||||||
|
import { factories } from '@strapi/strapi'
|
||||||
|
|
||||||
|
export default factories.createCoreController('api::power-consumption-sensor.power-consumption-sensor');
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
/**
|
||||||
|
* power-consumption-sensor router
|
||||||
|
*/
|
||||||
|
|
||||||
|
import { factories } from '@strapi/strapi';
|
||||||
|
|
||||||
|
export default factories.createCoreRouter('api::power-consumption-sensor.power-consumption-sensor');
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
/**
|
||||||
|
* power-consumption-sensor service
|
||||||
|
*/
|
||||||
|
|
||||||
|
import { factories } from '@strapi/strapi';
|
||||||
|
|
||||||
|
export default factories.createCoreService('api::power-consumption-sensor.power-consumption-sensor');
|
||||||
35
types/generated/contentTypes.d.ts
vendored
35
types/generated/contentTypes.d.ts
vendored
|
|
@ -611,6 +611,40 @@ export interface ApiHumiditySensorHumiditySensor
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface ApiPowerConsumptionSensorPowerConsumptionSensor
|
||||||
|
extends Struct.CollectionTypeSchema {
|
||||||
|
collectionName: 'power_consumption_sensors';
|
||||||
|
info: {
|
||||||
|
displayName: 'Sensor: Power Consumption';
|
||||||
|
pluralName: 'power-consumption-sensors';
|
||||||
|
singularName: 'power-consumption-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-consumption-sensor.power-consumption-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
|
export interface ApiRadiationSensorRadiationSensor
|
||||||
extends Struct.CollectionTypeSchema {
|
extends Struct.CollectionTypeSchema {
|
||||||
collectionName: 'radiation_sensors';
|
collectionName: 'radiation_sensors';
|
||||||
|
|
@ -1246,6 +1280,7 @@ declare module '@strapi/strapi' {
|
||||||
'api::event.event': ApiEventEvent;
|
'api::event.event': ApiEventEvent;
|
||||||
'api::hackspace.hackspace': ApiHackspaceHackspace;
|
'api::hackspace.hackspace': ApiHackspaceHackspace;
|
||||||
'api::humidity-sensor.humidity-sensor': ApiHumiditySensorHumiditySensor;
|
'api::humidity-sensor.humidity-sensor': ApiHumiditySensorHumiditySensor;
|
||||||
|
'api::power-consumption-sensor.power-consumption-sensor': ApiPowerConsumptionSensorPowerConsumptionSensor;
|
||||||
'api::radiation-sensor.radiation-sensor': ApiRadiationSensorRadiationSensor;
|
'api::radiation-sensor.radiation-sensor': ApiRadiationSensorRadiationSensor;
|
||||||
'api::state.state': ApiStateState;
|
'api::state.state': ApiStateState;
|
||||||
'api::temperature-sensor.temperature-sensor': ApiTemperatureSensorTemperatureSensor;
|
'api::temperature-sensor.temperature-sensor': ApiTemperatureSensorTemperatureSensor;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue