added some more entities for work demo
This commit is contained in:
+18
-2
@@ -10,6 +10,12 @@
|
||||
#include "work/admin/UserDirectory.hpp"
|
||||
#include "work/admin/UserSession.hpp"
|
||||
|
||||
#include "work/jobs/Job.hpp"
|
||||
#include "work/jobs/Task.hpp""
|
||||
#include "work/jobs/Payload.hpp"
|
||||
#include "work/jobs/IdPayload.hpp"
|
||||
#include "work/jobs/IdListPayload.hpp"
|
||||
|
||||
#include "matador/object/schema.hpp"
|
||||
|
||||
#include "matador/sql/connection.hpp"
|
||||
@@ -20,7 +26,7 @@ using namespace matador;
|
||||
using namespace work::models;
|
||||
|
||||
int main() {
|
||||
object::schema schema;
|
||||
object::schema schema("Administration");
|
||||
|
||||
auto result = schema.attach<admin::CollectionCenter>("collection_center")
|
||||
.and_then([&schema] { return schema.attach<admin::InternalUserDirectory>("internal_user_directory"); })
|
||||
@@ -32,7 +38,12 @@ int main() {
|
||||
.and_then([&schema] { return schema.attach<admin::Scenario>("scenario"); })
|
||||
.and_then([&schema] { return schema.attach<admin::User>("user"); })
|
||||
.and_then([&schema] { return schema.attach<admin::UserDirectory>("user_directory"); })
|
||||
.and_then([&schema] { return schema.attach<admin::UserSession>("user_session"); });
|
||||
.and_then([&schema] { return schema.attach<admin::UserSession>("user_session"); })
|
||||
.and_then([&schema] { return schema.attach<jobs::Job>("jobs"); })
|
||||
.and_then([&schema] { return schema.attach<jobs::Payload>("id_payloads"); })
|
||||
.and_then([&schema] { return schema.attach<jobs::IdPayload>("id_list_payloads"); })
|
||||
.and_then([&schema] { return schema.attach<jobs::IdListPayload>("payloads"); })
|
||||
.and_then([&schema] { return schema.attach<jobs::Task>("tasks"); });
|
||||
|
||||
if (!result.is_ok()) {
|
||||
return 0;
|
||||
@@ -51,3 +62,8 @@ int main() {
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
// registering table 'collection_center' (pk field: 'id')
|
||||
// registering relation table 'collection_center_users' (first fk field: 'collection_center_id', second fk field: 'user_id')
|
||||
// registering table 'internal_user_directory' (pk field: 'id')
|
||||
//
|
||||
Reference in New Issue
Block a user