verion which did not include the handling in RTService wth creating the

Json file
This commit is contained in:
2024-06-25 20:50:29 +02:00
parent 2650679989
commit 5285f8b26e
215 changed files with 26816 additions and 219 deletions

View File

@@ -0,0 +1,25 @@
#ifndef VRPMDV_INPUTMONITORINGDTO_HPP
#define VRPMDV_INPUTMONITORINGDTO_HPP
#include "oatpp/core/macro/codegen.hpp"
#include "oatpp/core/Types.hpp"
#include "MonStatusEnum.hpp"
#include OATPP_CODEGEN_BEGIN(DTO)
class InputMonitoringDto : public oatpp::DTO {
DTO_INIT(InputMonitoringDto, DTO)
DTO_FIELD(String, name, "name");
DTO_FIELD(String, samplerate, "samplerate");
DTO_FIELD(String, sampleperiod, "sampleperiod");
DTO_FIELD(String, downtime, "downtime");
DTO_FIELD(String, owner, "owner");
DTO_FIELD(Enum<MonStatus>::AsString, status, "status");
};
#include OATPP_CODEGEN_END(DTO)
#endif /* UserDto_hpp */

View File

@@ -0,0 +1,18 @@
#ifndef VRPMDV_MONSTATUSENUM_HPP
#define VRPMDV_MONSTATUSENUM_HPP
#include "oatpp/core/macro/codegen.hpp"
#include "oatpp/core/Types.hpp"
#include OATPP_CODEGEN_BEGIN(DTO)
ENUM(MonStatus, v_int32,
VALUE(DEACTIVATED, 0, "off"),
VALUE(STOPPED, 1, "stopped"),
VALUE(STARTED, 2, "started")
)
#include OATPP_CODEGEN_END(DTO)
#endif /* UserDto_hpp */

View File

@@ -0,0 +1,26 @@
#ifndef VRPMDV_MONITORINGDTO_HPP
#define VRPMDV_MONITORINGDTO_HPP
#include "oatpp/core/macro/codegen.hpp"
#include "oatpp/core/Types.hpp"
#include "MonStatusEnum.hpp"
#include OATPP_CODEGEN_BEGIN(DTO)
class MonitoringDto : public oatpp::DTO {
DTO_INIT(MonitoringDto, DTO)
DTO_FIELD(Int32, id);
DTO_FIELD(String, name, "name");
DTO_FIELD(String, samplerate, "samplerate");
DTO_FIELD(String, sampleperiod, "sampleperiod");
DTO_FIELD(String, downtime, "downtime");
//DTO_FIELD(String, owner, "owner");
DTO_FIELD(Enum<MonStatus>::AsString, status, "status");
DTO_FIELD(String, created_at, "created_at");
};
#include OATPP_CODEGEN_END(DTO)
#endif /* UserDto_hpp */

View File

@@ -0,0 +1,48 @@
#ifndef VRPMDV_PAGEDTO_HPP
#define VRPMDV_PAGEDTO_HPP
#include "UserDto.hpp"
#include "MonitoringDto.hpp"
#include OATPP_CODEGEN_BEGIN(DTO)
template<class T>
class PageDto : public oatpp::DTO {
DTO_INIT(PageDto, DTO)
DTO_FIELD(UInt32, offset);
DTO_FIELD(UInt32, limit);
DTO_FIELD(UInt32, count);
DTO_FIELD(Vector<T>, items);
};
template<class T>
class MonPageDto : public oatpp::DTO {
DTO_INIT(MonPageDto, DTO)
DTO_FIELD(Vector<T>, items);
};
class UsersPageDto : public PageDto<oatpp::Object<UserDto>> {
DTO_INIT(UsersPageDto, PageDto<oatpp::Object<UserDto>>)
};
class MonitoringsPageDto : public MonPageDto<oatpp::Object<MonitoringDto>> {
DTO_INIT(MonitoringsPageDto, MonPageDto<oatpp::Object<MonitoringDto>>)
};
#include OATPP_CODEGEN_END(DTO)
#endif //CRUD_PAGEDTO_HPP

View File

@@ -0,0 +1,33 @@
#ifndef VRPMDV_STATUSDTO_HPP
#define VRPMDV_STATUSDTO_HPP
#include "oatpp/core/macro/codegen.hpp"
#include "oatpp/core/Types.hpp"
#include OATPP_CODEGEN_BEGIN(DTO)
class StatusDto : public oatpp::DTO {
DTO_INIT(StatusDto, DTO)
DTO_FIELD_INFO(status) {
info->description = "Short status text";
}
DTO_FIELD(String, status);
DTO_FIELD_INFO(code) {
info->description = "Status code";
}
DTO_FIELD(Int32, code);
DTO_FIELD_INFO(message) {
info->description = "Verbose message";
}
DTO_FIELD(String, message);
};
#include OATPP_CODEGEN_END(DTO)
#endif //CRUD_STATUSDTO_HPP

View File

@@ -0,0 +1,28 @@
#ifndef VRPMDV_USERDTO_HPP
#define VRPMDV_USERDTO_HPP
#include "oatpp/core/macro/codegen.hpp"
#include "oatpp/core/Types.hpp"
#include OATPP_CODEGEN_BEGIN(DTO)
ENUM(Role, v_int32,
VALUE(GUEST, 0, "ROLE_GUEST"),
VALUE(ADMIN, 1, "ROLE_ADMIN")
)
class UserDto : public oatpp::DTO {
DTO_INIT(UserDto, DTO)
DTO_FIELD(Int32, id);
DTO_FIELD(String, userName, "username");
DTO_FIELD(String, email, "email");
DTO_FIELD(String, password, "password");
DTO_FIELD(Enum<Role>::AsString, role, "role");
};
#include OATPP_CODEGEN_END(DTO)
#endif /* UserDto_hpp */