From 34ccd7abe84c6792de69f7ac6d5ef779330fa121 Mon Sep 17 00:00:00 2001 From: FinnStutzenstein Date: Tue, 17 Mar 2020 16:44:13 +0100 Subject: [PATCH] Refined models --- docs/example-data.json | 2380 ++++++++++++++++++++++++++++++++++++++++ docs/models.txt | 1326 ++++++++++++---------- 2 files changed, 3098 insertions(+), 608 deletions(-) create mode 100644 docs/example-data.json diff --git a/docs/example-data.json b/docs/example-data.json new file mode 100644 index 000000000..5e1b2cf6d --- /dev/null +++ b/docs/example-data.json @@ -0,0 +1,2380 @@ +{ +"organisation": [ + { + "id": 1, + "legal_notice": "OpenSlides is a free web based presentation and assembly system for visualizing and controlling agenda, motions and elections of an assembly.", + "privacy_policy": "", + "login_info_text": "Guten Morgen!", + "openslides_theme": "openslides-theme", + "custom_translations": [], + + "committee_ids": [1], + "role_ids": [1], + "resource_ids": [] + }], +"user": [ + { + "id": 1, + "username": "admin", + "title": "", + "first_name": "", + "last_name": "Administrator", + "is_active": true, + "is_committee": false, + "default_password": "admin", + "about_me": "", + "gender": "", + "comment": "", + "number": "", + "structure_level": "", + "email": "", + "last_email_send": null, + + "role_id": 1, + + "is_present_in_meeting_ids": [1], + "meeting_id": null, + "guest_meeting_id": null, + "committee_as_member_ids": [], + "committee_as_manager_ids": [], + + "projection_ids": [], + "current_projector_ids": [], + + "group_$_ids": ["1"], + "group_1_ids": [2], + "speaker_$_ids": ["1"], + "speaker_1_ids": [1, 5, 6, 12], + "personal_note_$_ids": ["1"], + "personal_note_1_ids": [1], + "supported_motion_$_ids": [], + "submitted_motion_$_ids": ["1"], + "submitted_motion_1_ids": [1, 2, 3, 4], + "motion_poll_voted_$_ids": [], + "motion_vote_$_ids": [], + "assignment_candidate_$_ids": ["1"], + "assignment_candidate_1_ids": [1], + "assignment_poll_voted_$_ids": ["1"], + "assignment_poll_voted_1_ids": [3], + "assignment_option_$_ids": ["1"], + "assignment_option_1_ids": [1, 2], + "assignment_vote_$_ids": ["1"], + "assignment_vote_1_ids": [4] + }, + { + "id": 2, + "username": "a", + "title": "", + "first_name": "a", + "last_name": "", + "is_active": true, + "is_committee": false, + "default_password": "a", + "about_me": "", + "gender": "", + "comment": "", + "number": "", + "structure_level": "", + "email": "", + "last_email_send": null, + + "role_id": null, + + "is_present_in_meeting_ids": [], + "meeting_id": null, + "guest_meeting_id": null, + "committee_as_member_ids": [], + "committee_as_manager_ids": [], + + "projection_ids": [], + "current_projector_ids": [], + + "group_$_ids": ["1"], + "group_1_ids": [6], + "speaker_$_ids": ["1"], + "speaker_1_ids": [2, 3, 7, 10, 11, 13], + "personal_note_$_ids": [], + "supported_motion_$_ids": [], + "submitted_motion_$_ids": [], + "motion_poll_voted_$_ids": [], + "motion_vote_$_ids": [], + "assignment_candidate_$_ids": ["1"], + "assignment_candidate_1_ids": [3, 5], + "assignment_poll_voted_$_ids": [], + "assignment_option_$_ids": ["1"], + "assignment_option_1_ids": [6], + "assignment_vote_$_ids": [] + }, + { + "id": 3, + "username": "b", + "title": "", + "first_name": "b", + "last_name": "", + "is_active": true, + "is_committee": false, + "default_password": "jKwSLGCk", + "about_me": "", + "gender": "", + "comment": "", + "number": "", + "structure_level": "", + "email": "", + "last_email_send": null, + + "role_id": null, + + "is_present_in_meeting_ids": [], + "meeting_id": null, + "guest_meeting_id": null, + "committee_as_member_ids": [], + "committee_as_manager_ids": [], + + "projection_ids": [], + "current_projector_ids": [], + + "group_$_ids": [], + "speaker_$_ids": ["1"], + "speaker_1_ids": [4, 8, 9], + "personal_note_$_ids": [], + "supported_motion_$_ids": [3], + "submitted_motion_$_ids": [], + "motion_poll_voted_$_ids": [], + "motion_vote_$_ids": [], + "assignment_candidate_$_ids": ["1"], + "assignment_candidate_1_ids": [2, 4], + "assignment_poll_voted_$_ids": [], + "assignment_option_$_ids": ["1"], + "assignment_option_1_ids": [3, 4, 5], + "assignment_vote_$_ids": [] + }], +"role": [ + { + "id": 1, + "name": "Superadmin role", + "permissions": [], + "is_superadmin_role": true, + + "organisation_id": 1, + "user_ids": [1] + }], +"resource": [], +"committee": [ + { + "id": 1, + "name": "Default committee", + "description": "Add description here", + + "meeting_ids": [1], + "default_meeting_id": 1, + "member_ids": [], + "manager_ids": [], + "forward_to_committee_ids": [], + "receive_forwardings_from_committee_ids": [], + "organisation_id": 1 + }], +"meeting": [ + { + "id": 1, + "url_name": "os3_test", + "is_template": false, + "enable_anonymous": false, + + "name": "OpenSlides - Die Veranstaltung (Teil II)", + "description": "Presentation and assembly system", + "location": "", + "start_time": 0, + "end_time": 0, + "welcome_title": "Welcome to OpenSlides", + "welcome_text": "[Space for your welcome text.]", + "custom_translations": [], + + "projector_default_countdown_time": 60, + "projector_countdown_warning_time": 0, + + "export_csv_encoding": "utf-8", + "export_csv_separator": ",", + "export_pdf_pagenumber_alignment": "center", + "export_pdf_fontsize": "10", + "export_pdf_pagesize": "A4", + + "agenda_show_subtitles": false, + "agenda_enable_numbering": true, + "agenda_number_prefix": "", + "agenda_numeral_system": "arabic", + "agenda_item_creation": "default_yes", + "agenda_new_items_default_visibility": "2", + "agenda_show_internal_items_on_projector": false, + + "list_of_speakers_amount_last_on_projector": 1, + "list_of_speakers_amount_next_on_projector": -1, + "list_of_speakers_couple_countdown": false, + "list_of_speakers_show_amount_of_speakers_on_slide": true, + "list_of_speakers_present_users_only": false, + + "motions_default_workflow_id": 1, + "motions_statute_amendments_workflow_id": 2, + "motions_preamble": "The assembly may decide:", + "motions_default_line_numbering": "none", + "motions_line_length": 90, + "motions_reason_required": false, + "motions_enable_text_on_projector": true, + "motions_enable_reason_on_projector": true, + "motions_enable_sidebox_on_projector": false, + "motions_enable_recommendation_on_projector": true, + "motions_show_referring_motions": true, + "motions_show_sequential_numbers": true, + "motions_recommendations_by": "", + "motions_statute_recommendations_by": "", + "motions_recommendation_text_mode": "normal", + "motions_default_sorting": "number", + "motions_number_type": "per_category", + "motions_number_min_digits": 1, + "motions_number_with_blank": false, + "motions_statutes_enabled": true, + "motions_amendments_enabled": true, + "motions_amendments_in_main_list": true, + "motions_amendments_of_amendments": false, + "motions_amendments_prefix": "-", + "motions_amendments_text_mode": "freestyle", + "motions_amendments_multiple_paragraphs": true, + "motions_supporters_min_amount": 0, + "motions_supporters_autoremove": false, + "motions_export_title": "Motions", + "motions_export_preamble": "", + "motions_export_submitter_recommendation": false, + "motions_export_follow_recommendation": false, + + "motion_poll_ballot_paper_selection": "CUSTOM_NUMBER", + "motion_poll_ballot_paper_number": 8, + "motion_poll_default_100_percent_base": "YNA", + "motion_poll_default_majority_method": "simple", + "motion_poll_default_groups": [2, 3], + + "users_sort_by": "first_name", + "users_enable_presence_view": false, + "users_pdf_welcometitle": "Welcome to OpenSlides", + "users_pdf_welcometext": "[Place for your welcome and help text.]", + "users_pdf_url": "http://example.com:8000", + "users_pdf_wlan_ssid": "", + "users_pdf_wlan_password": "", + "users_pdf_wlan_encryption": "", + "users_email_sender": "noreply@yourdomain.com", + "users_email_replyto": "", + "users_email_subject": "Your login for {event_name}", + "users_email_body": "Dear {name},\n\nthis is your OpenSlides login for the event {event_name}:\n\n {url}\n username: {username}\n password: {password}\n\nThis email was generated automatically.", + + "assignments_export_title": "Elections", + "assignments_export_preamble": "", + "assignment_poll_add_candidates_to_list_of_speakers": true, + "assignment_poll_sort_poll_result_by_votes": true, + "assignment_poll_default_method": "votes", + "assignment_poll_default_100_percent_base": "valid", + "assignment_poll_default_majority_method": "simple", + "assignment_poll_default_groups": [3, 5], + + "projector_ids": [1, 2], + "projectiondefault_ids": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13], + "projector_message_ids": [1], + "projector_countdown_ids": [1], + "tag_ids": [1, 2, 3], + "agenda_item_ids": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15], + "list_of_speakers_ids": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15], + "topic_ids": [1, 2, 3, 4, 5, 6, 7, 8], + "group_ids": [1, 2, 3, 5, 6], + "mediafile_ids": [1, 2, 3], + "motion_ids": [1, 2, 3, 4], + "motion_comment_section_ids": [1], + "motion_category_ids": [1, 2], + "motion_block_ids": [1], + "motion_workflow_ids": [1, 2], + "motion_statute_paragraph_ids": [], + "motion_poll_ids": [1, 2], + "assignment_ids": [1, 2], + "assignment_poll_ids": [1, 2, 3], + + "logo_$": ["logo_web_header"], + "logo_web_header": 3, + "font_$": [], + + "committee_id": 1, + "default_meeting_for_committee_id": 1, + "present_user_ids": [1], + "temorary_user_ids": [], + "guest_ids": [], + "reference_projector_id": 2 + }], +"group": [ + { + "id": 1, + "name": "Default", + "is_superadmin_group": false, + "is_default_group": true, + "permissions": [ + "agenda.can_see", + "agenda.can_see_internal_items", + "assignments.can_see", + "core.can_see_frontpage", + "core.can_see_projector", + "mediafiles.can_see", + "motions.can_see", + "users.can_see_name" + ], + + "user_ids": [], + "mediafile_access_group_ids": [], + "read_comment_section_ids": [], + "write_comment_section_ids": [], + "motion_poll_ids": [], + "assignment_poll_ids": [], + "used_as_motion_poll_default": null, + "used_as_assignment_poll_default": null, + "meeting_id": 1 + }, + { + "id": 2, + "name": "Admin", + "is_superadmin_group": true, + "is_default_group": false, + "permissions": [], + + "user_ids": [1], + "mediafile_access_group_ids": [], + "read_comment_section_ids": [], + "write_comment_section_ids": [], + "motion_poll_ids": [], + "assignment_poll_ids": [3], + "used_as_motion_poll_default": 1, + "used_as_assignment_poll_default": null, + "meeting_id": 1 + }, + { + "id": 3, + "name": "Staff", + "is_superadmin_group": false, + "is_default_group": false, + "permissions": [ + "agenda.can_manage", + "agenda.can_see", + "agenda.can_see_internal_items", + "agenda.can_be_speaker", + "assignments.can_manage", + "assignments.can_nominate_other", + "assignments.can_nominate_self", + "assignments.can_see", + "core.can_manage_projector", + "core.can_see_frontpage", + "core.can_see_projector", + "core.can_manage_tags", + "mediafiles.can_manage", + "mediafiles.can_see", + "motions.can_create", + "motions.can_manage", + "motions.can_see", + "users.can_manage", + "users.can_see_extra_data", + "users.can_see_name" + ], + + "user_ids": [], + "mediafile_access_group_ids": [], + "read_comment_section_ids": [1], + "write_comment_section_ids": [1], + "motion_poll_ids": [], + "assignment_poll_ids": [], + "used_as_motion_poll_default": 1, + "used_as_assignment_poll_default": 1, + "meeting_id": 1 + }, + { + "id": 5, + "name": "Committees", + "is_superadmin_group": false, + "is_default_group": false, + "permissions": [ + "agenda.can_see", + "agenda.can_see_internal_items", + "assignments.can_see", + "core.can_see_frontpage", + "core.can_see_projector", + "mediafiles.can_see", + "motions.can_create", + "motions.can_see", + "motions.can_support", + "users.can_see_name" + ], + + "user_ids": [], + "mediafile_access_group_ids": [], + "read_comment_section_ids": [], + "write_comment_section_ids": [], + "motion_poll_ids": [], + "assignment_poll_ids": [], + "used_as_motion_poll_default": null, + "used_as_assignment_poll_default": 1, + "meeting_id": 1 + }, + { + "id": 6, + "name": "Delegates", + "is_superadmin_group": false, + "is_default_group": false, + "permissions": [ + "agenda.can_see", + "agenda.can_see_internal_items", + "agenda.can_be_speaker", + "assignments.can_nominate_other", + "assignments.can_nominate_self", + "assignments.can_see", + "core.can_see_frontpage", + "core.can_see_projector", + "mediafiles.can_see", + "motions.can_create", + "motions.can_manage", + "motions.can_see", + "motions.can_support", + "users.can_see_name" + ], + + "user_ids": [2], + "mediafile_access_group_ids": [], + "read_comment_section_ids": [1], + "write_comment_section_ids": [1], + "motion_poll_ids": [], + "assignment_poll_ids": [], + "used_as_motion_poll_default": null, + "used_as_assignment_poll_default": null, + "meeting_id": 1 + }], +"personal_note": [ + { + "id": 1, + "note": "

Some content..

", + "star": false, + + "user_id": 1, + "content_object_id": "motion/2" + }], +"tag": [ + { + "id": 1, + "name": "Tag1", + + "tagged_ids": ["motion/2"], + "meeting_id": 1 + }, + { + "id": 2, + "name": "Tag2", + + "tagged_ids": ["assignment/2"], + "meeting_id": 1 + }, + { + "id": 3, + "name": "Tag3", + + "tagged_ids": ["motion/2", "motion/3"], + "meeting_id": 1 + }], +"angeda_item": [ + { + "id": 3, + "item_number": "", + "comment": null, + "closed": false, + "type": 1, + "is_internal": false, + "is_hidden": false, + "duration": null, + "weight": 1000, + "level": 0, + + "content_object_id": "topic/1", + "parent_id": null, + "children_ids": [14], + "projection_ids": [], + "current_projector_ids": [], + "meeting_id": 1 + }, + { + "id": 14, + "item_number": "", + "comment": null, + "closed": false, + "type": 2, + "is_internal": true, + "is_hidden": false, + "duration": null, + "weight": 1001, + "parent_id": 3, + "level": 1, + + "content_object_id": "assignment/2", + "parent_id": 3, + "children_ids": [], + "projection_ids": [], + "current_projector_ids": [], + "meeting_id": 1 + }, + { + "id": 4, + "item_number": "", + "comment": null, + "closed": false, + "type": 1, + "is_internal": false, + "is_hidden": false, + "duration": null, + "weight": 1001, + "level": 0, + + "content_object_id": "topic/2", + "parent_id": null, + "children_ids": [], + "projection_ids": [], + "current_projector_ids": [], + "meeting_id": 1 + }, + { + "id": 5, + "item_number": "", + "comment": null, + "closed": false, + "type": 2, + "is_internal": true, + "is_hidden": false, + "duration": null, + "weight": 1002, + "level": 0, + + "content_object_id": "topic/3", + "parent_id": null, + "children_ids": [], + "projection_ids": [], + "current_projector_ids": [], + "meeting_id": 1 + }, + { + "id": 6, + "item_number": "", + "comment": null, + "closed": false, + "type": 2, + "is_internal": true, + "is_hidden": false, + "duration": null, + "weight": 1003, + "level": 0, + + "content_object_id": "topic/4", + "parent_id": null, + "children_ids": [], + "projection_ids": [], + "current_projector_ids": [], + "meeting_id": 1 + }, + { + "id": 7, + "item_number": "", + "comment": null, + "closed": false, + "type": 1, + "is_internal": false, + "is_hidden": false, + "duration": null, + "weight": 1004, + "level": 0, + + "content_object_id": "topic/5", + "parent_id": null, + "children_ids": [], + "projection_ids": [], + "current_projector_ids": [], + "meeting_id": 1 + }, + { + "id": 8, + "item_number": "", + "comment": null, + "closed": false, + "type": 1, + "is_internal": false, + "is_hidden": false, + "duration": null, + "weight": 1005, + "level": 0, + + "content_object_id": "topic/6", + "parent_id": null, + "children_ids": [], + "projection_ids": [], + "current_projector_ids": [], + "meeting_id": 1 + }, + { + "id": 9, + "item_number": "", + "comment": null, + "closed": false, + "type": 1, + "is_internal": false, + "is_hidden": false, + "duration": null, + "weight": 1006, + "level": 0, + + "content_object_id": "topic/7", + "parent_id": null, + "children_ids": [], + "projection_ids": [], + "current_projector_ids": [], + "meeting_id": 1 + }, + { + "id": 10, + "item_number": "", + "comment": null, + "closed": false, + "type": 3, + "is_internal": false, + "is_hidden": true, + "duration": null, + "weight": 1007, + "level": 0, + + "content_object_id": "topic/8", + "parent_id": null, + "children_ids": [], + "projection_ids": [], + "current_projector_ids": [], + "meeting_id": 1 + }, + { + "id": 1, + "item_number": "", + "comment": null, + "closed": false, + "type": 1, + "is_internal": false, + "is_hidden": false, + "duration": null, + "weight": 10000, + "level": 0, + + "content_object_id": "motion/1", + "parent_id": null, + "children_ids": [], + "projection_ids": [], + "current_projector_ids": [], + "meeting_id": 1 + }, + { + "id": 2, + "item_number": "", + "comment": null, + "closed": false, + "type": 2, + "is_internal": true, + "is_hidden": false, + "duration": null, + "weight": 10000, + "level": 0, + + "content_object_id": "motion/2", + "parent_id": null, + "children_ids": [], + "projection_ids": [], + "current_projector_ids": [], + "meeting_id": 1 + }, + { + "id": 11, + "item_number": "", + "comment": null, + "closed": false, + "type": 2, + "is_internal": true, + "is_hidden": false, + "duration": null, + "weight": 10000, + "level": 0, + + "content_object_id": "assignment/1", + "parent_id": null, + "children_ids": [], + "projection_ids": [], + "current_projector_ids": [], + "meeting_id": 1 + }, + { + "id": 12, + "item_number": "", + "comment": null, + "closed": false, + "type": 2, + "is_internal": true, + "is_hidden": false, + "duration": null, + "weight": 10000, + "level": 0, + + "content_object_id": "motion/3", + "parent_id": null, + "children_ids": [], + "projection_ids": [], + "current_projector_ids": [], + "meeting_id": 1 + }, + { + "id": 13, + "item_number": "", + "comment": null, + "closed": false, + "type": 2, + "is_internal": true, + "is_hidden": false, + "duration": null, + "weight": 10000, + "level": 0, + + "content_object_id": "motion/4", + "parent_id": null, + "children_ids": [], + "projection_ids": [], + "current_projector_ids": [], + "meeting_id": 1 + }, + { + "id": 15, + "item_number": "", + "comment": null, + "closed": false, + "type": 2, + "is_internal": true, + "is_hidden": false, + "duration": null, + "weight": 10000, + "level": 0, + + "content_object_id": "motion_block/1", + "parent_id": null, + "children_ids": [], + "projection_ids": [], + "current_projector_ids": [], + "meeting_id": 1 + }], +"list_of_speakers": [ + { + "id": 1, + "closed": false, + + "content_object_id": "motion/1", + "speaker_ids": [11, 12, 13], + "projection_ids": [], + "current_projector_ids": [], + "meeting_id": 1 + }, + { + "id": 2, + "closed": false, + + "content_object_id": "motion/2", + "speakers": [], + "projection_ids": [], + "current_projector_ids": [], + "meeting_id": 1 + }, + { + "id": 3, + "closed": false, + + "content_object": "topic/1", + "speaker_ids": [1, 2], + "projection_ids": [], + "current_projector_ids": [], + "meeting_id": 1 + }, + { + "id": 4, + "closed": false, + + "content_object": "topic/2", + "speaker_ids": [], + "projection_ids": [], + "current_projector_ids": [], + "meeting_id": 1 + }, + { + "id": 5, + "closed": false, + + "content_object": "topic/3", + "speaker_ids": [], + "projection_ids": [], + "current_projector_ids": [], + "meeting_id": 1 + }, + { + "id": 6, + "closed": false, + + "content_object": "topic/4", + "speaker_ids": [], + "projection_ids": [], + "current_projector_ids": [], + "meeting_id": 1 + }, + { + "id": 7, + "closed": false, + + "content_object": "topic/5", + "speaker_ids": [3, 4], + "projection_ids": [], + "current_projector_ids": [], + "meeting_id": 1 + }, + { + "id": 8, + "closed": false, + + "content_object": "topic/6", + "speaker_ids": [5], + "projection_ids": [], + "current_projector_ids": [], + "meeting_id": 1 + }, + { + "id": 9, + "closed": false, + + "content_object": "topic/7", + "speaker_ids": [], + "projection_ids": [], + "current_projector_ids": [], + "meeting_id": 1 + }, + { + "id": 10, + "closed": false, + + "content_object": "topic/8", + "speaker_ids": [], + "projection_ids": [], + "current_projector_ids": [], + "meeting_id": 1 + }, + { + "id": 11, + "closed": false, + + "content_object": "assignment/1", + "speakers": [6, 7, 8], + "projection_ids": [], + "current_projector_ids": [], + "meeting_id": 1 + }, + { + "id": 12, + "closed": false, + + "content_object": "motion/3", + "speakers": [], + "projection_ids": [], + "current_projector_ids": [], + "meeting_id": 1 + }, + { + "id": 13, + "closed": false, + + "content_object": "motion/4", + "speakers": [], + "projection_ids": [], + "current_projector_ids": [], + "meeting_id": 1 + }, + { + "id": 14, + "closed": false, + + "content_object": "assignment/2", + "speakers": [9, 10], + "projection_ids": [], + "current_projector_ids": [], + "meeting_id": 1 + }, + { + "id": 15, + "closed": false, + + "content_object": "motion_block/1", + "speakers": [], + "projection_ids": [], + "current_projector_ids": [], + "meeting_id": 1 + }], +"speaker": [ + { + "id": 11, + "begin_time": 1584512636, + "end_time": 1584512638, + "weight": null, + "marked": false, + + "list_of_speakers_id": 1, + "user_id": 2 + }, + { + "id": 12, + "begin_time": null, + "end_time": null, + "weight": 2, + "marked": false, + + "list_of_speakers_id": 1, + "user_id": 1 + }, + { + "id": 13, + "begin_time": null, + "end_time": null, + "weight": 3, + "marked": false, + + "list_of_speakers_id": 1, + "user_id": 2 + }, + { + "id": 1, + "begin_time": null, + "end_time": null, + "weight": 1, + "marked": false, + + "list_of_speakers_id": 3, + "user_id": 1 + }, + { + "id": 2, + "begin_time": null, + "end_time": null, + "weight": 0, + "marked": false, + + "list_of_speakers_id": 3, + "user_id": 2 + }, + { + "id": 3, + "begin_time": null, + "end_time": null, + "weight": 1, + "marked": false, + + "list_of_speakers_id": 7, + "user_id": 2 + }, + { + "id": 4, + "begin_time": null, + "end_time": null, + "weight": 2, + "marked": false, + + "list_of_speakers_id": 7, + "user_id": 3 + }, + { + "id": 5, + "begin_time": null, + "end_time": null, + "weight": 1, + "marked": false, + + "list_of_speakers_id": 8, + "user_id": 1 + }, + { + "id": 6, + "begin_time": null, + "end_time": null, + "weight": 1, + "marked": false, + + "list_of_speakers_id": 11, + "user_id": 1 + }, + { + "id": 7, + "begin_time": null, + "end_time": null, + "weight": 2, + "marked": false, + + "list_of_speakers_id": 11, + "user_id": 2 + }, + { + "id": 8, + "begin_time": null, + "end_time": null, + "weight": 3, + "marked": false, + + "list_of_speakers_id": 11, + "user_id": 3 + }, + { + "id": 9, + "begin_time": null, + "end_time": null, + "weight": 1, + "marked": false, + + "list_of_speakers_id": 14, + "user_id": 3 + }, + { + "id": 10, + "begin_time": null, + "end_time": null, + "weight": 2, + "marked": false, + + "list_of_speakers_id": 14, + "user_id": 2 + }], +"topic": [ + { + "id": 1, + "title": "A", + "text": "", + + "attachment_ids": [], + "agenda_item_id": 3, + "list_of_speakers_id": 3, + "tag_ids": [], + "meeting_id": 1 + }, + { + "id": 2, + "title": "B", + "text": "", + + "attachment_ids": [], + "agenda_item_id": 4, + "list_of_speakers_id": 4, + "tag_ids": [], + "meeting_id": 1 + }, + { + "id": 3, + "title": "C", + "text": "", + + "attachment_ids": [], + "agenda_item_id": 5, + "list_of_speakers_id": 5, + "tag_ids": [], + "meeting_id": 1 + }, + { + "id": 4, + "title": "D", + "text": "", + + "attachment_ids": [], + "agenda_item_id": 6, + "list_of_speakers_id": 6, + "tag_ids": [], + "meeting_id": 1 + }, + { + "id": 5, + "title": "E", + "text": "", + + "attachment_ids": [], + "agenda_item_id": 7, + "list_of_speakers_id": 7, + "tag_ids": [], + "meeting_id": 1 + }, + { + "id": 6, + "title": "F", + "text": "", + + "attachment_ids": [], + "agenda_item_id": 8, + "list_of_speakers_id": 8, + "tag_ids": [], + "meeting_id": 1 + }, + { + "id": 7, + "title": "G", + "text": "", + + "attachment_ids": [], + "agenda_item_id": 9, + "list_of_speakers_id": 9, + "tag_ids": [], + "meeting_id": 1 + }, + { + "id": 8, + "title": "H", + "text": "", + + "attachment_ids": [], + "agenda_item_id": 10, + "list_of_speakers_id": 10, + "tag_ids": [], + "meeting_id": 1 + }], +"motion": [ + { + "id": 1, + "number": "A1", + "sequential_number": 1, + "title": "test", + "text": "", + "amendment_paragraph_$": [], + "modified_final_version": "

Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi.Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui. Etiam rhoncus. Maecenas tempus, tellus eget condimentum rhoncus, sem quam semper libero, sit amet adipiscing sem neque sed ipsum. Nam quam nunc, blandit vel, luctus pulvinar, hendrerit id, lorem.Maecenas nec odio et ante tincidunt tempus. Donec vitae sapien ut libero venenatis faucibus. Nullam quis ante. Etiam sit amet orci eget eros faucibus tincidunt. Duis leo. Sed fringilla mauris sit amet nibh. Donec sodales sagittis magna. Sed consequat, leo eget bibendum sodales, augue velit cursus nunc, quis gravida magna mi a libero. Fusce vulputate eleifend sapien. Vestibulum purus quam, scelerisque ut, mollis sed, nonummy id, metus. Nullam accumsan lorem in dui. Cras ultricies mi eu turpis hendrerit fringilla. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; In ac dui quis mi consectetuer lacinia. Nam pretium turpis et arcu. Duis arcu tortor, suscipit eget, imperdiet nec, imperdiet iaculis, ipsum. Sed aliquam ultrices mauris. Integer ante arcu, accumsan a, consectetuer eget, posuere ut, mauris. Praesent adipiscing. Phasellus ullamcorper ipsum rutrum nunc. Nunc nonummy metus. Vestibulum volutpat pretium libero. Cras id dui. Aenean ut

", + "reason": "", + "category_weight": 10000, + "state_extension": null, + "recommendation_extension": null, + "sort_weight": 10000, + "created": 1584512346, + "last_modified": 1584512346, + + "parent_id": null, + "children_ids": [2], + "sort_parent_id": null, + "sort_children_ids": [], + "origin_id": null, + "derived_motion_ids": [], + "state_id": 1, + "workflow_id": 1, + "recommendation_id": null, + "category_id": 2, + "motion_block_id": null, + "submitter_ids": [1], + "supporter_ids": [], + "poll_ids": [1, 2], + "change_recommendations_id": [], + "statute_paragraph_id": null, + "comment_ids": [1], + "agenda_item_id": 1, + "list_of_speakers_id": 1, + "tag_ids": [], + "attachment_ids": [], + "projection_ids": [], + "current_projector_ids": [], + "personal_note_ids": [], + "meeting_id": 1 + }, + { + "id": 2, + "number": "1 - 1", + "sequential_number": 2, + "title": "Änderungsantrag zu 1", + "text": "

lömk

", + "amendment_paragraph_$": [], + "modified_final_version": "", + "reason": "", + "category_weight": 10000, + "state_extension": "

regeer

", + "recommendation_extension": null, + "sort_weight": 10000, + "created": 1584512346, + "last_modified": 1584512346, + + "parent_id": 1, + "children_ids": [], + "sort_parent_id": null, + "sort_chldren_ids": [], + "origin_id": null, + "derived_motion_ids": [], + "state_id": 1, + "workflow_id": 1, + "recommendation_id": null, + "category_id": 1, + "motion_block_id": null, + "submitter_ids": [2], + "supporter_ids": [], + "poll_ids": [], + "change_recommendations_id": [], + "statute_paragraph_id": null, + "comment_ids": [], + "agenda_item_id": 2, + "list_of_speakers_id": 2, + "tag_ids": [1, 3], + "attachment_ids": [], + "projection_ids": [], + "current_projector_ids": [], + "personal_note_ids": [], + "meeting_id": 1 + }, + { + "id": 3, + "number": "2", + "sequential_number": 3, + "title": "ohne", + "text": "

sf

", + "amendment_paragraph_$": [], + "modified_final_version": "", + "reason": "", + "category_weight": 10000, + "state_extension": null, + "recommendation_extension": null, + "sort_weight": 10000, + "created": 1584512346, + "last_modified": 1584512346, + + "parent_id": null, + "children_ids": [], + "sort_parent_id": null, + "sort_chldren_ids": [], + "origin_id": null, + "derived_motion_ids": [], + "state_id": 1, + "workflow_id": 1, + "recommendation_id": null, + "category_id": 2, + "motion_block_id": 1, + "submitter_ids": [3], + "supporter_ids": [3], + "poll_ids": [], + "change_recommendations_id": [5], + "statute_paragraph_id": null, + "comment_ids": [], + "agenda_item_id": 12, + "list_of_speakers_id": 12, + "tag_ids": [3], + "attachment_ids": [], + "projection_ids": [], + "current_projector_ids": [], + "personal_note_ids": [], + "meeting_id": 1 + }, + { + "id": 4, + "number": "3", + "sequential_number": 4, + "title": "komplex", + "text": "

sdf sdfpdfkw wef

\n\n

wepkf 

\n\n

weüpfk 

\n\n

weüpfdfg

", + "amendment_paragraph_$": [], + "modified_final_version": "", + "reason": "", + "category_weight": 10000, + "state_extension": null, + "recommendation_extension": null, + "sort_weight": 10000, + "created": 1584512346, + "last_modified": 1584512346, + + "parent_id": null, + "children_ids": [], + "sort_parent_id": null, + "sort_chldren_ids": [], + "origin_id": null, + "derived_motion_ids": [], + "state_id": 6, + "workflow_id": 2, + "recommendation_id": null, + "category_id": null, + "motion_block_id": 1, + "submitter_ids": [4], + "supporter_ids": [], + "poll_ids": [], + "change_recommendations_id": [4], + "statute_paragraph_id": null, + "comments": [], + "agenda_item_id": 13, + "list_of_speakers_id": 13, + "tag_ids": [], + "attachment_ids": [2], + "projection_ids": [2], + "current_projector_ids": [], + "personal_note_ids": [], + "meeting_id": 1 + }], +"motion_submitter": [ + { + "id": 1, + "weight": 1, + + "user_id": 1, + "motion_id": 1 + }, + { + "id": 2, + "weight": 1, + + "user_id": 1, + "motion_id": 2 + }, + { + "id": 3, + "weight": 1, + + "user_id": 1, + "motion_id": 3 + }, + { + "id": 4, + "weight": 1, + + "user_id": 1, + "motion_id": 4 + }], +"motion_comment": [ + { + "id": 1, + "comment": "

sgsdklf jhsölkf sdölkdsf jglkfd

", + + "motion_id": 1, + "section_id": 1 + }], +"motion_comment_section": [ + { + "id": 1, + "name": "Neu", + "weight": 10000, + + "comment_ids": [1], + "read_groups_id": [3, 6], + "write_groups_id": [3, 6], + "meeting_id": 1 + }], +"category": [ + { + "id": 1, + "name": "Cad", + "prefix": "C", + "weight": 2, + "level": 0, + + "parent_id": null, + "children_ids": [2], + "motion_ids": [2], + "meeting_id": 1 + }, + { + "id": 2, + "name": "Bildung", + "prefix": "B", + "weight": 4, + "level": 1, + + "parent_id": 1, + "children_ids": [], + "motion_ids": [1, 3], + "meeting_id": 1 + }], +"motion_block": [ + { + "id": 1, + "title": "BLOCK A", + "internal": false, + + "motion_ids": [3, 4], + "agenda_item_id": 15, + "list_of_speakers_id": 15, + "projection_ids": [1], + "current_projector_ids": [], + "meeting_id": 1 + }], +"motion_change_recommendation": [ + { + "id": 4, + "rejected": false, + "internal": false, + "type": 2, + "other_description": "", + "line_from": 1, + "line_to": 2, + "text": "

sdf sdfpef

", + "creation_time": 1584512345, + + "motion_id": 4 + }, + { + "id": 5, + "rejected": false, + "internal": false, + "type": 0, + "other_description": "", + "line_from": 1, + "line_to": 2, + "text": "

skp

", + "creation_time": 1584512667, + + "motion_id": 3 + }], +"motion_state": [ + { + "id": 1, + "name": "submitted", + "recommendation_label": null, + "css_class": "lightblue", + "restriction": [], + "allow_support": true, + "allow_create_poll": true, + "allow_submitter_edit": true, + "set_number": true, + "show_state_extension_field": false, + "merge_amendment_into_final": 0, + "show_recommendation_extension_field": false, + + "next_states_id": [2, 3, 4], + "previous_state_ids": [], + "motion_ids": [1, 2, 3], + "motion_recommendation_ids": [], + "workflow_id": 1, + "first_state_of_workflow_id": 1 + }, + { + "id": 2, + "name": "accepted", + "recommendation_label": "Acceptance", + "css_class": "green", + "restriction": [], + "allow_support": false, + "allow_create_poll": false, + "allow_submitter_edit": false, + "set_number": true, + "show_state_extension_field": false, + "merge_amendment_into_final": 0, + "show_recommendation_extension_field": false, + + "next_states_id": [], + "previous_state_ids": [1], + "motion_ids": [], + "motion_recommendation_ids": [], + "workflow_id": 1, + "first_state_of_workflow_id": null + }, + { + "id": 3, + "name": "rejected", + "recommendation_label": "Rejection", + "css_class": "red", + "restriction": [], + "allow_support": false, + "allow_create_poll": false, + "allow_submitter_edit": false, + "set_number": true, + "show_state_extension_field": false, + "merge_amendment_into_final": 0, + "show_recommendation_extension_field": false, + + "next_states_id": [], + "previous_state_ids": [1], + "motion_ids": [], + "motion_recommendation_ids": [], + "workflow_id": 1, + "first_state_of_workflow_id": null + }, + { + "id": 4, + "name": "not decided", + "recommendation_label": "No decision", + "css_class": "grey", + "restriction": [], + "allow_support": false, + "allow_create_poll": false, + "allow_submitter_edit": false, + "set_number": true, + "show_state_extension_field": false, + "merge_amendment_into_final": 0, + "show_recommendation_extension_field": false, + + "next_states_id": [], + "previous_state_ids": [1], + "motion_ids": [], + "motion_recommendation_ids": [], + "workflow_id": 1, + "first_state_of_workflow_id": null + }, + { + "id": 5, + "name": "published", + "recommendation_label": null, + "css_class": "lightblue", + "restriction": [], + "allow_support": true, + "allow_create_poll": false, + "allow_submitter_edit": true, + "set_number": false, + "show_state_extension_field": false, + "merge_amendment_into_final": 0, + "show_recommendation_extension_field": false, + + "next_states_id": [6, 9, 14], + "previous_state_ids": [], + "motion_ids": [], + "motion_recommendation_ids": [], + "workflow_id": 2, + "first_state_of_workflow_id": 2 + }, + { + "id": 6, + "name": "permitted", + "recommendation_label": "Permission", + "css_class": "lightblue", + "restriction": [], + "allow_support": false, + "allow_create_poll": true, + "allow_submitter_edit": true, + "set_number": true, + "show_state_extension_field": false, + "merge_amendment_into_final": 0, + "show_recommendation_extension_field": false, + + "next_states_id": [7, 8, 9, 10, 11, 12, 13], + "previous_state_ids": [5], + "motion_ids": [4], + "motion_recommendation_ids": [], + "workflow_id": 2, + "first_state_of_workflow_id": null + }, + { + "id": 7, + "name": "accepted", + "recommendation_label": "Acceptance", + "css_class": "green", + "restriction": [], + "allow_support": false, + "allow_create_poll": false, + "allow_submitter_edit": false, + "set_number": true, + "show_state_extension_field": false, + "merge_amendment_into_final": 0, + "show_recommendation_extension_field": false, + + "next_states_id": [], + "previous_state_ids": [6], + "motion_ids": [], + "motion_recommendation_ids": [], + "workflow_id": 2, + "first_state_of_workflow_id": null + }, + { + "id": 8, + "name": "rejected", + "recommendation_label": "Rejection", + "css_class": "red", + "restriction": [], + "allow_support": false, + "allow_create_poll": false, + "allow_submitter_edit": false, + "set_number": true, + "show_state_extension_field": false, + "merge_amendment_into_final": 0, + "show_recommendation_extension_field": false, + + "next_states_id": [], + "previous_state_ids": [6], + "motion_ids": [], + "motion_recommendation_ids": [], + "workflow_id": 2, + "first_state_of_workflow_id": null + }, + { + "id": 9, + "name": "withdrawed", + "recommendation_label": null, + "css_class": "grey", + "restriction": [], + "allow_support": false, + "allow_create_poll": false, + "allow_submitter_edit": false, + "set_number": true, + "show_state_extension_field": false, + "merge_amendment_into_final": 0, + "show_recommendation_extension_field": false, + + "next_states_id": [], + "previous_state_ids": [5, 6], + "motion_ids": [], + "motion_recommendation_ids": [], + "workflow_id": 2, + "first_state_of_workflow_id": null + }, + { + "id": 10, + "name": "adjourned", + "recommendation_label": "Adjournment", + "css_class": "grey", + "restriction": [], + "allow_support": false, + "allow_create_poll": false, + "allow_submitter_edit": false, + "set_number": true, + "show_state_extension_field": false, + "merge_amendment_into_final": 0, + "show_recommendation_extension_field": false, + + "next_states_id": [], + "previous_state_ids": [6], + "motion_ids": [], + "motion_recommendation_ids": [], + "workflow_id": 2, + "first_state_of_workflow_id": null + }, + { + "id": 11, + "name": "not concerned", + "recommendation_label": "No concernment", + "css_class": "grey", + "restriction": [], + "allow_support": false, + "allow_create_poll": false, + "allow_submitter_edit": false, + "set_number": true, + "show_state_extension_field": false, + "merge_amendment_into_final": 0, + "show_recommendation_extension_field": false, + + "next_states_id": [], + "previous_state_ids": [6], + "motion_ids": [], + "motion_recommendation_ids": [], + "workflow_id": 2, + "first_state_of_workflow_id": null + }, + { + "id": 12, + "name": "refered to committee", + "recommendation_label": "Referral to committee", + "css_class": "grey", + "restriction": [], + "allow_support": false, + "allow_create_poll": false, + "allow_submitter_edit": false, + "set_number": true, + "show_state_extension_field": false, + "merge_amendment_into_final": 0, + "show_recommendation_extension_field": false, + + "next_states_id": [], + "previous_state_ids": [6], + "motion_ids": [], + "motion_recommendation_ids": [], + "workflow_id": 2, + "first_state_of_workflow_id": null + }, + { + "id": 13, + "name": "needs review", + "recommendation_label": null, + "css_class": "grey", + "restriction": [], + "allow_support": false, + "allow_create_poll": false, + "allow_submitter_edit": false, + "set_number": true, + "show_state_extension_field": false, + "merge_amendment_into_final": 0, + "show_recommendation_extension_field": false, + + "next_states_id": [], + "previous_state_ids": [6], + "motion_ids": [], + "motion_recommendation_ids": [], + "workflow_id": 2, + "first_state_of_workflow_id": null + }, + { + "id": 14, + "name": "rejected (not authorized)", + "recommendation_label": "Rejection (not authorized)", + "css_class": "grey", + "restriction": [], + "allow_support": false, + "allow_create_poll": false, + "allow_submitter_edit": false, + "set_number": true, + "show_state_extension_field": false, + "merge_amendment_into_final": 0, + "show_recommendation_extension_field": false, + + "next_states_id": [], + "previous_state_ids": [5], + "motion_ids": [], + "motion_recommendation_ids": [], + "workflow_id": 2, + "first_state_of_workflow_id": null + }], +"motion_workflow": [ + { + "id": 1, + "name": "Simple Workflow", + + "states_id": [1, 2, 3, 4], + "first_state_id": 1, + "motion_ids": [1, 2, 3], + "default_workflow_meeting_id": 1, + "default_statute_amendments_meeting_id": null, + "meeting_id": 1 + }, + { + "id": 2, + "name": "Complex Workflow", + + "states_id": [5, 6, 7, 8, 9, 10, 11, 12, 13, 14], + "first_state_id": 5, + "motion_ids": [4], + "default_workflow_meeting_id": null, + "default_statute_amendments_meeting_id": 1, + "meeting_id": 1 + }], +"motion_statute_paragraph": [], +"motion_poll": [ + { + "id": 1, + "pollmethod": "YNA", + "state": 3, + "type": "analog", + "title": "1", + "onehundred_percent_base": "YNA", + "majority_method": "simple", + "votesvalid": "2.000000", + "votesinvalid": "9.000000", + "votescast": "2.000000", + "user_has_voted": false, + + "motion_id": 1, + "option_ids": [1], + "voted_ids": [], + "entitled_group_ids": [], + "projection_ids": [], + "current_projector_ids": [], + "meeting_id": 1 + }, + { + "id": 2, + "pollmethod": "YNA", + "state": 1, + "type": "analog", + "title": "2", + "onehundred_percent_base": "YNA", + "majority_method": "simple", + "votesvalid": null, + "votesinvalid": null, + "votescast": null, + "user_has_voted": false, + + "motion_id": 1, + "option_ids": [2], + "voted_ids": [], + "entitled_group_ids": [], + "projection_ids": [], + "current_projector_ids": [], + "meeting_id": 1 + }], +"motion_option": [ + { + "id": 1, + "yes": "2.000000", + "no": "4.000000", + "abstain": "1.000000", + + "poll_id": 1, + "vote_ids": [1, 2, 3] + }, + { + "id": 2, + "yes": "0.000000", + "no": "0.000000", + "abstain": "0.000000", + + "poll_id": 2, + "vote_ids": [] + }], +"motion_vote": [ + { + "id": 1, + "weight": "2.000000", + "value": "Y", + + "user_id": null, + "option_id": 1 + }, + { + "id": 2, + "weight": "4.000000", + "value": "N", + + "user_id": null, + "option_id": 1 + }, + { + "id": 3, + "weight": "1.000000", + "value": "A", + + "user_id": null, + "option_id": 1 + }], +"assignment": [ + { + "id": 1, + "title": "Wahl", + "description": "", + "open_posts": 1, + "phase": 1, + "default_poll_description": "", + "number_poll_candidates": false, + + "assignment_candidate_ids": [1, 2, 3], + "polls_id": [1, 2], + "agenda_item_id": 11, + "list_of_speakers_id": 11, + "tag_ids": [], + "attachment_ids": [], + "projection_ids": [4], + "current_projector_ids": [1], + "meeting_id": 1 + }, + { + "id": 2, + "title": "2. Wahl", + "description": "

B-Ware

", + "open_posts": 1, + "phase": 0, + "default_poll_description": "", + "number_poll_candidates": true, + + "assignment_candidate_ids": [4, 5], + "polls_id": [3], + "agenda_item_id": 14, + "list_of_speakers_id": 14, + "tag_ids": [2], + "attachment_ids": [], + "projection_ids": [], + "current_projector_ids": [], + "meeting_id": 1 + }], +"assignment_candidate": [ + { + "id": 1, + "weight": 1, + + "assignment_id": 1, + "user_id": 1 + }, + { + "id": 2, + "weight": 2, + + "assignment_id": 1, + "user_id": 3 + }, + { + "id": 3, + "weight": 3, + + "assignment_id": 1, + "user_id": 2 + }, + { + "id": 4, + "weight": 1, + + "assignment_id": 2, + "user_id": 3 + }, + { + "id": 5, + "weight": 2, + + "assignment_id": 2, + "user_id": 2 + }], +"assignment_poll": [ + { + "id": 1, + "description": "", + "pollmethod": "YNA", + "votes_amount": 1, + "allow_multiple_votes_per_candidate": false, + "global_no": true, + "global_abstain": true, + "amount_global_no": null, + "amount_global_abstain": null, + "state": 1, + "title": "1", + "type": "analog", + "onehundred_percent_base": "YNA", + "majority_method": "simple", + "votesvalid": null, + "votesinvalid": null, + "votescast": null, + "user_has_voted": false, + + "assignment_id": 1, + "voted_id": [], + "entitled_groups_id": [], + "option_ids": [1], + "projection_ids": [], + "current_projector_ids": [], + "meeting_id": 1 + }, + { + "id": 2, + "description": "", + "pollmethod": "votes", + "votes_amount": 1, + "allow_multiple_votes_per_candidate": false, + "global_no": true, + "global_abstain": true, + "amount_global_no": "2.000000", + "amount_global_abstain": "1.000000", + "state": 3, + "title": "2", + "type": "analog", + "onehundred_percent_base": "votes", + "majority_method": "simple", + "votesvalid": "9.000000", + "votesinvalid": "2.000000", + "votescast": "16.000000", + "user_has_voted": false, + + "assignment_id": 1, + "voted_ids": [], + "entitled_group_ids": [], + "option_ids": [2, 3, 4], + "projection_ids": [], + "current_projector_ids": [], + "meeting_id": 1 + }, + { + "id": 3, + "description": "", + "pollmethod": "votes", + "votes_amount": 1, + "allow_multiple_votes_per_candidate": false, + "global_no": true, + "global_abstain": false, + "amount_global_no": "0.000000", + "amount_global_abstain": null, + "state": 3, + "title": "Wahlgang", + "type": "named", + "onehundred_percent_base": "valid", + "majority_method": "simple", + "votesvalid": "1.000000", + "votesinvalid": "0.000000", + "votescast": "1.000000", + "user_has_voted": true, + + "assignment_id": 2, + "voted_ids": [1], + "entitled_groups_id": [2], + "option_ids": [5, 6], + "projection_ids": [], + "current_projector_ids": [], + "meeting_id": 1 + }], +"assignment_option": [ + { + "id": 1, + "yes": "0.000000", + "no": "0.000000", + "abstain": "0.000000", + "weight": 1, + + "poll_id": 1, + "user_id": 1, + "vote_ids": [] + }, + { + "id": 2, + "yes": "3.000000", + "no": "0.000000", + "abstain": "0.000000", + "weight": 1, + + "poll_id": 2, + "user_id": 1, + "vote_ids": [1] + }, + { + "id": 3, + "yes": "7.000000", + "no": "0.000000", + "abstain": "0.000000", + "weight": 2, + + "poll_id": 2, + "user_id": 3, + "vote_ids": [3] + }, + { + "id": 4, + "yes": "2.000000", + "no": "0.000000", + "abstain": "0.000000", + "weight": 3, + + "poll_id": 2, + "user_id": 2, + "vote_ids": [2] + }, + { + "id": 5, + "yes": "0.000000", + "no": "0.000000", + "abstain": "0.000000", + "weight": 1, + + "poll_id": 3, + "user_id": 3, + "vote_ids": [] + }, + { + "id": 6, + "yes": "1.000000", + "no": "0.000000", + "abstain": "0.000000", + "weight": 2, + + "poll_id": 3, + "user_id": 2, + "vote_ids": [4] + }], +"assignment_vote": [ + { + "id": 1, + "value": "Y", + "weight": "3.000000", + + "user_id": null, + "option_id": 2 + }, + { + "id": 2, + "value": "Y", + "weight": "2.000000", + + "user_id": null, + "option_id": 4 + }, + { + "id": 3, + "value": "Y", + "weight": "7.000000", + + "user_id": null, + "option_id": 3 + }, + { + "id": 4, + "value": "Y", + "weight": "1.000000", + + "user_id": 1, + "option_id": 6 + }], +"mediafile": [ + { + "id": 1, + "title": "logos", + "is_directory": true, + "filesize": null, + "filename": null, + "mimetype": null, + "pdf_information": {}, + "create_timestamp": 1584513763, + "path": "logos/", + "inherited_access_groups_id": [2, 3], + + "access_groups_id": [2, 3], + "parent_id": null, + "children_ids": [3], + "list_of_speakers_id": 16, + "projection_ids": [], + "current_projector_ids": [], + "attachment_ids": [], + "meeting_id": 1, + + "logo_$": [], + "font_$": [] + }, + { + "id": 2, + "title": "A.txt", + "is_directory": false, + "filesize": 3, + "filename": "A.txt", + "mimetype": "text/plain", + "pdf_information": {}, + "create_timestamp": 1584513771, + "path": "A.txt", + "inherited_access_groups_id": true, + + "access_groups_id": [], + "parent_id": null, + "children_ids": [], + "list_of_speakers_id": 17, + "projection_ids": [], + "current_projector_ids": [], + "attachment_ids": ["motion/4"], + "meeting_id": 1, + + "logo_$": [], + "font_$": [] + }, + { + "id": 3, + "title": "in.jpg", + "is_directory": false, + "filesize": 125820, + "filename": "in.jpg", + "mimetype": "image/jpeg", + "pdf_information": {}, + "create_timestamp": 1584513791, + "path": "logos/in.jpg", + "inherited_access_groups_id": [2, 3], + + "access_groups_id": [], + "parent_id": 1, + "children_ids": [], + "list_of_speakers_id": 18, + "projection_ids": [], + "current_projector_ids": [], + "attachment_ids": [], + "meeting_id": 1, + + "logo_$": ["logo_web_header"], + "logo_web_header": 1, + "font_$": [] + }], +"projector": [ + { + "id": 1, + "name": "Default projector", + "scale": 0, + "scroll": 0, + "width": 1220, + "aspect_ratio_numerator": 4, + "aspect_ratio_denominator": 3, + "color": "#000000", + "background_color": "#ffffff", + "header_background_color": "#317796", + "header_font_color": "#f5f5f5", + "header_h1_color": "#317796", + "chyron_background_color": "#317796", + "chyron_font_color": "#ffffff", + "show_header_footer": true, + "show_title": true, + "show_logo": true, + + "current_projection_ids": [4], + "current_element_ids": ["assignment/1"], + "elements_preview": [1, 2], + "elements_history": [], + "used_as_reference_projector_meeting_id": null, + "projectiondefaults_id": [1, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13], + "meeting_id": 1 + }, + { + "id": 2, + "name": "Nebenprojektor", + "scale": 0, + "scroll": 0, + "width": 1024, + "aspect_ratio_numerator": 16, + "aspect_ratio_denominator": 9, + "color": "#000000", + "background_color": "#888888", + "header_background_color": "#317796", + "header_font_color": "#f5f5f5", + "header_h1_color": "#317796", + "chyron_background_color": "#317796", + "chyron_font_color": "#ffffff", + "show_header_footer": true, + "show_title": true, + "show_logo": true, + + "current_projection_ids": [6], + "current_element_ids": ["clock/1"], + "elements_preview": [], + "elements_history": [], + "used_as_reference_projector_meeting_id": 1, + "projectiondefaults_id": [2, 3], + "meeting_id": 1 + }], +"projection": [ + { + "id": 1, + "projector_id": null, + "projector_history_id": null, + "projector_preview_id": 1, + "element_id": "motion_block/1", + "options": {} + }, + { + "id": 2, + "projector_id": null, + "projector_history_id": null, + "projector_preview_id": 1, + "element_id": "motion/4", + "options": { + "mode": "diff" + } + }, + { + "id": 4, + "projector_id": 1, + "projector_history_id": null, + "projector_preview_id": null, + "element_id": "assignment/1", + "options": {} + }, + { + "id": 6, + "projector_id": 1, + "projector_history_id": null, + "projector_preview_id": null, + "element_id": "clock/1", + "_comment": "there is no clock model, but it should just not be resolved.", + "options": { + "stable": true + } + }], +"projectiondefault": [ + { + "id": 1, + "name": "agenda_all_items", + "display_name": "Agenda", + + "projector_id": 1, + "meeting_id": 1 + }, + { + "id": 2, + "name": "topics", + "display_name": "Topics", + + "projector_id": 2, + "meeting_id": 1 + }, + { + "id": 3, + "name": "agenda_list_of_speakers", + "display_name": "List of speakers", + + "projector_id": 2, + "meeting_id": 1 + }, + { + "id": 4, + "name": "agenda_current_list_of_speakers", + "display_name": "Current list of speakers", + + "projector_id": 1, + "meeting_id": 1 + }, + { + "id": 5, + "name": "motions", + "display_name": "Motions", + + "projector_id": 1, + "meeting_id": 1 + }, + { + "id": 6, + "name": "motionBlocks", + "display_name": "Motion blocks", + + "projector_id": 1, + "meeting_id": 1 + }, + { + "id": 7, + "name": "assignments", + "display_name": "Elections", + + "projector_id": 1, + "meeting_id": 1 + }, + { + "id": 8, + "name": "users", + "display_name": "Participants", + + "projector_id": 1, + "meeting_id": 1 + }, + { + "id": 9, + "name": "mediafiles", + "display_name": "Files", + + "projector_id": 1, + "meeting_id": 1 + }, + { + "id": 10, + "name": "messages", + "display_name": "Messages", + + "projector_id": 1, + "meeting_id": 1 + }, + { + "id": 11, + "name": "countdowns", + "display_name": "Countdowns", + + "projector_id": 1, + "meeting_id": 1 + }, + { + "id": 12, + "name": "assignment_poll", + "display_name": "Assignment poll", + + "projector_id": 1, + "meeting_id": 1 + }, + { + "id": 13, + "name": "motion_poll", + "display_name": "Motion Poll", + + "projector_id": 1, + "meeting_id": 1 + }], +"projector_message": [ + { + "id": 1, + "message": "

Hi!

", + + "projection_ids": [], + "current_projector_ids": [], + "meeting_id": 1 + }], +"projector_countdown": [ + { + "id": 1, + "title": "Countdown 1", + "description": "", + "default_time": 60, + "countdown_time": 60.0, + "running": false, + + "projection_ids": [], + "current_projector_ids": [], + "meeting_id": 1 + }] +} diff --git a/docs/models.txt b/docs/models.txt index 8b4e0d8dd..58fa9b497 100644 --- a/docs/models.txt +++ b/docs/models.txt @@ -1,25 +1,700 @@ Types: - Nativ: null, string, number, JSON - Fqid: Strukturierter string - HTML: string mit HTML Inhalt - []: Array von Typ T - : number (ID) zu dem Modell - float: string mit iso-gemäßer Formatierung eines floats - decimal(X): Decimal values represented as a string with X decimal places - datetime: Datetime as a unix timestamp - // Why a number? This enables queries in the DB. And we do not - // need more precision than 1 second. + - nativ datatypes: string, number, boolean, JSON + - HTML: string with HTML content + - float: numbers that are expected to be non-integer. Formatted as in rfc7159. + - decimal(X): Decimal values represented as a string with X decimal places + - datetime: Datetime as a unix timestamp. Why a number? This enables queries + in the DB. And we do not need more precision than 1 second. +Relations: + - /: This is reference to model. The reverse relation + field is . E.g. `category_id: category/motion_ids` in a motion links + to one category. The reverse field is `motion_ids` which may be `motion_ids: + (motion/category_id)[]` indicating, that there are many motion ids. + - []: This indicated multiple ids. For an example see above. + - */: This is a generic relation (analog: `(*/)[]` a generic + list relation) with fqids as values. + - if no field is specified, there is no reverse relation. +Structured Fields: + - There are template fields (See autoupdate service interface) with a `$` as + the placeholder. In this document, angle brackets are followed by the + dollar sign including the meaning of the template. E.g. + group_$_ids: (group/user_ids)[]; + says, that the template are meeting ids and each structured field is a + multi-relation to groups and the reverse relation field for groups is + user_ids. -Note to structured fields: Fields with `some_field_` do have -values for `` that fits into the format of a field. E.g. -`amendment_paragraph_3`. Note that it might be possible that no kind of -this field exists in a model. +Interface organisation { + id: number; + name: string; + description: HTML; + + // Configs: + legal_notice: string; + privacy_policy: string; + login_text: string; + theme: string; + custom_translations: JSON; + + committee_ids: (committee/origansation_id)[]; + role_ids: (role/organsiation_id)[]; + resource_ids: (resource/organisation_id)[]; +} + +Interface user { + id: number; + username: string; + title: string; + first_name: string; + last_name: string; + is_active: boolean; + is_committee: boolean; + // TODO: auth + default_password: string; + about_me: HTML; + gender: string, + comment: HTML; + number: string; + structure_level: string; + email: string; + last_email_send: string; + + role_id: role/user_ids; // Attention: prevent impelenting a "default-role" or let a + // user create such a role! This would cause the user_ids-array for this + // role to explode in size. If a user has no role, it should be handles as + // the user has no permission in the organisation and is a "normal" delegate + // there. Just a few users (expected <100) should even get a role and all + // other don't. + + // meeting, committee, ... + is_present_in_meeting_ids: (meeting/present_user_ids)[]; + meeting_id: meeting/temporary_user_ids; // Temporary users + guest_meeting_ids: (meeting/guest_ids)[]; // guests in meetings + committee_as_member_ids: (committee/member_ids)[]; + committee_as_manager_ids: (committee/manager_ids)[]; + + // Projection + projection_ids: (projection/element_id)[]; + current_projector_ids: (projector/current_element_ids)[] + + // All foreign keys are meeting-specific: + // - Keys are smaller (Space is in O(n^2) for n keys + // in the relation), so this saves storagespace + // - This makes quering things like this possible: + // "Give me all groups for User X in Meeting Y" without + // the need to get all groups and filter them for the meeting + group_$_ids: (group/user_ids)[]; + speaker_$_ids: (speaker/user_id)[]; + personal_note_$_ids: (personal_note/user_id)[]; + supported_motion_$_ids: (motion/supporter_ids)[]; + submitted_motion_$_ids: (motion_submitter/user_id)[]; + motion_poll_voted_$_ids: (motion_poll/voted_ids)[]; + motion_vote_$_ids: (motion_vote/user_id)[]; + assignment_candidate_$_ids: (assignment_candidate/user_id)[]; + assignment_poll_voted_$_ids: (assignment_poll/voted_ids)[]; + assignment_option_$_ids: (assignment_option/user_ids)[]; + assignment_vote_$_ids: (assignment_vote/user_id)[]; +} + +Interface role { + id: number; + name: string; + permissions: string[]; + is_superadmin_role: boolean; + + organisation_id: organisation/role_ids; + user_ids: (user/role_id)[]; +} + +// New: Resource +// Resources are meeting-specific or organsation wide. +// For organisation-resources, no permission chacks are done (event the user +// must not be logged in). If a meeting-resource is requested, it is checked, if +// the user can see the meeting (Anonymous, guest, member). +// A resource has a token, e.g. `web_header` or `pdf_font_italic`, so the client +// knowns, where to put the resource. They are delivered by the mediafile server +// with the URL `/resource/` +Interface resource { + id: number; + token: string; + filesize: number; + mimetype: string; + + organisation_id: organisation/resource_ids; +} + +Interface committee { + id: number; + name: string; + description: HTML; + + meeting_ids: (meeting/committee_id)[]; + default_meting_id: meeting/default_meeting_for_committee_id; + member_ids: (user/committee_as_memeber_ids)[]; + manager_ids: (user/committee_as_manager_ids)[]; + forward_to_committee_ids: (committee/receive_forwardings_from_committee_ids)[]; + receive_forwardings_from_committee_ids: (committee/forward_to_committee_ids)[]; + organisation_id: organisation/committee_ids; +} + +Interface meeting { + id: number; + url_name: string; // For unique urls. + is_template: boolean; // Unique within a committee + enable_anonymous: boolean; + + // Old "general_*" configs + name: string; + description: string; + location: string; + start_time: datetime; + end_time: datetime; + welcome_title: string; + welcome_text: HTML; + custom_translations: JSON; + + // Projector + projector_default_countdown_time: number; + projector_countdown_warning_time: number; + + // Exports + export_csv_encoding: string; + export_csv_separator: string; + export_pdf_pagenumber_alignment: string; + export pdf_fontsize: number; + export_pdf_pagesize: string; + + // Agenda + agenda_show_subtitles: boolean; + agenda_enable_numbering: boolean; + agenda_number_prefix: string; + agenda_numeral_system: string; + agenda_item_creation: string; + agenda_new_items_default_visibility: number; + agenda_show_internal_items_on_projector: boolean; + + // List of speakers + list_of_speakers_amount_last_on_projector: number; + list_of_speakers_amount_next_on_projector: boolean; + list_of_speakers_couple_countdown: boolean; + list_of_speakers_show_amount_of_speakers_on_slide: boolean; + list_of_speakers_present_users_only: boolean; + + // Motions + motions_default_workflow_id: workflow/default_workflow_meeting_id; + motions_default_statute_amendments_workflow_id: workflow/default_statute_amendments_meeting_id; + motions_preamble: string; + motions_default_line_numbering: string; + motions_line_length: number; + motions_reason_required: boolean; + motions_enable_text_on_projector: boolean; + motions_enable_reason_on_projector: boolean; + motions_enable_sidebox_on_projector: boolean; + motions_enable_recommendation_on_projector: boolean; + motions_show_referring_motions: boolean; + motions_show_sequential_number: boolean; + motions_recommendations_by: string; + motions_statute_recommendations_by: string; + motions_recommendation_text_mode: string; + motions_default_sorting: string; + motions_identifier_type: string; + motions_identifier_min_digits: number; + motions_identifier_with_blank: boolean; + motions_statutes_enabled: boolean; + motions_amendments_enabled: boolean; + motions_amendments_in_main_list: boolean; + motions_amendments_of_amendments: boolean; + motions_amendments_prefix: string; + motions_amendments_text_mode: string; + motions_amendments_multiple_paragraphs: boolean; + motions_supporters_min_amount: number; + motions_supporters_enable_autoremove: boolean; + motions_export_title: string; + motions_export_preamble: string; + motions_export_submitter_recommendation: boolean; + motions_export_follow_recommendation: boolean; + + motion_poll_ballot_paper_selection: string; + motion_poll_ballot_paper_number: number, + motion_poll_default_100_percent_base: string; + motion_poll_default_majority_method:string; + motion_poll_default_groups: (group/used_as_motion_poll_default)[]; + + // Users + users_sort_by: string; + users_enable_presence_view: boolean; + users_pdf_welcometitle: string; + users_pdf_welcometext: string; + users_pdf_url: string; + users_pdf_wlan_ssid: string; + users_pdf_wlan_password: string; + users_pdf_wlan_encryption": string; + users_email_sender: string; + users_email_replyto: string; + users_email_subject: string; + users_email_body: string; + + // Assignments + assignemnts_export_title: string; + assignments_export_preamble: string; + assignment_poll_add_candidates_to_list_of_speakers: boolean; + assignment_poll_sort_poll_result_by_votes: boolean; + assignment_poll_default_method: string; + assignment_poll_default_100_percent_base: string; + assignment_poll_default_majority_method: string; + assignment_poll_default_groups: (group/used_as_assignment_poll_default)[]; + + projector_ids: (projector/meeting_id)[]; + projectiondefault_ids: (projectiondefault/meeting_id)[]; + projector_message_ids: (projector_message/meeting_id)[]; + projector_countdown_ids: (projector_countdown/meeting_id)[]; + tag_ids: (tag/meeting_id)[]; + agenda_item_ids: (agenda_item/meeting_id)[]; + list_of_speakers_ids: (list_of_speakers/meeting_id)[]; + topic_ids: (topic/meeting_id)[]; + group_ids: (group/meeting_id)[]; + mediafile_ids: (mediafile/meeting_id)[]; + motion_ids: (motion/meeting_id)[]; + motion_comment_section_ids: (motion_comment_section/meeting_id)[]; + motion_category_ids: (motion_category/meeting_id)[]; + motion_block_ids: (motion_block/meeting_id)[]; + motion_workflow_ids: (motion_workflow/meeting_id)[]; + motion_statute_paragraph_ids: (motion_statute_paragraph/meetin_id)[]; + motion_poll_ids: (motion_poll/meeting_id)[]; + assignment_ids: (assignment/meeting_id)[]; + assignment_poll_ids: (assignment_poll/meeting_id)[]; + + // No relations to a meeting: + // user; OK, because not meeting-specific + // personal_note + // projection + // speaker + // motion_option + // motion_vote + // motion_comment + // motion_submitter + // motion_change_recommendation + // motion_state + // assignment_candidate + // assignment_option + // assignment_vote + + // Logos and Fonts + logo_$: mediafile/logo_$; + font_$: mediafile/font_$; + // Examples: + // logo_web_header: Mediafile; + // font_italic_pdf: Mediafile; + // The client can define these resources. There is no need + // to have whitelist/blacklist on the server. The tokens must + // be checked: They must match `[a-z]([a-z_]*[a-z])?` and must + // not be longer than 32 characters. + + // Other relations + committee_id: committee/meeting_ids; + default_meeting_for_committee_id: committee/default_meeting_id; + present_user_ids: (user/is_present_in_meeting_ids)[]; + temorary_user_ids: (user/meeting_id)[]; + guest_ids: (user/guest_meeting_ids)[]; + reference_projector_id: projector/used_as_reference_projector_meeting_id; +} + +Interface group { + id: number; + name: string; + is_superadmin_group: boolean; + is_default_group: boolean; + permissions: string[]; + + user_ids: (user/group_$_ids)[]; + mediafile_access_group_ids: (mediafile/access_group_ids)[]; + read_comment_section_ids: (motion_comment_section/read_group_ids)[]; + write_comment_section_ids: (motion_comment_section/write_group_ids)[]; + motion_poll_ids: (motion_poll/entitled_group_ids)[]; + assignment_poll_ids: (assignment_poll/entitled_group_ids)[]; + used_as_motion_poll_default: meeting/motion_poll_default_groups; + used_as_assignment_poll_default: meeting/assignment_poll_default_groups; + meeting_id: meeting/group_ids; +} + +Interface personal_note { + id: number; + note: HTML; + star: boolean; + + user_id: user/personal_note_$_ids; + content_object_id: */personal_note_ids; +} + +Interface tag { + id: number; + name: string; + + tagged_ids: (*/tag_ids)[]; + meeting_id: meeting/tag_ids; +} + +Interface agenda_item { + id: number; + item_number: string; + comment: string, + closed: boolean, + type: number, + is_internal: boolean; + is_hidden: boolean; + duration: number; // in seconds + weight: number; + level: number; // calculated. + + content_object_id: */agenda_item_id; + parent_id: agenda_item/children_ids; + children_ids: (agenda_item/parent_id)[]; + projection_ids: (projection/element_id)[]; + current_projector_ids: (projector/current_element_ids)[] + meeting_id: meeting/agenda_item_ids; +} + +Interface list_of_speakers { + id: number; + closed: boolean; + + content_object_id: */list_of_speakers_id; + speaker_ids: (speaker/list_of_speakers_id)[]; + projection_ids: (projection/element_id)[]; + current_projector_ids: (projector/current_element_ids)[] + meeting_id: meeting/list_of_speakers_ids; +} + +Interface speaker { + id: number; + begin_time: datetime; + end_time: datetime; + weight: number; + marked: boolean; + + list_of_speakers_id: list_of_speakers/speaker_ids; + user_id: user/speaker_$_ids; +} + +Interface topic { + id: number; + title: string; + text: HTML; + + attachments_id: (mediafile/attachement_ids)[]; + agenda_item_id: agenda_item/content_object_id; + list_of_speakers_id: list_of_speakers/content_object_id; + tag_ids: (tag/tagged_ids)[]; + meeting_id: meeting/topic_ids; +} + +Interface motion { + id: number; + number: string; + sequential_number: number; + title: string; + text: HTML; + amendment_paragraph_$: HTML; + modified_final_version: HTML; + reason: HTML; + category_weight: number; + state_extension: string; + recommendation_extension: string; + sort_weight: number; + created: string; + last_modified: string; + + parent_id: motion/children_ids; + children_ids: (motion/parent_id)[]; + sort_parent_id: motion/sort_children_ids; + sort_children_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 + state_id: motion_state/motion_ids; + workflow_id: motion_workflow/motion_ids; + recommendation_id: motion_state/motion_recommendation_ids; + category_id: category/motion_ids; + motion_block_id: motion_block/motion_ids; + submitter_ids: (motion_submitter/motion_id)[]; + supporter_ids: (user/supported_motion_$_ids)[]; + poll_ids: (motion_poll/motion_id)[]; + change_recommendation_ids: (motion_change_recommendation/motion_id)[]; + statute_paragraph_id: motion_statute_paragraph/motion_ids; + comment_ids: (motion_comment/motion_id)[]; + agenda_item_id: agenda_item/content_object_id; + list_of_speakers_id: list_of_speakers/content_object_id; + tag_ids: (tag/tagged_ids)[]; + attachment_ids: (mediafile/attachment_ids)[]; + projection_ids: (projection/element_id)[]; + current_projector_ids: (projector/current_element_ids)[] + personal_note_ids: (personal_note/content_object_id)[]; + meeting_id: meeting/motion_ids; +} + +Interface motion_submitter { + id: number; + weight: number; + + user_id: (user/submitted_motion_$_ids)[]; + motion_id: motion/submitter_ids; +} + +Interface motion_comment { + id: number; + comment: HTML; + + motion_id: motion/comment_ids; + section_id: motion_comment_section/comment_ids; +} + +Inteface motion_comment_section { + id: number; + name: string; + weight: number; + + comment_ids: (motion_comment/section_id)[]; + read_group_ids: (group/read_comment_section_ids)[]; + write_group_ids: (group/write_comment_section_ids)[]; + meeting_id: meeting/motion_comment_section_ids; +} + +Interface motion_category { + id: number; + name: string; + prefix: string; + weight: number; + level: number; + + parent_id: motion_category/children_ids; + children_ids: (motion_category/parent_id)[]; + motion_ids: (motion/category_id)[]; + meeting_id: meeting/category_ids; +} + +Interface motion_block { + id: number; + title: string; + internal: boolean; + + motion_ids: (motion/motion_block_id)[]; + agenda_item_id: agenda_item/content_object_id; + list_of_speakers_id: list_of_speakers/content_object_id; + projection_ids: (projection/element_id)[]; + current_projector_ids: (projector/current_element_ids)[] + meeting_id: meeting/motion_block_ids; +} + +Interface motion_change_recommendation { + id: number; + rejected: boolean; + internal: boolean; + type: number; + other_description: string; + line_from: number; + line_to: number; + text: HTML; + creation_time: datetime; + + motion_id: motion/change_recommendation_ids; +} + +Interface motion_state { + id: number; + name: string; + recommendation_label: string; + css_class: string; + restrictions: string[], + allow_support: boolean; + allow_create_poll: boolean; + allow_submitter_edit: boolean; + set_number: boolean; + show_state_extension_field: boolean; + merge_amendment_into_final: number; + show_recommendation_extension_field: boolean; + + next_state_ids: (motion_state/previous_state_ids)[]; + previous_state_ids: (motion_state/next_state_ids)[]; + motion_ids: (motion/state_id)[]; + motion_recommendation_ids: (motion/recommendation_id)[]; + workflow_id: motion_workflow/state_ids; + first_state_of_workflow_id: motion_workflow/first_state_id; +} + +Interface motion_workflow { + id: number; + name: string; + + state_ids: (motion_state/workflow_id)[]; + first_state_id: motion_state/first_state_of_workflow_id; + motion_ids: (motion/workflow_id)[]; + default_workflow_meeting_id: meeting/motions_default_workflow_id; + default_statute_amendments_meeting_id: meeting/motions_default_statute_amendments_workflow_id; + meeting_id: meeting/motion_workflow_ids; +} + +Interface motion_statute_paragraph { + id: number; + title: string; + text: HTML; + weight: number; + + motion_ids: (motion/statute_paragraph_id)[]; + meeting_id: meeting/motion_statute_paragraph_ids; +} + +Interface motion_poll { + id: number; + pollmethod: string; + state: number; + type: string; + title: string; + onehundred_percent_base: string; + majority_method: string; + votesvalid: decimal(6); + votesinvalid: decimal(6); + votescast: decimal(6); + user_has_voted: boolean; // This is user specific and set during restriction + + motion_id: motion/poll_ids; + option_ids: (motion_option/poll_id)[]; + voted_ids: (user/motion_poll_voted_$_ids)[]; + entitled_group_ids: (group/motion_poll_ids)[]; + projection_ids: (projection/element_id)[]; + current_projector_ids: (projector/current_element_ids)[] + meeting_id: meeting/motion_poll_ids; +} + +Interface motion_option { + id: number; + yes: decimal(6); + no: decimal(6); + abstain: decimal(6); + + poll_id: motion_poll/option_ids; + vote_ids: (motion_vote/option_id)[]; +} + +Interface motion_vote { + id: number; + weight: decimal(6); + value: string; + + option_id: motion_option/vote_ids; + user_id: user/motion_vote_$_ids; +} + +Interface assignment { + id: number; + title: string; + description: HTML; + open_posts: number; + phase: number; + default_poll_description: string; + number_poll_candidates: boolean; + + assignment_candidate_ids: (assignment_candidate/assignment_id)[]; + poll_ids: (assignment_poll/assignment_id)[]; + agenda_item_id: agenda_item/content_object_id; + list_of_speakers_id: list_of_speakers/content_object_id; + tag_ids: (tag/tagged_ids)[]; + attachment_ids: (mediafile/attachment_ids)[]; + projection_ids: (projection/element_id)[]; + current_projector_ids: (projector/current_element_ids)[] + meeting_id: meeting/assignment_ids; +} + +Inteface assignment_candidate { + id: number; + weight: number; + + assignment_id: assignment/assignment_candidate_ids; + user_id: user/assignment_candidate_$_ids; +} + +Interface assignment_poll { + id: number; + description: string; + pollmethod: string; + votes_amount: number; + allow_multiple_votes_per_candidate: boolean; + global_abstain: boolean; + global_no: boolean; + amount_global_abstain: decimal(6); + amount_global_no: decimal(6); + state: number; + title: string; + type: string; + onehundred_percent_base: string; + majority_method: string; + votescast: decimal(6); + votesinvalid: decimal(6); + votesvalid: decimal(6); + user_has_voted: boolean; // This is user specific and set during restriction + + assignment_id: assignment/poll_ids; + voted_ids: (user/assignment_poll_voted_$_ids)[]; + entitled_group_ids: (group/assignment_poll_ids)[]; + option_ids: (assignment_option/poll_id)[]; + projection_ids: (projection/element_id)[]; + current_projector_ids: (projector/current_element_ids)[] + meeting_id: meeting/assignment_poll_ids; +} + +Interface assignment_option { + id: number; + yes: decimal(6); + no: decimal(6); + abstain: decimal(6); + weight: number; + + poll_id: assignment_poll/option_ids; + user_id: user/assignment_option_$_ids; + vote_ids: (assignment_vote/option_id)[]; +} + +Interface assignment_vote { + id: number; + value: string; + weight: decimal(6); + + option_id: assignment_option/vote_ids; + user_id: user/assignment_vote_$_ids; +} + +// Mediafiles are delivered by the mediafile server with the URL +// `/media//path` +Interface mediafile { + id: number; + title: string; + is_directory: boolean; + filesize: number; // Note: in bytes, not the human readable format anymore + filename: string; // Note: The uploaded filename. Filename and parent_id + // must be unique as well as title and parent_id must be unique. + mimetype: string; + pdf_information: JSON; + create_timestamp: datetime; + path: string; // Note: calcuated + inherited_access_group_ids: boolean | number[]; // Note: calculated and no + // reverse-relation for the group ids. + + access_group_ids: (group/mediafile_access_group_ids)[]; + parent_id: mediafile/children_ids; + children_ids: (mediafile/parent_id)[]; + list_of_speakers_id: list_of_speakers/content_object_id; + projection_ids: (projection/element_id)[]; + current_projector_ids: (projector/current_element_ids)[] + attachment_ids: (*/attachment_ids)[]; + meeting_id: meeting/mediafile_ids; + + // Backreferences for meetings, if a mediafile is used as a special resource + logo_$: meeting/logo_$; + font_$: meeting/font_$; +} Interface projector { id: number; + name: string; scale: number; scroll: number; - name: string; width: number; aspect_ratio_numerator: number; aspect_ratio_denominator: number; @@ -34,44 +709,49 @@ Interface projector { show_title: boolean; show_logo: boolean - element: projection; - element_fqid: Fqid; - elements_preview: projection[]; - elements_history: projection[]; - reference_projector_id: projector; + current_projection_ids: (projection/current_projector_ids)[]; + // A relation to the currently projected elements to get a direct link, if + // the element is projected. + current_element_ids: (*/projector_ids)[]; + elements_preview: (projection/projector_preview_ids)[]; + elements_history: (projection/projector_history_ids)[]; + used_as_reference_projector_meeting_id: meeting/reference_projector_id; projectiondefault_ids: projectiondefault[]; - meeting_id: meeting; + meeting_id: meeting/projector_ids; } + +// A projection is a M2M model between an element that is assigned to a +// projector. This element can either be the current one projected, in the +// preview, or in the history, but not more than one once. A projection is +// projector-specific, meaning that once a projection is created for a projector +// and element, these references will not change. Interface projection { id: number; - projector_id: projector; - projector_history_ids: projector; - projector_preview_id: projector; - element: Fqid; + current_projector_id: projector/current_projection_ids; + projector_history_id: projector/elements_preview; + projector_preview_id: projector/elements_history; + element_id: */projection_ids; options: JSON; } + Interface projectiondefault { id: number; name: string; display_name: string; - projector_id: projector; - meeting_id: meeting; + projector_id: projector/projectiondefault_ids; + meeting_id: meeting/projectiondefault_ids; } -Interface tag { - id: number; - name: string; - tagged_ids: Fqid[]; - meeting_id: meeting; -} Interface projector_message { id: number; message: HTML; - projection_id: projection[]; - meeting_id: meeting; + projection_ids: (projection/element_id)[]; + current_projector_ids: (projector/current_element_ids)[] + meeting_id: meeting/projector_message_ids; } + Interface projector_countdown { id: number; title: string; @@ -80,577 +760,7 @@ Interface projector_countdown { countdown_time: number; // float? running: boolean; - projection_id: projection[]; - meeting_id: meeting; -} -Interface agenda_item { - id: number; - item_number: string; - comment: string, - closed: boolean, - type: number, - is_internal: boolean; - is_hidden: boolean; - duration: number; // in seconds - weight: number; - level: number; //für client nicht unbedingt nötig. - - content_object_id: Fqid; - parent_id: agenda_item; - children_ids: agenda_item[]; - projection_id: projection[]; - meeting_id: meeting; -} -Interface list_of_speakers { - closed: boolean; - - content_object_id: Fqid; - speaker_ids: speaker[]; - projection_id: projection[]; - meeting_id: meeting; -} -Interface speaker { - id: number; - begin_time: datetime; - end_time: datetime; - weight: number; - marked: boolean; - - list_of_speakers_id: list_of_speakers; - user_id: user; -} -Interface topic { - id: number; - title: string; - text: HTML; - - attachments_id: mediafile[]; - agenda_item_id: agenda_item; - meeting_id: meeting; -} -Interface user { - id: number; - username: string; - last_email_send: string; - is_active: boolean; // TODO @emanuel: Ist ein Nutzer systemweit (organisationsweit) aktiv/inaktiv? - default_password: string; - is_committee: boolean; - about_me: HTML; - gender: string, -// TODO: auth -//auth_type: string; -// auth-spezifische felder? - title: string; - first_name: string; - last_name: string; - comment: HTML; - number: string; - email: string; - structure_level: string; - - role_id: role; // Attention: prevent impelenting a "default-role" or let a - // user create such a role! This would cause the user_ids-array for this - // role to explode in size. If a user has no role, it should be handles as - // the user has no permission in the organisation and is a "normal" delegate - // there. Just a few users (expected <100) should even get a role and all - // other don't. - - - is_present_in_meeting_ids: meeting[]; - meeting_id: meeting; // Temporary users - guest_meeting_ids: meeting[]; // Links to meeting/guest_ids - - // All foreign keys are meeting-specific: - // - Keys are smaller (Space is in O(n^2) for n keys - // in the relation), so this saves storagespace - // - This makes quering things like this possible: - // "Give me all groups for User X in Meeting Y" without - // the need to get all groups and filter them for the meeting - group__ids: group[]; - personal_note__ids: personal_note[]; - projection__ids: projection[]; - supported_motion__ids: motion[]; - submitted_motion__ids: motion_submitter[]; - assignment_related_user__ids: assignment_related_user[]; - motion_vote__ids: motion_vote[]; - assignment_vote__ids: assignment_vote[]; - motion_voted_poll__ids: motion_poll[]; - assignment_voted_poll__ids: assignment_poll[]; -} -Interface group { - id: number; - name: string; - is_superadmin_group: boolean; - is_default_group: boolean; - permissions: string[]; - - user_ids: user[]; - mediafile_access_group_ids: mediafile[]; - read_comment_section_ids: motion_comment_section[]; - write_comment_section_ids: motion_comment_section[]; - motion_poll_ids: motion_poll[]; - meeting_id: meeting; -} -Interface personal_note { - id: number; - note: HTML; - star: boolean; - - user_id: user; - element: Fqid; - meeting_id: meeting; -} -// Mediafiles are delivered by the mediafile server with the URL -// `/media//path` -Interface mediafile { - id: number; - title: string; - is_directory: boolean; - filesize: number; // Note: in bytes, not the human readable format anymore - filename: string; // Note: The uploaded filename. Filename and parent_id - // must be unique as well as title and parent_id must be unique. - mimetype: string; - create_timestamp: datetime; - path: string; // Note: calcuated - inherited_access_group_ids: boolean | number[]; // Note: calculated and no - // reverse-relation for the gorup ids. - - access_group_ids: group[]; - parent_id: mediafile; - children_ids: mediafile[]; - list_of_speakers_id: list_of_speakers; - projection_ids: projection[]; - attachement_ids: Fqid[]; - meeting_id: meeting; - - // Backreferences for meetings, if a mediafile is used as a special resource - // TODO: The id here is not necessary. This would also work: - // used_as: string[]; - // with a list of tokens with `logo_` and `font_` prefix. E.g.: - // used_as: ["logo_web_header", "font_italic", "logo_projector_footer"] - logo_: meeting; - font_: meeting; -} - -// New: Resource -// Resources are organsation wide mediafiles. There should not be a file-manager -// on this layer, but a way to customize fonts, logos and other organisation-wide -// resources. There are no permission checks (so the user must not be logged in to -// access the resources). A resource has a token, e.g. `web_header` or -// `pdf_font_italic`, so the client knowns, where to put the resource. They are -// delivered by the media service with the URL `/resource/`. -Interface Resource { - id: number; - token: string; - filesize: number; - mimetype: string; - - organisation_id: organisation; -} -Interface motion { - id: number; - identifier: string; - title: string; - text: HTML; - amendment_paragraph_: HTML; - modified_final_version: HTML; - reason: HTML; - category_weight: number; - state_extension: string; - recommendation_extension: string; - sort_parent_id: motion; - sort_weight: number; - created: string; - last_modified: string; - - parent_id: motion; - children_ids: motion[]; - origin_id: motion; // Note: The related motions may not be in the same meeting - derived_motion_ids: motion[]; // Note: The related motions may not be in the same meeting - state_id: motion_state; - workflow_id: motion_workflow; - recommendation_id: motion_state; - category_id: category; - motion_block_id: motion_block; - submitter_ids: motion_submitter[]; - supporter_ids: user[]; - poll_ids: motion_poll[]; - change_recommendation_ids: motion_change_recommendation[]; - statute_paragraph_id: motion_statute_paragraph; - comment_ids: motion_comment[]; - agenda_item_id: agenda_item; - list_of_speakers_id: list_of_speakers; - tag_ids: tag[]; - attachment_ids: mediafile[]; - meeting_id: meeting; -} -Interface motion_poll { - id: number; - pollmethod: string; - state: number; - type: string; - title: string; - onehundred_percent_base: string; - majority_method: string; - votesvalid: decimal(6); - votesinvalid: decimal(6); - votescast: decimal(6); - - option_ids: motion_option[]; - motion_id: motion; - voted_ids: user[]; - group_ids: group[]; - meeting_id: meeting; -} -Interface motion_option { - id: number; - yes: decimal(6); - no: decimal(6); - abstain: decimal(6); - - vote_ids: motion_vote[]; -} -Interface motion_vote { - id: number; - weight: decimal(6); - value: string; - - option_id: motion_option; - user_id: user; -} -Interface motion_submitter { - id: number; - weight: number; - - user_id: user; - motion_id: motion; -} -Interface motion_comment { - id: number; - comment: HTML; - - motion_id: motion; - section_id: motion_comment_section; -} -Inteface motion_comment_section { - id: number; - name: string; - weight: number; - - read_group_ids: group[]; - write_group_ids: group[]; - meeting_id: meeting; -} -Interface motion_category { - id: number; - name: string; - prefix: string; - weight: number; - level: number; - - parent_id: motion_category; - children_ids: motion_category[]; - motion_ids: motion[]; - meeting_id: meeting; -} -Interface motion_block { - id: number; - title: string; - internal: boolean; - - motion_ids: motion[]; - agenda_item_id: agenda_item; - list_of_speakers_id: list_of_speakers; - meeting_id: meeting; -} -Interface motion_change_recommendation { - id: number; - rejected: boolean; - internal: boolean; - type: number; - other_description: string; - line_from: number; - line_to: number; - text: HTML; - creation_time: datetime; - - motion_id: motion; -} -Interface motion_state { - id: number; - name: string; - recommendation_label: string; - css_class: string; - restrictions: string[], - allow_support: boolean; - allow_create_poll: boolean; - allow_submitter_edit: boolean; - set_identifier: boolean; - show_state_extension_field: boolean; - merge_amendment_into_final: number; - show_recommendation_extension_field: boolean; - - next_state_ids: motion_state[]; - previous_state_ids: motion_state[]; - motion_ids: motion[]; - motion_recommendation_ids: motion[]; - workflow_id: motion_workflow; - first_state_of_workflow_id: motion_workflow; -} -Interface motion_workflow { - id: number; - name: string; - - state_ids: motion_state[]; - first_state_id: motion_state; - motion_ids: motion[]; - meeting_id: meeting; -} -Interface motion_statute_paragraph { - id: number; - title: string; - text: HTML; - weight: number; - - motion_ids: motion[]; - meeting_id: meeting; -} -Interface assignment { - id: number; - title: string; - description: HTML; - open_posts: number; - phase: number; - poll_description_default: string; - - assignment_related_user_ids: assignment_related_user[]; - poll_ids: assignment_poll[]; - agenda_item_id: agenda_item; - list_of_speakers_id: list_of_speakers; - tag_ids: tag[]; - attachment_ids: mediafile[]; - meeting_id: meeting; -} -Inteface assignment_related_user { - id: number; - elected: boolean; - weight: number; - - assignment_id: assignment; - user_id: user; -} -Interface assignment_poll { - id: number; - allow_multiple_votes_per_candidate: boolean; - global_abstain: boolean; - global_no: boolean; - amount_global_abstain: decimal(6); - amount_global_no: decimal(6); - pollmethod: string; - state: number; - title: string; - description: string; - type: string; - onehundred_percent_base: string; - majority_method: string; - votes_amount: number; - votescast: decimal(6); - votesinvalid: decimal(6); - votesvalid: decimal(6); - - assignment_id: assignment; - voted_ids: user[]; - group_ids: group[]; - option_ids: assignment_option[]; - meeting_id: meeting; -} -Interface assignment_option { - id: number; - yes: decimal(6); - no: decimal(6); - abstain: decimal(6); - weight: number; - - poll_id: assignment_poll; - user_id: user; -} -Interface assignment_vote { - id: number; - value: string; - weight: decimal(6); - - option_id: assignment_option; - user_id: user; -} - -// New models -Interface meeting { - id: number; - identifier: string; // For unique urls. - is_template: boolean; // Unique within a committee - enable_anonymous: boolean; - - // Old "general_*" configs - name: string; - description: string; - location: string; - start_time: datetime; - end_time: datetime; - welcome_title: string; - welcome_text: HTML; - - // Export section still needed? - // Or should this be moved into committee-scope or organisation-scope? - export_csv_encoding: string; - export_csv_separator: string; - export_pdf_pagenumber_alignment: string; - export pdf_fontsize: number; - export_pdf_pagesize: string; - - // TODO: custom translations - // TODO: @emanuel: Are they meeting-specific, organsation-wide or should - // both have custom translation? - - // TODO: @emanuel Is this right here in a meeting? - users_sort_by: string; - users_enable_presence_view: boolean; - - // Motions - motions_default_workflow: workflow; // TODO: relation - motions_default_statute_amendments_workflow: workflow; // TODO: relation - motions_preamble: string; - motions_default_line_numbering: string; - motions_line_length: number; - motions_reason_required: boolean; - motions_enable_text_on_projector: boolean; - motions_enable_reason_on_projector: boolean; - motions_enable_sidebox_on_projector: boolean; - motions_enable_resommendation_on_projector: boolean; - motions_show_referring_motions: boolean; - motions_show_sequential_number: boolean; - motions_recommendations_by: string; - motions_statute_recommendations_by: string; - motions_recommendation_text_mode: string; - motions_default_sorting: string; - motions_identifier_type: string; - motions_identifier_min_digits: number; - motions_identifier_with_blank: boolean; - motions_statutes_enabled: boolean; - motions_amendments_enabled: boolean; - motions_amendments_in_main_list: boolean; - motions_amendments_prefix: string; - motions_amendments_text_mode: string; - motions_amendments_multiple_paragraphs: boolean; - motions_supporters_min_amount: number; - motions_supporters_enable_autoremove: boolean; - motions_export_title: string; - motions_export_preamble: string; - motions_export_submitter_recommendation: boolean; - motions_export follow_recommendation: boolean; - - // Assignments - assignments_poll_add_candidates_to_list_of_spekaers: boolean; - assignemnts_export_pdf_title: string; - assignments_export_pdf_preamble: string; - - projector_ids: projector[]; - projectiondefault_ids: projectiondefault[]; - projector_countdown_ids: projector_countdown[]; - projector_message_ids: projector_message[]; - tag_ids: tag[]; - agenda_item_ids: agenda_item[]; - list_of_speakers_ids: list_of_speakers[]; - topic_ids: topic[]; - group_ids: group[]; - personal_note_ids: personal_note[]; - mediafile_ids: mediafile[]; - motion_ids: motion[]; - motion_poll_ids: motion_poll[]; - motion_comment_section_ids: motion_comment_section[]; - motion_category_ids: motion_category[]; - motion_block_ids: motion_block[]; - motion_workflow_ids: motion_workflow[]; - motion_statute_paragraph_ids: motion_statute_paragraph[]; - assignment_ids: assignment[]; - assignment_poll_ids: assignment_poll[]; - - // No relations to a meeting: - // user; OK, because not meeting-specific - // projection - // speaker - // motion_option - // motion_vote - // motion_comment - // motion_submitter - // motion_change_recommendation - // motion_state - // assignment_related_user - // assignment_option - // assignment_vote - - // Why: These are mostly M2M models or ones, that will never have a list view. - // There would be no need to link them to the meeting, if they can be - // reached through a parent model. E.g. a motion_option can be reached through - // a motion_poll. There will never be the need to make something like "show all - // motion_options at once". - // TODO: Is this right for all above stated models? - // TODO: We might link user to a meeting. A member is defined by checking, - // if a user is assigned to at least one group. This "query" must be checked, - // if it can be performed. - - // Logos and Fonts - logo_: Mediafile; - font_: Mediafile; - // Examples: - // logo_web_header: Mediafile; - // font_italic_pdf: Mediafile; - // The client can define these resources. There is no need - // to have whitelist/blacklist on the server. The tokens must - // be checked: They must match `[a-z]([a-z_]*[a-z])?` and must - // not be longer than 32 characters. - - // Other relations - committee_id: committee; // Links to committee/meeting_ids - default_meeting_for_committee_id: committee; // Links to committee/default_meeting_id - present_user_ids: user[]; // Links to user/is_present_in_meeting_ids - guest_ids: user[]; // Links to users/guest_meeting_ids - temorary_user_ids: user[]; // Links to user/meeting_id -} -Interface committee { - id: number; - name: string; - description: string; // TODO: @emanuel Or HTML? Or not needed (-> UI decision) - - meeting_ids: meeting[]; - default_meting_id: meeting; - member_ids: user[]; - manager_ids: user[]; - forward_to_committee_ids: committee[]; - received_forwardings_from_committee_ids: committee[]; - organisation_id: organisation; -} -Interface organisation { - id: number; - name: string; - description: HTML; // TODO: @emanuel Needed?? - - // Configs: - legal_notice: string; - privacy_policy: string; - login_text: string; - theme: string; - - // TODO: OS3 user configs (export, email, ...) - - committee_ids: committee[]; - role_ids: role[]; - resource_ids: resource[]; -} -Interface role { - id: number; - name: string; - permissions: string[]; // 'can_manage_committees', 'can_manage_users', TODO: more permissions - is_superadmin_role: boolean; - orginasation_id: number; - user_ids: user[]; + projection_ids: (projection/element_id)[]; + current_projector_ids: (projector/current_element_ids)[] + meeting_id: meeting/projector_countdown_ids; }