Sensors: Radiation

This commit is contained in:
He4eT 2025-04-01 22:17:43 +02:00
commit 751d8f7c63
5 changed files with 121 additions and 0 deletions

View file

@ -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"
}
}
}

View file

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

View file

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

View file

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

View file

@ -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;