From 37d3591d6939be520eebdeb0a1f2e854ddb84263 Mon Sep 17 00:00:00 2001 From: Finn Stutzenstein Date: Tue, 11 Aug 2020 07:46:56 +0200 Subject: [PATCH 1/2] Add calculated fields --- docs/example-data.json | 14 ++++++++++---- docs/models.txt | 5 ++++- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/docs/example-data.json b/docs/example-data.json index a49eb81c2..c67c2e8e1 100644 --- a/docs/example-data.json +++ b/docs/example-data.json @@ -10,6 +10,7 @@ "committee_ids": [1], "role_ids": [1], + "superadmin_role_id": 1, "resource_ids": [] }], "user": [ @@ -159,9 +160,9 @@ "id": 1, "name": "Superadmin role", "permissions": [], - "is_superadmin_role": true, "organisation_id": 1, + "superadmin_role_for_organisation_id": 1, "user_ids": [1] }], "resource": [], @@ -318,6 +319,7 @@ "present_user_ids": [1], "temorary_user_ids": [], "guest_ids": [3], + "user_ids": [1, 2, 3], "reference_projector_id": 2, "default_group_id": 1, @@ -1193,6 +1195,7 @@ "sort_child_ids": [], "origin_id": null, "derived_motion_ids": [], + "forwarding_tree_motion_ids": [], "state_id": 1, "recommendation_id": null, "category_id": 2, @@ -1231,9 +1234,10 @@ "lead_motion_id": 1, "amendment_ids": [], "sort_parent_id": null, - "sort_chldren_ids": [], + "sort_child_ids": [], "origin_id": null, "derived_motion_ids": [], + "forwarding_tree_motion_ids": [], "state_id": 1, "recommendation_id": null, "category_id": 1, @@ -1272,9 +1276,10 @@ "lead_motion_id": null, "amendment_ids": [], "sort_parent_id": null, - "sort_chldren_ids": [], + "sort_child_ids": [], "origin_id": null, "derived_motion_ids": [], + "forwarding_tree_motion_ids": [], "state_id": 1, "recommendation_id": null, "category_id": 2, @@ -1313,9 +1318,10 @@ "lead_motion_id": null, "amendment_ids": [], "sort_parent_id": null, - "sort_chldren_ids": [], + "sort_child_ids": [], "origin_id": null, "derived_motion_ids": [], + "forwarding_tree_motion_ids": [], "state_id": 6, "recommendation_id": null, "category_id": null, diff --git a/docs/models.txt b/docs/models.txt index b936b8123..7f8869d3a 100644 --- a/docs/models.txt +++ b/docs/models.txt @@ -37,6 +37,7 @@ Interface organisation { committee_ids: (committee/organisation_id)[]; role_ids: (role/organisation_id)[]; + superadmin_role_id: role/superadmin_role_for_organisation_id; resource_ids: (resource/organisation_id)[]; } @@ -100,9 +101,9 @@ Interface role { id: number; name: string; permissions: string[]; - is_superadmin_role: boolean; organisation_id: organisation/role_ids; + superadmin_role_for_organisation_id: organisation/superadmin_role_id; user_ids: (user/role_id)[]; } @@ -306,6 +307,7 @@ Interface meeting { present_user_ids: (user/is_present_in_meeting_ids)[]; temporary_user_ids: (user/meeting_id)[]; guest_ids: (user/guest_meeting_ids)[]; + user_ids: (Id)[]; // Calculated: All ids from temporary_user_ids, guest_ids and all users assigned to groups. reference_projector_id: projector/used_as_reference_projector_meeting_id; default_group_id: group/default_group_for_meeting_id; @@ -425,6 +427,7 @@ Interface motion { sort_child_ids: (motion/parent_id)[]; origin_id: motion/derived_motion_ids; // Note: The related motions may not be in the same meeting derived_motion_ids: (motion/origin_id)[]; // Note: The related motions may not be in the same meeting + forwarding_tree_motion_ids: (Id)[]; // Calculated: All children (derived_motion_ids), grand children, ... and all parents (origin_id). state_id: motion_state/motion_ids; recommendation_id: motion_state/motion_recommendation_ids; category_id: motion_category/motion_ids; From 5e0eda112d11f51c19e7324383957a7caa3e0277 Mon Sep 17 00:00:00 2001 From: Finn Stutzenstein Date: Tue, 11 Aug 2020 15:14:11 +0200 Subject: [PATCH 2/2] Adding motion recommendation extension references as relations --- docs/example-data.json | 8 ++++++++ docs/models.txt | 2 ++ 2 files changed, 10 insertions(+) diff --git a/docs/example-data.json b/docs/example-data.json index c67c2e8e1..d58c4d700 100644 --- a/docs/example-data.json +++ b/docs/example-data.json @@ -1198,6 +1198,8 @@ "forwarding_tree_motion_ids": [], "state_id": 1, "recommendation_id": null, + "recommendation_extension_reference_ids": [], + "referenced_in_motion_recommendation_extension_ids": [], "category_id": 2, "block_id": null, "submitter_ids": [1], @@ -1240,6 +1242,8 @@ "forwarding_tree_motion_ids": [], "state_id": 1, "recommendation_id": null, + "recommendation_extension_reference_ids": [], + "referenced_in_motion_recommendation_extension_ids": [], "category_id": 1, "block_id": null, "submitter_ids": [2], @@ -1282,6 +1286,8 @@ "forwarding_tree_motion_ids": [], "state_id": 1, "recommendation_id": null, + "recommendation_extension_reference_ids": [], + "referenced_in_motion_recommendation_extension_ids": [], "category_id": 2, "block_id": 1, "submitter_ids": [3], @@ -1311,6 +1317,8 @@ "category_weight": 10000, "state_extension": null, "recommendation_extension": null, + "recommendation_extension_reference_ids": [], + "referenced_in_motion_recommendation_extension_ids": [], "sort_weight": 10000, "created": 1584512346, "last_modified": 1584512346, diff --git a/docs/models.txt b/docs/models.txt index 7f8869d3a..24adf6247 100644 --- a/docs/models.txt +++ b/docs/models.txt @@ -430,6 +430,8 @@ Interface motion { forwarding_tree_motion_ids: (Id)[]; // Calculated: All children (derived_motion_ids), grand children, ... and all parents (origin_id). state_id: motion_state/motion_ids; recommendation_id: motion_state/motion_recommendation_ids; + recommendation_extension_reference_ids: (*/referenced_in_motion_recommendation_extension_ids)[]; // current option: motion + referenced_in_motion_recommendation_extension_ids: (motion/recommendation_extension_reference_ids)[]; category_id: motion_category/motion_ids; block_id: motion_block/motion_ids; submitter_ids: (motion_submitter/motion_id)[];