mirror of
https://github.com/Telecominfraproject/wlan-cloud-owprov.git
synced 2025-10-29 09:42:38 +00:00
Adding some fields and venues for entities.
This commit is contained in:
@@ -148,6 +148,12 @@ components:
|
|||||||
items:
|
items:
|
||||||
type: string
|
type: string
|
||||||
format: uuid
|
format: uuid
|
||||||
|
venues:
|
||||||
|
description: The list of UUID of the venues for this entity
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
type: string
|
||||||
|
format: uuid
|
||||||
contacts:
|
contacts:
|
||||||
description: The list of UUID of the contacts for the entity
|
description: The list of UUID of the contacts for the entity
|
||||||
type: array
|
type: array
|
||||||
@@ -360,6 +366,8 @@ components:
|
|||||||
subVenue:
|
subVenue:
|
||||||
type: string
|
type: string
|
||||||
format: uuid
|
format: uuid
|
||||||
|
qrCode:
|
||||||
|
type: string
|
||||||
|
|
||||||
InventoryTagList:
|
InventoryTagList:
|
||||||
type: object
|
type: object
|
||||||
@@ -506,7 +514,7 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
format: uuid
|
format: uuid
|
||||||
example: When creating the root entity, the uuid 0000-0000-0000 must be entered.
|
example: When creating the root entity, the uuid 0000-0000-0000 must be entered. When creating a non-root entity, uuid must be 1
|
||||||
required: true
|
required: true
|
||||||
requestBody:
|
requestBody:
|
||||||
description: Information used to create the new entity
|
description: Information used to create the new entity
|
||||||
|
|||||||
@@ -265,6 +265,7 @@ namespace OpenWifi::ProvObjects {
|
|||||||
uCentral::RESTAPI_utils::field_to_json(Obj, "subVenue", subVenue);
|
uCentral::RESTAPI_utils::field_to_json(Obj, "subVenue", subVenue);
|
||||||
uCentral::RESTAPI_utils::field_to_json(Obj, "subscriber", subscriber);
|
uCentral::RESTAPI_utils::field_to_json(Obj, "subscriber", subscriber);
|
||||||
uCentral::RESTAPI_utils::field_to_json(Obj, "deviceType", deviceType);
|
uCentral::RESTAPI_utils::field_to_json(Obj, "deviceType", deviceType);
|
||||||
|
uCentral::RESTAPI_utils::field_to_json(Obj, "qrCode", qrCode);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool InventoryTag::from_json(const Poco::JSON::Object::Ptr &Obj) {
|
bool InventoryTag::from_json(const Poco::JSON::Object::Ptr &Obj) {
|
||||||
@@ -277,6 +278,7 @@ namespace OpenWifi::ProvObjects {
|
|||||||
uCentral::RESTAPI_utils::field_from_json( Obj,"subVenue",subVenue);
|
uCentral::RESTAPI_utils::field_from_json( Obj,"subVenue",subVenue);
|
||||||
uCentral::RESTAPI_utils::field_from_json( Obj,"subscriber",subscriber);
|
uCentral::RESTAPI_utils::field_from_json( Obj,"subscriber",subscriber);
|
||||||
uCentral::RESTAPI_utils::field_from_json( Obj,"deviceType",deviceType);
|
uCentral::RESTAPI_utils::field_from_json( Obj,"deviceType",deviceType);
|
||||||
|
uCentral::RESTAPI_utils::field_from_json( Obj,"qrCode",qrCode);
|
||||||
return true;
|
return true;
|
||||||
} catch(...) {
|
} catch(...) {
|
||||||
|
|
||||||
|
|||||||
@@ -233,6 +233,7 @@ namespace OpenWifi::ProvObjects {
|
|||||||
std::string subVenue;
|
std::string subVenue;
|
||||||
std::string subscriber;
|
std::string subscriber;
|
||||||
std::string deviceType;
|
std::string deviceType;
|
||||||
|
std::string qrCode;
|
||||||
|
|
||||||
void to_json(Poco::JSON::Object &Obj) const;
|
void to_json(Poco::JSON::Object &Obj) const;
|
||||||
bool from_json(const Poco::JSON::Object::Ptr &Obj);
|
bool from_json(const Poco::JSON::Object::Ptr &Obj);
|
||||||
|
|||||||
@@ -23,7 +23,8 @@ namespace OpenWifi {
|
|||||||
ORM::Field{"managers",ORM::FieldType::FT_TEXT},
|
ORM::Field{"managers",ORM::FieldType::FT_TEXT},
|
||||||
ORM::Field{"contacts",ORM::FieldType::FT_TEXT},
|
ORM::Field{"contacts",ORM::FieldType::FT_TEXT},
|
||||||
ORM::Field{"locations",ORM::FieldType::FT_TEXT},
|
ORM::Field{"locations",ORM::FieldType::FT_TEXT},
|
||||||
ORM::Field{"managementPolicy",ORM::FieldType::FT_TEXT}
|
ORM::Field{"managementPolicy",ORM::FieldType::FT_TEXT},
|
||||||
|
ORM::Field{"venues",ORM::FieldType::FT_TEXT},
|
||||||
};
|
};
|
||||||
|
|
||||||
static ORM::IndexVec EntityDB_Indexes{
|
static ORM::IndexVec EntityDB_Indexes{
|
||||||
@@ -51,6 +52,7 @@ template<> void ORM::DB< OpenWifi::EntityDBRecordType, OpenWifi::ProvObjects:
|
|||||||
uCentral::Types::from_string(In.get<9>(), Out.contacts);
|
uCentral::Types::from_string(In.get<9>(), Out.contacts);
|
||||||
uCentral::Types::from_string(In.get<10>(), Out.locations);
|
uCentral::Types::from_string(In.get<10>(), Out.locations);
|
||||||
Out.managementPolicy = In.get<11>();
|
Out.managementPolicy = In.get<11>();
|
||||||
|
uCentral::Types::from_string(In.get<12>(), Out.venues);
|
||||||
}
|
}
|
||||||
|
|
||||||
template<> void ORM::DB< OpenWifi::EntityDBRecordType, OpenWifi::ProvObjects::Entity>::Convert(OpenWifi::ProvObjects::Entity &In, OpenWifi::EntityDBRecordType &Out) {
|
template<> void ORM::DB< OpenWifi::EntityDBRecordType, OpenWifi::ProvObjects::Entity>::Convert(OpenWifi::ProvObjects::Entity &In, OpenWifi::EntityDBRecordType &Out) {
|
||||||
@@ -66,4 +68,5 @@ template<> void ORM::DB< OpenWifi::EntityDBRecordType, OpenWifi::ProvObjects:
|
|||||||
Out.set<9>(uCentral::Types::to_string(In.contacts));
|
Out.set<9>(uCentral::Types::to_string(In.contacts));
|
||||||
Out.set<10>(uCentral::Types::to_string(In.locations));
|
Out.set<10>(uCentral::Types::to_string(In.locations));
|
||||||
Out.set<11>(In.managementPolicy);
|
Out.set<11>(In.managementPolicy);
|
||||||
|
Out.set<12>(uCentral::Types::to_string(In.venues));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ namespace OpenWifi {
|
|||||||
std::string,
|
std::string,
|
||||||
std::string,
|
std::string,
|
||||||
std::string,
|
std::string,
|
||||||
|
std::string,
|
||||||
std::string
|
std::string
|
||||||
> EntityDBRecordType;
|
> EntityDBRecordType;
|
||||||
|
|
||||||
|
|||||||
@@ -23,7 +23,8 @@ namespace OpenWifi {
|
|||||||
ORM::Field{"entity",ORM::FieldType::FT_TEXT},
|
ORM::Field{"entity",ORM::FieldType::FT_TEXT},
|
||||||
ORM::Field{"subEntity",ORM::FieldType::FT_TEXT},
|
ORM::Field{"subEntity",ORM::FieldType::FT_TEXT},
|
||||||
ORM::Field{"subVenue",ORM::FieldType::FT_TEXT},
|
ORM::Field{"subVenue",ORM::FieldType::FT_TEXT},
|
||||||
ORM::Field{"deviceType",ORM::FieldType::FT_TEXT}
|
ORM::Field{"deviceType",ORM::FieldType::FT_TEXT},
|
||||||
|
ORM::Field{"qrcode",ORM::FieldType::FT_TEXT}
|
||||||
};
|
};
|
||||||
|
|
||||||
static ORM::IndexVec InventoryDB_Indexes{
|
static ORM::IndexVec InventoryDB_Indexes{
|
||||||
@@ -55,6 +56,7 @@ template<> void ORM::DB< OpenWifi::InventoryDBRecordType, OpenWifi::ProvObjec
|
|||||||
Out.subEntity = In.get<9>();
|
Out.subEntity = In.get<9>();
|
||||||
Out.subVenue = In.get<10>();
|
Out.subVenue = In.get<10>();
|
||||||
Out.deviceType = In.get<11>();
|
Out.deviceType = In.get<11>();
|
||||||
|
Out.qrCode = In.get<11>();
|
||||||
}
|
}
|
||||||
|
|
||||||
template<> void ORM::DB< OpenWifi::InventoryDBRecordType, OpenWifi::ProvObjects::InventoryTag>::Convert(OpenWifi::ProvObjects::InventoryTag &In, OpenWifi::InventoryDBRecordType &Out) {
|
template<> void ORM::DB< OpenWifi::InventoryDBRecordType, OpenWifi::ProvObjects::InventoryTag>::Convert(OpenWifi::ProvObjects::InventoryTag &In, OpenWifi::InventoryDBRecordType &Out) {
|
||||||
@@ -70,4 +72,5 @@ template<> void ORM::DB< OpenWifi::InventoryDBRecordType, OpenWifi::ProvObjec
|
|||||||
Out.set<9>(In.subEntity);
|
Out.set<9>(In.subEntity);
|
||||||
Out.set<10>(In.subVenue);
|
Out.set<10>(In.subVenue);
|
||||||
Out.set<11>(In.deviceType);
|
Out.set<11>(In.deviceType);
|
||||||
|
Out.set<11>(In.qrCode);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ namespace OpenWifi {
|
|||||||
std::string,
|
std::string,
|
||||||
std::string,
|
std::string,
|
||||||
std::string,
|
std::string,
|
||||||
|
std::string,
|
||||||
std::string
|
std::string
|
||||||
> InventoryDBRecordType;
|
> InventoryDBRecordType;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user