Merge pull request #5741 from FinnStutzenstein/models

Propagate changes in OS3
This commit is contained in:
Finn Stutzenstein 2020-12-01 13:54:35 +01:00 committed by GitHub
commit a87901aee0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 107 additions and 51 deletions

View File

@ -41,9 +41,6 @@
"committee_as_member_ids": [], "committee_as_member_ids": [],
"committee_as_manager_ids": [], "committee_as_manager_ids": [],
"projection_ids": [],
"current_projector_ids": [],
"group_$_ids": ["1"], "group_$_ids": ["1"],
"group_$1_ids": [2], "group_$1_ids": [2],
"speaker_$_ids": ["1"], "speaker_$_ids": ["1"],
@ -61,8 +58,12 @@
"option_$1_ids": [3, 4], "option_$1_ids": [3, 4],
"vote_$_ids": ["1"], "vote_$_ids": ["1"],
"vote_$1_ids": [7], "vote_$1_ids": [7],
"projection_$_ids": [],
"current_projector_$_ids": [],
"vote_delegated_vote_$_ids": ["1"], "vote_delegated_vote_$_ids": ["1"],
"vote_delegated_vote_$1_ids": [7] "vote_delegated_vote_$1_ids": [7],
"vote_delegated_$_to_id": [],
"vote_delegations_$_from_ids": []
}, },
{ {
"id": 2, "id": 2,
@ -91,9 +92,6 @@
"committee_as_member_ids": [], "committee_as_member_ids": [],
"committee_as_manager_ids": [], "committee_as_manager_ids": [],
"projection_ids": [],
"current_projector_ids": [],
"group_$_ids": ["1"], "group_$_ids": ["1"],
"group_$1_ids": [6], "group_$1_ids": [6],
"speaker_$_ids": ["1"], "speaker_$_ids": ["1"],
@ -107,7 +105,11 @@
"option_$_ids": ["1"], "option_$_ids": ["1"],
"option_$1_ids": [6, 8], "option_$1_ids": [6, 8],
"vote_$_ids": [], "vote_$_ids": [],
"vote_delegated_vote_$_ids": [] "projection_$_ids": [],
"current_projector_$_ids": [],
"vote_delegated_vote_$_ids": [],
"vote_delegated_$_to_id": [],
"vote_delegations_$_from_ids": []
}, },
{ {
"id": 3, "id": 3,
@ -136,9 +138,6 @@
"committee_as_member_ids": [], "committee_as_member_ids": [],
"committee_as_manager_ids": [], "committee_as_manager_ids": [],
"projection_ids": [],
"current_projector_ids": [],
"group_$_ids": [], "group_$_ids": [],
"speaker_$_ids": ["1"], "speaker_$_ids": ["1"],
"speaker_$1_ids": [4, 8, 9], "speaker_$1_ids": [4, 8, 9],
@ -152,7 +151,11 @@
"option_$_ids": ["1"], "option_$_ids": ["1"],
"option_$1_ids": [5, 7], "option_$1_ids": [5, 7],
"vote_$_ids": [], "vote_$_ids": [],
"vote_delegated_vote_$_ids": [] "projection_$_ids": [],
"current_projector_$_ids": [],
"vote_delegated_vote_$_ids": [],
"vote_delegated_$_to_id": [],
"vote_delegations_$_from_ids": []
}], }],
"role": [ "role": [
{ {
@ -201,6 +204,9 @@
"conference_los_restriction": false, "conference_los_restriction": false,
"conference_stream_url": "", "conference_stream_url": "",
"conference_stream_poster_url": "", "conference_stream_poster_url": "",
"conference_open_microphone": true,
"conference_open_video": true,
"conference_auto_connect_next_speakers": true,
"projector_default_countdown_time": 60, "projector_default_countdown_time": 60,
"projector_countdown_warning_time": 0, "projector_countdown_warning_time": 0,
@ -225,6 +231,7 @@
"list_of_speakers_show_amount_of_speakers_on_slide": true, "list_of_speakers_show_amount_of_speakers_on_slide": true,
"list_of_speakers_present_users_only": false, "list_of_speakers_present_users_only": false,
"list_of_speakers_show_first_contribution": false, "list_of_speakers_show_first_contribution": false,
"list_of_speakers_enable_point_of_order_speakers": true,
"motions_default_workflow_id": 1, "motions_default_workflow_id": 1,
"motions_default_amendment_workflow_id": 1, "motions_default_amendment_workflow_id": 1,
@ -1010,6 +1017,7 @@
"end_time": 1584512638, "end_time": 1584512638,
"weight": null, "weight": null,
"marked": false, "marked": false,
"point_of_order": false,
"list_of_speakers_id": 1, "list_of_speakers_id": 1,
"user_id": 2, "user_id": 2,
@ -1021,6 +1029,7 @@
"end_time": null, "end_time": null,
"weight": 2, "weight": 2,
"marked": false, "marked": false,
"point_of_order": false,
"list_of_speakers_id": 1, "list_of_speakers_id": 1,
"user_id": 1, "user_id": 1,
@ -1032,6 +1041,7 @@
"end_time": null, "end_time": null,
"weight": 3, "weight": 3,
"marked": false, "marked": false,
"point_of_order": false,
"list_of_speakers_id": 1, "list_of_speakers_id": 1,
"user_id": 2, "user_id": 2,
@ -1043,6 +1053,7 @@
"end_time": null, "end_time": null,
"weight": 1, "weight": 1,
"marked": false, "marked": false,
"point_of_order": false,
"list_of_speakers_id": 3, "list_of_speakers_id": 3,
"user_id": 1, "user_id": 1,
@ -1054,6 +1065,7 @@
"end_time": null, "end_time": null,
"weight": 0, "weight": 0,
"marked": false, "marked": false,
"point_of_order": false,
"list_of_speakers_id": 3, "list_of_speakers_id": 3,
"user_id": 2, "user_id": 2,
@ -1065,6 +1077,7 @@
"end_time": null, "end_time": null,
"weight": 1, "weight": 1,
"marked": false, "marked": false,
"point_of_order": false,
"list_of_speakers_id": 7, "list_of_speakers_id": 7,
"user_id": 2, "user_id": 2,
@ -1076,6 +1089,7 @@
"end_time": null, "end_time": null,
"weight": 2, "weight": 2,
"marked": false, "marked": false,
"point_of_order": false,
"list_of_speakers_id": 7, "list_of_speakers_id": 7,
"user_id": 3, "user_id": 3,
@ -1087,6 +1101,7 @@
"end_time": null, "end_time": null,
"weight": 1, "weight": 1,
"marked": false, "marked": false,
"point_of_order": false,
"list_of_speakers_id": 8, "list_of_speakers_id": 8,
"user_id": 1, "user_id": 1,
@ -1098,6 +1113,7 @@
"end_time": null, "end_time": null,
"weight": 1, "weight": 1,
"marked": false, "marked": false,
"point_of_order": false,
"list_of_speakers_id": 11, "list_of_speakers_id": 11,
"user_id": 1, "user_id": 1,
@ -1109,6 +1125,7 @@
"end_time": null, "end_time": null,
"weight": 2, "weight": 2,
"marked": false, "marked": false,
"point_of_order": false,
"list_of_speakers_id": 11, "list_of_speakers_id": 11,
"user_id": 2, "user_id": 2,
@ -1120,6 +1137,7 @@
"end_time": null, "end_time": null,
"weight": 3, "weight": 3,
"marked": false, "marked": false,
"point_of_order": false,
"list_of_speakers_id": 11, "list_of_speakers_id": 11,
"user_id": 3, "user_id": 3,
@ -1131,6 +1149,7 @@
"end_time": null, "end_time": null,
"weight": 1, "weight": 1,
"marked": false, "marked": false,
"point_of_order": false,
"list_of_speakers_id": 14, "list_of_speakers_id": 14,
"user_id": 3, "user_id": 3,
@ -1142,6 +1161,7 @@
"end_time": null, "end_time": null,
"weight": 2, "weight": 2,
"marked": false, "marked": false,
"point_of_order": false,
"list_of_speakers_id": 14, "list_of_speakers_id": 14,
"user_id": 2, "user_id": 2,

View File

@ -139,14 +139,6 @@ user:
type: relation-list type: relation-list
to: committee/manager_ids to: committee/manager_ids
# Projection
projection_ids:
type: relation-list
to: projection/element_id
current_projector_ids:
type: relation-list
to: projector/current_element_ids
# All foreign keys are meeting-specific: # All foreign keys are meeting-specific:
# - Keys are smaller (Space is in O(n^2) for n keys # - Keys are smaller (Space is in O(n^2) for n keys
# in the relation), so this saves storagespace # in the relation), so this saves storagespace
@ -214,6 +206,18 @@ user:
fields: fields:
type: relation-list type: relation-list
to: assignment_candidate/user_id to: assignment_candidate/user_id
projection_$_ids:
type: template
replacement: meeting_id
fields:
type: relation-list
to: projection/element_id
current_projector_$_ids:
type: template
replacement: meeting_id
fields:
type: relation-list
to: projector/current_element_ids
vote_delegated_$_to_id: vote_delegated_$_to_id:
type: template type: template
replacement: meeting_id replacement: meeting_id
@ -343,6 +347,9 @@ meeting:
conference_los_restriction: boolean conference_los_restriction: boolean
conference_stream_url: string conference_stream_url: string
conference_stream_poster_url: string conference_stream_poster_url: string
conference_open_microphone: boolean
conference_open_video: boolean
conference_auto_connect_next_speakers: boolean
# Projector # Projector
projector_default_countdown_time: number projector_default_countdown_time: number
@ -410,6 +417,7 @@ meeting:
list_of_speakers_show_amount_of_speakers_on_slide: boolean list_of_speakers_show_amount_of_speakers_on_slide: boolean
list_of_speakers_present_users_only: boolean list_of_speakers_present_users_only: boolean
list_of_speakers_show_first_contribution: boolean list_of_speakers_show_first_contribution: boolean
list_of_speakers_enable_point_of_order_speakers: boolean
# Motions # Motions
motions_default_workflow_id: motions_default_workflow_id:
@ -957,6 +965,7 @@ speaker:
type: number type: number
default: 10000 default: 10000
marked: boolean marked: boolean
point_of_order: boolean
list_of_speakers_id: list_of_speakers_id:
type: relation type: relation
@ -1862,18 +1871,31 @@ projector:
type: generic-relation-list type: generic-relation-list
to: to:
collections: collections:
- motion - collection: motion
- mediafile field: current_projector_ids
- list_of_speakers - collection: mediafile
- motion_block field: current_projector_ids
- assignment - collection: list_of_speakers
- agenda_item field: current_projector_ids
- topic - collection: motion_block
- user field: current_projector_ids
- poll - collection: assignment
- projector_message field: current_projector_ids
- projector_countdown - collection: agenda_item
field: current_projector_ids field: current_projector_ids
- collection: topic
field: current_projector_ids
- collection: poll
field: current_projector_ids
- collection: projector_message
field: current_projector_ids
- collection: projector_countdown
field: current_projector_ids
- collection: user
field:
name: current_projector_$_ids
type: structured-relation
replacement: meeting_id
equal_fields: meeting_id equal_fields: meeting_id
preview_projection_ids: preview_projection_ids:
type: relation-list type: relation-list
@ -1920,18 +1942,31 @@ projection:
type: generic-relation type: generic-relation
to: to:
collections: collections:
- motion - collection: motion
- mediafile field: projection_ids
- list_of_speakers - collection: mediafile
- motion_block field: projection_ids
- assignment - collection: list_of_speakers
- agenda_item field: projection_ids
- topic - collection: motion_block
- user field: projection_ids
- poll - collection: assignment
- projector_message field: projection_ids
- projector_countdown - collection: agenda_item
field: projection_ids field: projection_ids
- collection: topic
field: projection_ids
- collection: poll
field: projection_ids
- collection: projector_message
field: projection_ids
- collection: projector_countdown
field: projection_ids
- collection: user
field:
name: projection_$_ids
type: structured-relation
replacement: meeting_id
equal_fields: meeting_id equal_fields: meeting_id
meeting_id: meeting_id:
type: relation type: relation

View File

@ -1,20 +1,21 @@
# Modelsvalidate # Modelsvalidator
Modelsvalidate is a tool to validate the models.yml file, that is used in the Modelsvalidator is a tool to validate the models.yml file
development process of OpenSlides 4.
## Run ## Run
Build first: `go build ./...`.
The tool requires the content of the models.yml. It can be provided via stdin, a The tool requires the content of the models.yml. It can be provided via stdin, a
file system path or an url starting with http:// or https://. file system path or an url starting with http:// or https://.
``` ```
cat models.yaml | modelstool cat models.yaml | modelsvalidator
modelstool openslides/docs/models.yml modelsvalidator openslides/docs/models.yml
modelstool https://raw.githubusercontent.com/OpenSlides/OpenSlides/openslides4-dev/docs/models.yml modelsvalidator https://raw.githubusercontent.com/OpenSlides/OpenSlides/openslides4-dev/docs/models.yml
``` ```
The tool returns with status code 0 and no content, if the given content is The tool returns with status code 0 and no content, if the given content is
valid. It returns with a positive status code and some error messages if not. valid. It returns with a positive status code and some error messages if not.