mirror of
https://github.com/He4eT/simple-spaceapi.git
synced 2026-05-05 01:47:24 +00:00
Sensors: Radiation
This commit is contained in:
parent
ec72ab67ce
commit
751d8f7c63
5 changed files with 121 additions and 0 deletions
|
|
@ -0,0 +1,57 @@
|
|||
{
|
||||
"kind": "collectionType",
|
||||
"collectionName": "radiation_sensors",
|
||||
"info": {
|
||||
"singularName": "radiation-sensor",
|
||||
"pluralName": "radiation-sensors",
|
||||
"displayName": "Sensor: Radiation"
|
||||
},
|
||||
"options": {
|
||||
"draftAndPublish": false
|
||||
},
|
||||
"attributes": {
|
||||
"type": {
|
||||
"type": "enumeration",
|
||||
"enum": [
|
||||
"alpha",
|
||||
"beta",
|
||||
"gamma",
|
||||
"beta_gamma"
|
||||
]
|
||||
},
|
||||
"value": {
|
||||
"type": "decimal",
|
||||
"required": true
|
||||
},
|
||||
"unit": {
|
||||
"type": "enumeration",
|
||||
"enum": [
|
||||
"cpm",
|
||||
"r/h",
|
||||
"µSv/h",
|
||||
"mSv/a",
|
||||
"µSv/a"
|
||||
],
|
||||
"required": true
|
||||
},
|
||||
"dead_time": {
|
||||
"type": "decimal"
|
||||
},
|
||||
"conversion_factor": {
|
||||
"type": "decimal"
|
||||
},
|
||||
"location": {
|
||||
"type": "string",
|
||||
"required": true
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": {
|
||||
"type": "text"
|
||||
},
|
||||
"lastchange": {
|
||||
"type": "biginteger"
|
||||
}
|
||||
}
|
||||
}
|
||||
7
src/api/radiation-sensor/controllers/radiation-sensor.ts
Normal file
7
src/api/radiation-sensor/controllers/radiation-sensor.ts
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
/**
|
||||
* radiation-sensor controller
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi'
|
||||
|
||||
export default factories.createCoreController('api::radiation-sensor.radiation-sensor');
|
||||
7
src/api/radiation-sensor/routes/radiation-sensor.ts
Normal file
7
src/api/radiation-sensor/routes/radiation-sensor.ts
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
/**
|
||||
* radiation-sensor router
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi';
|
||||
|
||||
export default factories.createCoreRouter('api::radiation-sensor.radiation-sensor');
|
||||
7
src/api/radiation-sensor/services/radiation-sensor.ts
Normal file
7
src/api/radiation-sensor/services/radiation-sensor.ts
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
/**
|
||||
* radiation-sensor service
|
||||
*/
|
||||
|
||||
import { factories } from '@strapi/strapi';
|
||||
|
||||
export default factories.createCoreService('api::radiation-sensor.radiation-sensor');
|
||||
43
types/generated/contentTypes.d.ts
vendored
43
types/generated/contentTypes.d.ts
vendored
|
|
@ -540,6 +540,48 @@ export interface ApiHackspaceHackspace extends Struct.SingleTypeSchema {
|
|||
};
|
||||
}
|
||||
|
||||
export interface ApiRadiationSensorRadiationSensor
|
||||
extends Struct.CollectionTypeSchema {
|
||||
collectionName: 'radiation_sensors';
|
||||
info: {
|
||||
displayName: 'Sensor: Radiation';
|
||||
pluralName: 'radiation-sensors';
|
||||
singularName: 'radiation-sensor';
|
||||
};
|
||||
options: {
|
||||
draftAndPublish: false;
|
||||
};
|
||||
attributes: {
|
||||
conversion_factor: Schema.Attribute.Decimal;
|
||||
createdAt: Schema.Attribute.DateTime;
|
||||
createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
|
||||
Schema.Attribute.Private;
|
||||
dead_time: Schema.Attribute.Decimal;
|
||||
description: Schema.Attribute.Text;
|
||||
lastchange: Schema.Attribute.BigInteger;
|
||||
locale: Schema.Attribute.String & Schema.Attribute.Private;
|
||||
localizations: Schema.Attribute.Relation<
|
||||
'oneToMany',
|
||||
'api::radiation-sensor.radiation-sensor'
|
||||
> &
|
||||
Schema.Attribute.Private;
|
||||
location: Schema.Attribute.String & Schema.Attribute.Required;
|
||||
name: Schema.Attribute.String;
|
||||
publishedAt: Schema.Attribute.DateTime;
|
||||
type: Schema.Attribute.Enumeration<
|
||||
['alpha', 'beta', 'gamma', 'beta_gamma']
|
||||
>;
|
||||
unit: Schema.Attribute.Enumeration<
|
||||
['cpm', 'r/h', '\u00B5Sv/h', 'mSv/a', '\u00B5Sv/a']
|
||||
> &
|
||||
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 ApiStateState extends Struct.SingleTypeSchema {
|
||||
collectionName: 'states';
|
||||
info: {
|
||||
|
|
@ -1131,6 +1173,7 @@ declare module '@strapi/strapi' {
|
|||
'api::door-locked-sensor.door-locked-sensor': ApiDoorLockedSensorDoorLockedSensor;
|
||||
'api::event.event': ApiEventEvent;
|
||||
'api::hackspace.hackspace': ApiHackspaceHackspace;
|
||||
'api::radiation-sensor.radiation-sensor': ApiRadiationSensorRadiationSensor;
|
||||
'api::state.state': ApiStateState;
|
||||
'api::temperature-sensor.temperature-sensor': ApiTemperatureSensorTemperatureSensor;
|
||||
'plugin::content-releases.release': PluginContentReleasesRelease;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue