Sensor: People Now Present

This commit is contained in:
He4eT 2025-04-02 00:51:13 +02:00
commit 8798126dc4
7 changed files with 122 additions and 0 deletions

View file

@ -0,0 +1,37 @@
{
"kind": "collectionType",
"collectionName": "people_now_present_sensors",
"info": {
"singularName": "people-now-present-sensor",
"pluralName": "people-now-present-sensors",
"displayName": "Sensor: People Now Present",
"description": ""
},
"options": {
"draftAndPublish": true
},
"attributes": {
"value": {
"type": "integer",
"required": true
},
"location": {
"type": "string",
"required": true
},
"name": {
"type": "string"
},
"names": {
"type": "component",
"repeatable": true,
"component": "location.person"
},
"description": {
"type": "text"
},
"lastchange": {
"type": "biginteger"
}
}
}

View file

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

View file

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

View file

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

View file

@ -0,0 +1,15 @@
{
"collectionName": "components_location_people",
"info": {
"displayName": "Person",
"icon": "emotionHappy",
"description": ""
},
"options": {},
"attributes": {
"name": {
"type": "string",
"required": true
}
}
}

View file

@ -167,6 +167,18 @@ export interface LocationArea extends Struct.ComponentSchema {
};
}
export interface LocationPerson extends Struct.ComponentSchema {
collectionName: 'components_location_people';
info: {
description: '';
displayName: 'Person';
icon: 'emotionHappy';
};
attributes: {
name: Schema.Attribute.String & Schema.Attribute.Required;
};
}
export interface MembershipPlans extends Struct.ComponentSchema {
collectionName: 'components_membership_plans';
info: {
@ -281,6 +293,7 @@ declare module '@strapi/strapi' {
'hackspace.project': HackspaceProject;
'hackspace.spacefed': HackspaceSpacefed;
'location.area': LocationArea;
'location.person': LocationPerson;
'membership.plans': MembershipPlans;
'network.machine': NetworkMachine;
'state.state-icon': StateStateIcon;

View file

@ -681,6 +681,41 @@ export interface ApiNetworkConnectionsSensorNetworkConnectionsSensor
};
}
export interface ApiPeopleNowPresentSensorPeopleNowPresentSensor
extends Struct.CollectionTypeSchema {
collectionName: 'people_now_present_sensors';
info: {
description: '';
displayName: 'Sensor: People Now Present';
pluralName: 'people-now-present-sensors';
singularName: 'people-now-present-sensor';
};
options: {
draftAndPublish: true;
};
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::people-now-present-sensor.people-now-present-sensor'
> &
Schema.Attribute.Private;
location: Schema.Attribute.String & Schema.Attribute.Required;
name: Schema.Attribute.String;
names: Schema.Attribute.Component<'location.person', true>;
publishedAt: Schema.Attribute.DateTime;
updatedAt: Schema.Attribute.DateTime;
updatedBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &
Schema.Attribute.Private;
value: Schema.Attribute.Integer & Schema.Attribute.Required;
};
}
export interface ApiPowerConsumptionSensorPowerConsumptionSensor
extends Struct.CollectionTypeSchema {
collectionName: 'power_consumption_sensors';
@ -1453,6 +1488,7 @@ declare module '@strapi/strapi' {
'api::hackspace.hackspace': ApiHackspaceHackspace;
'api::humidity-sensor.humidity-sensor': ApiHumiditySensorHumiditySensor;
'api::network-connections-sensor.network-connections-sensor': ApiNetworkConnectionsSensorNetworkConnectionsSensor;
'api::people-now-present-sensor.people-now-present-sensor': ApiPeopleNowPresentSensorPeopleNowPresentSensor;
'api::power-consumption-sensor.power-consumption-sensor': ApiPowerConsumptionSensorPowerConsumptionSensor;
'api::power-generation-sensor.power-generation-sensor': ApiPowerGenerationSensorPowerGenerationSensor;
'api::radiation-sensor.radiation-sensor': ApiRadiationSensorRadiationSensor;