From b8ba1dddf31b7e91d7f8d1438f65645378c5b950 Mon Sep 17 00:00:00 2001 From: Oskar Hahn Date: Wed, 15 Jul 2026 15:01:06 +0200 Subject: [PATCH 1/2] go generate --- datastore/dsfetch/fields_generated.go | 27 + datastore/dskey/gen_collection_fields.go | 1075 ++++++++++---------- datastore/dsmodels/models_generated.go | 123 ++- datastore/field_def.go | 4 +- datastore/pgtest/sql/schema_relational.sql | 53 +- meta | 2 +- metagen/field_def.go | 48 +- 7 files changed, 736 insertions(+), 596 deletions(-) diff --git a/datastore/dsfetch/fields_generated.go b/datastore/dsfetch/fields_generated.go index 3f6aa6746..f1934f0e0 100644 --- a/datastore/dsfetch/fields_generated.go +++ b/datastore/dsfetch/fields_generated.go @@ -2336,6 +2336,15 @@ func (r *Fetch) MeetingUser_Comment(meetingUserID int) *ValueString { return &ValueString{fetch: r, key: key} } +func (r *Fetch) MeetingUser_EntitledAtPollIDs(meetingUserID int) *ValueIntSlice { + key, err := dskey.FromParts("meeting_user", meetingUserID, "entitled_at_poll_ids") + if err != nil { + return &ValueIntSlice{err: err} + } + + return &ValueIntSlice{fetch: r, key: key} +} + func (r *Fetch) MeetingUser_GroupIDs(meetingUserID int) *ValueIntSlice { key, err := dskey.FromParts("meeting_user", meetingUserID, "group_ids") if err != nil { @@ -2345,6 +2354,15 @@ func (r *Fetch) MeetingUser_GroupIDs(meetingUserID int) *ValueIntSlice { return &ValueIntSlice{fetch: r, key: key, required: true} } +func (r *Fetch) MeetingUser_HistoryEntryIDs(meetingUserID int) *ValueIntSlice { + key, err := dskey.FromParts("meeting_user", meetingUserID, "history_entry_ids") + if err != nil { + return &ValueIntSlice{err: err} + } + + return &ValueIntSlice{fetch: r, key: key} +} + func (r *Fetch) MeetingUser_ID(meetingUserID int) *ValueInt { key, err := dskey.FromParts("meeting_user", meetingUserID, "id") if err != nil { @@ -6854,6 +6872,15 @@ func (r *Fetch) Poll_EntitledGroupIDs(pollID int) *ValueIntSlice { return &ValueIntSlice{fetch: r, key: key} } +func (r *Fetch) Poll_EntitledMeetingUserIDs(pollID int) *ValueIntSlice { + key, err := dskey.FromParts("poll", pollID, "entitled_meeting_user_ids") + if err != nil { + return &ValueIntSlice{err: err} + } + + return &ValueIntSlice{fetch: r, key: key} +} + func (r *Fetch) Poll_HistoryEntryIDs(pollID int) *ValueIntSlice { key, err := dskey.FromParts("poll", pollID, "history_entry_ids") if err != nil { diff --git a/datastore/dskey/gen_collection_fields.go b/datastore/dskey/gen_collection_fields.go index f9ee8d4c8..816b444f7 100644 --- a/datastore/dskey/gen_collection_fields.go +++ b/datastore/dskey/gen_collection_fields.go @@ -438,7 +438,9 @@ var collectionFields = [...]collectionField{ {"meeting_user", "assignment_candidate_ids"}, {"meeting_user", "chat_message_ids"}, {"meeting_user", "comment"}, + {"meeting_user", "entitled_at_poll_ids"}, {"meeting_user", "group_ids"}, + {"meeting_user", "history_entry_ids"}, {"meeting_user", "id"}, {"meeting_user", "locked_out"}, {"meeting_user", "meeting_id"}, @@ -699,6 +701,7 @@ var collectionFields = [...]collectionField{ {"poll", "config_id"}, {"poll", "content_object_id"}, {"poll", "entitled_group_ids"}, + {"poll", "entitled_meeting_user_ids"}, {"poll", "history_entry_ids"}, {"poll", "id"}, {"poll", "live_voting_enabled"}, @@ -1845,1072 +1848,1078 @@ func collectionFieldToID(cf string) int { return 434 case "meeting_user/comment": return 435 - case "meeting_user/group_ids": + case "meeting_user/entitled_at_poll_ids": return 436 - case "meeting_user/id": + case "meeting_user/group_ids": return 437 - case "meeting_user/locked_out": + case "meeting_user/history_entry_ids": return 438 - case "meeting_user/meeting_id": + case "meeting_user/id": return 439 - case "meeting_user/motion_editor_ids": + case "meeting_user/locked_out": return 440 - case "meeting_user/motion_submitter_ids": + case "meeting_user/meeting_id": return 441 - case "meeting_user/motion_supporter_ids": + case "meeting_user/motion_editor_ids": return 442 - case "meeting_user/motion_working_group_speaker_ids": + case "meeting_user/motion_submitter_ids": return 443 - case "meeting_user/number": + case "meeting_user/motion_supporter_ids": return 444 - case "meeting_user/personal_note_ids": + case "meeting_user/motion_working_group_speaker_ids": return 445 - case "meeting_user/poll_option_ids": + case "meeting_user/number": return 446 - case "meeting_user/poll_voted_ids": + case "meeting_user/personal_note_ids": return 447 - case "meeting_user/represented_ballot_ids": + case "meeting_user/poll_option_ids": return 448 - case "meeting_user/speaker_ids": + case "meeting_user/poll_voted_ids": return 449 - case "meeting_user/structure_level_ids": + case "meeting_user/represented_ballot_ids": return 450 - case "meeting_user/user_id": + case "meeting_user/speaker_ids": return 451 - case "meeting_user/vote_delegated_to_id": + case "meeting_user/structure_level_ids": return 452 - case "meeting_user/vote_delegations_from_ids": + case "meeting_user/user_id": return 453 - case "meeting_user/vote_weight": + case "meeting_user/vote_delegated_to_id": return 454 - case "motion/A": + case "meeting_user/vote_delegations_from_ids": return 455 - case "motion/B": + case "meeting_user/vote_weight": return 456 - case "motion/C": + case "motion/A": return 457 - case "motion/D": + case "motion/B": return 458 - case "motion/E": + case "motion/C": return 459 - case "motion/additional_submitter": + case "motion/D": return 460 - case "motion/agenda_item_id": + case "motion/E": return 461 - case "motion/all_derived_motion_ids": + case "motion/additional_submitter": return 462 - case "motion/all_origin_ids": + case "motion/agenda_item_id": return 463 - case "motion/amendment_ids": + case "motion/all_derived_motion_ids": return 464 - case "motion/amendment_paragraphs": + case "motion/all_origin_ids": return 465 - case "motion/attachment_meeting_mediafile_ids": + case "motion/amendment_ids": return 466 - case "motion/block_id": + case "motion/amendment_paragraphs": return 467 - case "motion/category_id": + case "motion/attachment_meeting_mediafile_ids": return 468 - case "motion/category_weight": + case "motion/block_id": return 469 - case "motion/change_recommendation_ids": + case "motion/category_id": return 470 - case "motion/comment_ids": + case "motion/category_weight": return 471 - case "motion/created": + case "motion/change_recommendation_ids": return 472 - case "motion/derived_motion_ids": + case "motion/comment_ids": return 473 - case "motion/diff_version": + case "motion/created": return 474 - case "motion/editor_ids": + case "motion/derived_motion_ids": return 475 - case "motion/forwarded": + case "motion/diff_version": return 476 - case "motion/history_entry_ids": + case "motion/editor_ids": return 477 - case "motion/id": + case "motion/forwarded": return 478 - case "motion/identical_motion_ids": + case "motion/history_entry_ids": return 479 - case "motion/last_modified": + case "motion/id": return 480 - case "motion/lead_motion_id": + case "motion/identical_motion_ids": return 481 - case "motion/list_of_speakers_id": + case "motion/last_modified": return 482 - case "motion/marked_forwarded": + case "motion/lead_motion_id": return 483 - case "motion/meeting_id": + case "motion/list_of_speakers_id": return 484 - case "motion/modified_final_version": + case "motion/marked_forwarded": return 485 - case "motion/number": + case "motion/meeting_id": return 486 - case "motion/number_value": + case "motion/modified_final_version": return 487 - case "motion/origin_id": + case "motion/number": return 488 - case "motion/origin_meeting_id": + case "motion/number_value": return 489 - case "motion/personal_note_ids": + case "motion/origin_id": return 490 - case "motion/poll_ids": + case "motion/origin_meeting_id": return 491 - case "motion/projection_ids": + case "motion/personal_note_ids": return 492 - case "motion/reason": + case "motion/poll_ids": return 493 - case "motion/recommendation_extension": + case "motion/projection_ids": return 494 - case "motion/recommendation_extension_reference_ids": + case "motion/reason": return 495 - case "motion/recommendation_id": + case "motion/recommendation_extension": return 496 - case "motion/referenced_in_motion_recommendation_extension_ids": + case "motion/recommendation_extension_reference_ids": return 497 - case "motion/referenced_in_motion_state_extension_ids": + case "motion/recommendation_id": return 498 - case "motion/sequential_number": + case "motion/referenced_in_motion_recommendation_extension_ids": return 499 - case "motion/sort_child_ids": + case "motion/referenced_in_motion_state_extension_ids": return 500 - case "motion/sort_parent_id": + case "motion/sequential_number": return 501 - case "motion/sort_weight": + case "motion/sort_child_ids": return 502 - case "motion/start_line_number": + case "motion/sort_parent_id": return 503 - case "motion/state_extension": + case "motion/sort_weight": return 504 - case "motion/state_extension_reference_ids": + case "motion/start_line_number": return 505 - case "motion/state_id": + case "motion/state_extension": return 506 - case "motion/submitter_ids": + case "motion/state_extension_reference_ids": return 507 - case "motion/supporter_ids": + case "motion/state_id": return 508 - case "motion/tag_ids": + case "motion/submitter_ids": return 509 - case "motion/text": + case "motion/supporter_ids": return 510 - case "motion/text_hash": + case "motion/tag_ids": return 511 - case "motion/title": + case "motion/text": return 512 - case "motion/workflow_timestamp": + case "motion/text_hash": return 513 - case "motion/working_group_speaker_ids": + case "motion/title": return 514 - case "motion_block/A": + case "motion/workflow_timestamp": return 515 - case "motion_block/agenda_item_id": + case "motion/working_group_speaker_ids": return 516 - case "motion_block/id": + case "motion_block/A": return 517 - case "motion_block/internal": + case "motion_block/agenda_item_id": return 518 - case "motion_block/list_of_speakers_id": + case "motion_block/id": return 519 - case "motion_block/meeting_id": + case "motion_block/internal": return 520 - case "motion_block/motion_ids": + case "motion_block/list_of_speakers_id": return 521 - case "motion_block/projection_ids": + case "motion_block/meeting_id": return 522 - case "motion_block/sequential_number": + case "motion_block/motion_ids": return 523 - case "motion_block/title": + case "motion_block/projection_ids": return 524 - case "motion_category/A": + case "motion_block/sequential_number": return 525 - case "motion_category/child_ids": + case "motion_block/title": return 526 - case "motion_category/id": + case "motion_category/A": return 527 - case "motion_category/level": + case "motion_category/child_ids": return 528 - case "motion_category/meeting_id": + case "motion_category/id": return 529 - case "motion_category/motion_ids": + case "motion_category/level": return 530 - case "motion_category/name": + case "motion_category/meeting_id": return 531 - case "motion_category/parent_id": + case "motion_category/motion_ids": return 532 - case "motion_category/prefix": + case "motion_category/name": return 533 - case "motion_category/sequential_number": + case "motion_category/parent_id": return 534 - case "motion_category/weight": + case "motion_category/prefix": return 535 - case "motion_change_recommendation/A": + case "motion_category/sequential_number": return 536 - case "motion_change_recommendation/creation_time": + case "motion_category/weight": return 537 - case "motion_change_recommendation/id": + case "motion_change_recommendation/A": return 538 - case "motion_change_recommendation/internal": + case "motion_change_recommendation/creation_time": return 539 - case "motion_change_recommendation/line_from": + case "motion_change_recommendation/id": return 540 - case "motion_change_recommendation/line_to": + case "motion_change_recommendation/internal": return 541 - case "motion_change_recommendation/meeting_id": + case "motion_change_recommendation/line_from": return 542 - case "motion_change_recommendation/motion_id": + case "motion_change_recommendation/line_to": return 543 - case "motion_change_recommendation/other_description": + case "motion_change_recommendation/meeting_id": return 544 - case "motion_change_recommendation/rejected": + case "motion_change_recommendation/motion_id": return 545 - case "motion_change_recommendation/text": + case "motion_change_recommendation/other_description": return 546 - case "motion_change_recommendation/type": + case "motion_change_recommendation/rejected": return 547 - case "motion_comment/A": + case "motion_change_recommendation/text": return 548 - case "motion_comment/comment": + case "motion_change_recommendation/type": return 549 - case "motion_comment/id": + case "motion_comment/A": return 550 - case "motion_comment/meeting_id": + case "motion_comment/comment": return 551 - case "motion_comment/motion_id": + case "motion_comment/id": return 552 - case "motion_comment/section_id": + case "motion_comment/meeting_id": return 553 - case "motion_comment_section/A": + case "motion_comment/motion_id": return 554 - case "motion_comment_section/comment_ids": + case "motion_comment/section_id": return 555 - case "motion_comment_section/id": + case "motion_comment_section/A": return 556 - case "motion_comment_section/meeting_id": + case "motion_comment_section/comment_ids": return 557 - case "motion_comment_section/name": + case "motion_comment_section/id": return 558 - case "motion_comment_section/read_group_ids": + case "motion_comment_section/meeting_id": return 559 - case "motion_comment_section/sequential_number": + case "motion_comment_section/name": return 560 - case "motion_comment_section/submitter_can_write": + case "motion_comment_section/read_group_ids": return 561 - case "motion_comment_section/weight": + case "motion_comment_section/sequential_number": return 562 - case "motion_comment_section/write_group_ids": + case "motion_comment_section/submitter_can_write": return 563 - case "motion_editor/A": + case "motion_comment_section/weight": return 564 - case "motion_editor/id": + case "motion_comment_section/write_group_ids": return 565 - case "motion_editor/meeting_id": + case "motion_editor/A": return 566 - case "motion_editor/meeting_user_id": + case "motion_editor/id": return 567 - case "motion_editor/motion_id": + case "motion_editor/meeting_id": return 568 - case "motion_editor/weight": + case "motion_editor/meeting_user_id": return 569 - case "motion_state/A": + case "motion_editor/motion_id": return 570 - case "motion_state/allow_amendment_forwarding": + case "motion_editor/weight": return 571 - case "motion_state/allow_create_poll": + case "motion_state/A": return 572 - case "motion_state/allow_motion_forwarding": + case "motion_state/allow_amendment_forwarding": return 573 - case "motion_state/allow_submitter_edit": + case "motion_state/allow_create_poll": return 574 - case "motion_state/allow_support": + case "motion_state/allow_motion_forwarding": return 575 - case "motion_state/css_class": + case "motion_state/allow_submitter_edit": return 576 - case "motion_state/first_state_of_workflow_id": + case "motion_state/allow_support": return 577 - case "motion_state/id": + case "motion_state/css_class": return 578 - case "motion_state/is_internal": + case "motion_state/first_state_of_workflow_id": return 579 - case "motion_state/meeting_id": + case "motion_state/id": return 580 - case "motion_state/merge_amendment_into_final": + case "motion_state/is_internal": return 581 - case "motion_state/motion_ids": + case "motion_state/meeting_id": return 582 - case "motion_state/motion_recommendation_ids": + case "motion_state/merge_amendment_into_final": return 583 - case "motion_state/name": + case "motion_state/motion_ids": return 584 - case "motion_state/next_state_ids": + case "motion_state/motion_recommendation_ids": return 585 - case "motion_state/previous_state_ids": + case "motion_state/name": return 586 - case "motion_state/recommendation_label": + case "motion_state/next_state_ids": return 587 - case "motion_state/restrictions": + case "motion_state/previous_state_ids": return 588 - case "motion_state/set_number": + case "motion_state/recommendation_label": return 589 - case "motion_state/set_workflow_timestamp": + case "motion_state/restrictions": return 590 - case "motion_state/show_recommendation_extension_field": + case "motion_state/set_number": return 591 - case "motion_state/show_state_extension_field": + case "motion_state/set_workflow_timestamp": return 592 - case "motion_state/state_button_label": + case "motion_state/show_recommendation_extension_field": return 593 - case "motion_state/submitter_withdraw_back_ids": + case "motion_state/show_state_extension_field": return 594 - case "motion_state/submitter_withdraw_state_id": + case "motion_state/state_button_label": return 595 - case "motion_state/weight": + case "motion_state/submitter_withdraw_back_ids": return 596 - case "motion_state/workflow_id": + case "motion_state/submitter_withdraw_state_id": return 597 - case "motion_submitter/A": + case "motion_state/weight": return 598 - case "motion_submitter/id": + case "motion_state/workflow_id": return 599 - case "motion_submitter/meeting_id": + case "motion_submitter/A": return 600 - case "motion_submitter/meeting_user_id": + case "motion_submitter/id": return 601 - case "motion_submitter/motion_id": + case "motion_submitter/meeting_id": return 602 - case "motion_submitter/weight": + case "motion_submitter/meeting_user_id": return 603 - case "motion_supporter/A": + case "motion_submitter/motion_id": return 604 - case "motion_supporter/id": + case "motion_submitter/weight": return 605 - case "motion_supporter/meeting_id": + case "motion_supporter/A": return 606 - case "motion_supporter/meeting_user_id": + case "motion_supporter/id": return 607 - case "motion_supporter/motion_id": + case "motion_supporter/meeting_id": return 608 - case "motion_workflow/A": + case "motion_supporter/meeting_user_id": return 609 - case "motion_workflow/default_amendment_workflow_meeting_id": + case "motion_supporter/motion_id": return 610 - case "motion_workflow/default_workflow_meeting_id": + case "motion_workflow/A": return 611 - case "motion_workflow/first_state_id": + case "motion_workflow/default_amendment_workflow_meeting_id": return 612 - case "motion_workflow/id": + case "motion_workflow/default_workflow_meeting_id": return 613 - case "motion_workflow/meeting_id": + case "motion_workflow/first_state_id": return 614 - case "motion_workflow/name": + case "motion_workflow/id": return 615 - case "motion_workflow/sequential_number": + case "motion_workflow/meeting_id": return 616 - case "motion_workflow/state_ids": + case "motion_workflow/name": return 617 - case "motion_working_group_speaker/A": + case "motion_workflow/sequential_number": return 618 - case "motion_working_group_speaker/id": + case "motion_workflow/state_ids": return 619 - case "motion_working_group_speaker/meeting_id": + case "motion_working_group_speaker/A": return 620 - case "motion_working_group_speaker/meeting_user_id": + case "motion_working_group_speaker/id": return 621 - case "motion_working_group_speaker/motion_id": + case "motion_working_group_speaker/meeting_id": return 622 - case "motion_working_group_speaker/weight": + case "motion_working_group_speaker/meeting_user_id": return 623 - case "organization/A": + case "motion_working_group_speaker/motion_id": return 624 - case "organization/B": + case "motion_working_group_speaker/weight": return 625 - case "organization/C": + case "organization/A": return 626 - case "organization/D": + case "organization/B": return 627 - case "organization/E": + case "organization/C": return 628 - case "organization/active_meeting_ids": + case "organization/D": return 629 - case "organization/archived_meeting_ids": + case "organization/E": return 630 - case "organization/committee_ids": + case "organization/active_meeting_ids": return 631 - case "organization/default_language": + case "organization/archived_meeting_ids": return 632 - case "organization/description": + case "organization/committee_ids": return 633 - case "organization/disable_forward_with_attachments": + case "organization/default_language": return 634 - case "organization/enable_anonymous": + case "organization/description": return 635 - case "organization/enable_chat": + case "organization/disable_forward_with_attachments": return 636 - case "organization/enable_electronic_voting": + case "organization/enable_anonymous": return 637 - case "organization/gender_ids": + case "organization/enable_chat": return 638 - case "organization/id": + case "organization/enable_electronic_voting": return 639 - case "organization/legal_notice": + case "organization/gender_ids": return 640 - case "organization/limit_of_meetings": + case "organization/id": return 641 - case "organization/limit_of_users": + case "organization/legal_notice": return 642 - case "organization/login_text": + case "organization/limit_of_meetings": return 643 - case "organization/mediafile_ids": + case "organization/limit_of_users": return 644 - case "organization/name": + case "organization/login_text": return 645 - case "organization/organization_tag_ids": + case "organization/mediafile_ids": return 646 - case "organization/privacy_policy": + case "organization/name": return 647 - case "organization/published_mediafile_ids": + case "organization/organization_tag_ids": return 648 - case "organization/require_duplicate_from": + case "organization/privacy_policy": return 649 - case "organization/reset_password_verbose_errors": + case "organization/published_mediafile_ids": return 650 - case "organization/restrict_edit_forward_committees": + case "organization/require_duplicate_from": return 651 - case "organization/restrict_editing_same_level_committee_admins": + case "organization/reset_password_verbose_errors": return 652 - case "organization/saml_attr_mapping": + case "organization/restrict_edit_forward_committees": return 653 - case "organization/saml_enabled": + case "organization/restrict_editing_same_level_committee_admins": return 654 - case "organization/saml_login_button_text": + case "organization/saml_attr_mapping": return 655 - case "organization/saml_metadata_idp": + case "organization/saml_enabled": return 656 - case "organization/saml_metadata_sp": + case "organization/saml_login_button_text": return 657 - case "organization/saml_private_key": + case "organization/saml_metadata_idp": return 658 - case "organization/template_meeting_ids": + case "organization/saml_metadata_sp": return 659 - case "organization/theme_id": + case "organization/saml_private_key": return 660 - case "organization/theme_ids": + case "organization/template_meeting_ids": return 661 - case "organization/time_zone": + case "organization/theme_id": return 662 - case "organization/url": + case "organization/theme_ids": return 663 - case "organization/user_ids": + case "organization/time_zone": return 664 - case "organization/users_email_body": + case "organization/url": return 665 - case "organization/users_email_replyto": + case "organization/user_ids": return 666 - case "organization/users_email_sender": + case "organization/users_email_body": return 667 - case "organization/users_email_subject": + case "organization/users_email_replyto": return 668 - case "organization_tag/A": + case "organization/users_email_sender": return 669 - case "organization_tag/color": + case "organization/users_email_subject": return 670 - case "organization_tag/id": + case "organization_tag/A": return 671 - case "organization_tag/name": + case "organization_tag/color": return 672 - case "organization_tag/organization_id": + case "organization_tag/id": return 673 - case "organization_tag/tagged_ids": + case "organization_tag/name": return 674 - case "personal_note/A": + case "organization_tag/organization_id": return 675 - case "personal_note/content_object_id": + case "organization_tag/tagged_ids": return 676 - case "personal_note/id": + case "personal_note/A": return 677 - case "personal_note/meeting_id": + case "personal_note/content_object_id": return 678 - case "personal_note/meeting_user_id": + case "personal_note/id": return 679 - case "personal_note/note": + case "personal_note/meeting_id": return 680 - case "personal_note/star": + case "personal_note/meeting_user_id": return 681 - case "point_of_order_category/A": + case "personal_note/note": return 682 - case "point_of_order_category/id": + case "personal_note/star": return 683 - case "point_of_order_category/meeting_id": + case "point_of_order_category/A": return 684 - case "point_of_order_category/rank": + case "point_of_order_category/id": return 685 - case "point_of_order_category/speaker_ids": + case "point_of_order_category/meeting_id": return 686 - case "point_of_order_category/text": + case "point_of_order_category/rank": return 687 - case "poll/A": + case "point_of_order_category/speaker_ids": return 688 - case "poll/B": + case "point_of_order_category/text": return 689 - case "poll/allow_invalid": + case "poll/A": return 690 - case "poll/allow_vote_split": + case "poll/B": return 691 - case "poll/anonymized": + case "poll/allow_invalid": return 692 - case "poll/ballot_ids": + case "poll/allow_vote_split": return 693 - case "poll/config_id": + case "poll/anonymized": return 694 - case "poll/content_object_id": + case "poll/ballot_ids": return 695 - case "poll/entitled_group_ids": + case "poll/config_id": return 696 - case "poll/history_entry_ids": + case "poll/content_object_id": return 697 - case "poll/id": + case "poll/entitled_group_ids": return 698 - case "poll/live_voting_enabled": + case "poll/entitled_meeting_user_ids": return 699 - case "poll/meeting_id": + case "poll/history_entry_ids": return 700 - case "poll/option_ids": + case "poll/id": return 701 - case "poll/projection_ids": + case "poll/live_voting_enabled": return 702 - case "poll/published": + case "poll/meeting_id": return 703 - case "poll/result": + case "poll/option_ids": return 704 - case "poll/sequential_number": + case "poll/projection_ids": return 705 - case "poll/state": + case "poll/published": return 706 - case "poll/title": + case "poll/result": return 707 - case "poll/visibility": + case "poll/sequential_number": return 708 - case "poll/voted_ids": + case "poll/state": return 709 - case "poll_ballot/A": + case "poll/title": return 710 - case "poll_ballot/B": + case "poll/visibility": return 711 + case "poll/voted_ids": + return 712 + case "poll_ballot/A": + return 713 + case "poll_ballot/B": + return 714 case "poll_ballot/C": - return 712 + return 715 case "poll_ballot/acting_meeting_user_id": - return 713 + return 716 case "poll_ballot/id": - return 714 + return 717 case "poll_ballot/poll_id": - return 715 + return 718 case "poll_ballot/represented_meeting_user_id": - return 716 + return 719 case "poll_ballot/split": - return 717 + return 720 case "poll_ballot/value": - return 718 + return 721 case "poll_ballot/weight": - return 719 + return 722 case "poll_config_approval/A": - return 720 + return 723 case "poll_config_approval/allow_abstain": - return 721 + return 724 case "poll_config_approval/id": - return 722 + return 725 case "poll_config_approval/onehundred_percent_base": - return 723 + return 726 case "poll_config_approval/poll_id": - return 724 + return 727 case "poll_config_rating_approval/A": - return 725 + return 728 case "poll_config_rating_approval/allow_abstain": - return 726 + return 729 case "poll_config_rating_approval/id": - return 727 + return 730 case "poll_config_rating_approval/max_options_amount": - return 728 + return 731 case "poll_config_rating_approval/max_yes_amount": - return 729 + return 732 case "poll_config_rating_approval/min_options_amount": - return 730 + return 733 case "poll_config_rating_approval/onehundred_percent_base": - return 731 + return 734 case "poll_config_rating_approval/poll_id": - return 732 + return 735 case "poll_config_rating_score/A": - return 733 + return 736 case "poll_config_rating_score/id": - return 734 + return 737 case "poll_config_rating_score/max_options_amount": - return 735 + return 738 case "poll_config_rating_score/max_vote_sum": - return 736 + return 739 case "poll_config_rating_score/max_votes_per_option": - return 737 + return 740 case "poll_config_rating_score/min_options_amount": - return 738 + return 741 case "poll_config_rating_score/min_vote_sum": - return 739 + return 742 case "poll_config_rating_score/onehundred_percent_base": - return 740 + return 743 case "poll_config_rating_score/poll_id": - return 741 + return 744 case "poll_config_selection/A": - return 742 + return 745 case "poll_config_selection/allow_nota": - return 743 + return 746 case "poll_config_selection/display_chart": - return 744 + return 747 case "poll_config_selection/id": - return 745 + return 748 case "poll_config_selection/max_options_amount": - return 746 + return 749 case "poll_config_selection/min_options_amount": - return 747 + return 750 case "poll_config_selection/onehundred_percent_base": - return 748 + return 751 case "poll_config_selection/poll_id": - return 749 + return 752 case "poll_config_selection/strike_out": - return 750 + return 753 case "poll_config_stv_scottish/A": - return 751 + return 754 case "poll_config_stv_scottish/id": - return 752 + return 755 case "poll_config_stv_scottish/poll_id": - return 753 + return 756 case "poll_config_stv_scottish/posts": - return 754 + return 757 case "poll_option/A": - return 755 + return 758 case "poll_option/id": - return 756 + return 759 case "poll_option/meeting_user_id": - return 757 + return 760 case "poll_option/poll_id": - return 758 + return 761 case "poll_option/text": - return 759 + return 762 case "poll_option/weight": - return 760 + return 763 case "projection/A": - return 761 + return 764 case "projection/content_object_id": - return 762 + return 765 case "projection/current_projector_id": - return 763 + return 766 case "projection/history_projector_id": - return 764 + return 767 case "projection/id": - return 765 + return 768 case "projection/meeting_id": - return 766 + return 769 case "projection/options": - return 767 + return 770 case "projection/preview_projector_id": - return 768 + return 771 case "projection/stable": - return 769 + return 772 case "projection/type": - return 770 + return 773 case "projection/weight": - return 771 + return 774 case "projector/A": - return 772 + return 775 case "projector/aspect_ratio_denominator": - return 773 + return 776 case "projector/aspect_ratio_numerator": - return 774 + return 777 case "projector/background_color": - return 775 + return 778 case "projector/chyron_background_color": - return 776 + return 779 case "projector/chyron_background_color_2": - return 777 + return 780 case "projector/chyron_font_color": - return 778 + return 781 case "projector/chyron_font_color_2": - return 779 + return 782 case "projector/color": - return 780 + return 783 case "projector/current_projection_ids": - return 781 + return 784 case "projector/header_background_color": - return 782 + return 785 case "projector/header_font_color": - return 783 + return 786 case "projector/header_h1_color": - return 784 + return 787 case "projector/history_projection_ids": - return 785 + return 788 case "projector/id": - return 786 + return 789 case "projector/is_internal": - return 787 + return 790 case "projector/meeting_id": - return 788 + return 791 case "projector/name": - return 789 + return 792 case "projector/preview_projection_ids": - return 790 + return 793 case "projector/scale": - return 791 + return 794 case "projector/scroll": - return 792 + return 795 case "projector/sequential_number": - return 793 + return 796 case "projector/show_clock": - return 794 + return 797 case "projector/show_header_footer": - return 795 + return 798 case "projector/show_logo": - return 796 + return 799 case "projector/show_title": - return 797 + return 800 case "projector/used_as_default_projector_for_agenda_item_list_in_meeting_id": - return 798 + return 801 case "projector/used_as_default_projector_for_amendment_in_meeting_id": - return 799 + return 802 case "projector/used_as_default_projector_for_assignment_in_meeting_id": - return 800 + return 803 case "projector/used_as_default_projector_for_assignment_poll_in_meeting_id": - return 801 + return 804 case "projector/used_as_default_projector_for_countdown_in_meeting_id": - return 802 + return 805 case "projector/used_as_default_projector_for_current_los_in_meeting_id": - return 803 + return 806 case "projector/used_as_default_projector_for_list_of_speakers_in_meeting_id": - return 804 + return 807 case "projector/used_as_default_projector_for_mediafile_in_meeting_id": - return 805 + return 808 case "projector/used_as_default_projector_for_message_in_meeting_id": - return 806 + return 809 case "projector/used_as_default_projector_for_motion_block_in_meeting_id": - return 807 + return 810 case "projector/used_as_default_projector_for_motion_in_meeting_id": - return 808 + return 811 case "projector/used_as_default_projector_for_motion_poll_in_meeting_id": - return 809 + return 812 case "projector/used_as_default_projector_for_topic_in_meeting_id": - return 810 + return 813 case "projector/used_as_default_projector_for_topic_poll_in_meeting_id": - return 811 + return 814 case "projector/used_as_reference_projector_meeting_id": - return 812 + return 815 case "projector/width": - return 813 + return 816 case "projector_countdown/A": - return 814 + return 817 case "projector_countdown/countdown_time": - return 815 + return 818 case "projector_countdown/default_time": - return 816 + return 819 case "projector_countdown/description": - return 817 + return 820 case "projector_countdown/id": - return 818 + return 821 case "projector_countdown/meeting_id": - return 819 + return 822 case "projector_countdown/projection_ids": - return 820 + return 823 case "projector_countdown/running": - return 821 + return 824 case "projector_countdown/title": - return 822 + return 825 case "projector_countdown/used_as_list_of_speakers_countdown_meeting_id": - return 823 + return 826 case "projector_countdown/used_as_poll_countdown_meeting_id": - return 824 + return 827 case "projector_message/A": - return 825 + return 828 case "projector_message/id": - return 826 + return 829 case "projector_message/meeting_id": - return 827 + return 830 case "projector_message/message": - return 828 + return 831 case "projector_message/projection_ids": - return 829 + return 832 case "speaker/A": - return 830 + return 833 case "speaker/answer": - return 831 + return 834 case "speaker/begin_time": - return 832 + return 835 case "speaker/end_time": - return 833 + return 836 case "speaker/id": - return 834 + return 837 case "speaker/list_of_speakers_id": - return 835 + return 838 case "speaker/meeting_id": - return 836 + return 839 case "speaker/meeting_user_id": - return 837 + return 840 case "speaker/note": - return 838 + return 841 case "speaker/pause_time": - return 839 + return 842 case "speaker/point_of_order": - return 840 + return 843 case "speaker/point_of_order_category_id": - return 841 + return 844 case "speaker/speech_state": - return 842 + return 845 case "speaker/structure_level_list_of_speakers_id": - return 843 + return 846 case "speaker/total_pause": - return 844 + return 847 case "speaker/unpause_time": - return 845 + return 848 case "speaker/weight": - return 846 + return 849 case "structure_level/A": - return 847 + return 850 case "structure_level/color": - return 848 + return 851 case "structure_level/default_time": - return 849 + return 852 case "structure_level/id": - return 850 + return 853 case "structure_level/meeting_id": - return 851 + return 854 case "structure_level/meeting_user_ids": - return 852 + return 855 case "structure_level/name": - return 853 + return 856 case "structure_level/structure_level_list_of_speakers_ids": - return 854 + return 857 case "structure_level_list_of_speakers/A": - return 855 + return 858 case "structure_level_list_of_speakers/additional_time": - return 856 + return 859 case "structure_level_list_of_speakers/current_start_time": - return 857 + return 860 case "structure_level_list_of_speakers/id": - return 858 + return 861 case "structure_level_list_of_speakers/initial_time": - return 859 + return 862 case "structure_level_list_of_speakers/list_of_speakers_id": - return 860 + return 863 case "structure_level_list_of_speakers/meeting_id": - return 861 + return 864 case "structure_level_list_of_speakers/remaining_time": - return 862 + return 865 case "structure_level_list_of_speakers/speaker_ids": - return 863 + return 866 case "structure_level_list_of_speakers/structure_level_id": - return 864 + return 867 case "tag/A": - return 865 + return 868 case "tag/id": - return 866 + return 869 case "tag/meeting_id": - return 867 + return 870 case "tag/name": - return 868 + return 871 case "tag/tagged_ids": - return 869 + return 872 case "theme/A": - return 870 + return 873 case "theme/abstain": - return 871 + return 874 case "theme/accent_100": - return 872 + return 875 case "theme/accent_200": - return 873 + return 876 case "theme/accent_300": - return 874 + return 877 case "theme/accent_400": - return 875 + return 878 case "theme/accent_50": - return 876 + return 879 case "theme/accent_500": - return 877 + return 880 case "theme/accent_600": - return 878 + return 881 case "theme/accent_700": - return 879 + return 882 case "theme/accent_800": - return 880 + return 883 case "theme/accent_900": - return 881 + return 884 case "theme/accent_a100": - return 882 + return 885 case "theme/accent_a200": - return 883 + return 886 case "theme/accent_a400": - return 884 + return 887 case "theme/accent_a700": - return 885 + return 888 case "theme/headbar": - return 886 + return 889 case "theme/id": - return 887 + return 890 case "theme/name": - return 888 + return 891 case "theme/no": - return 889 + return 892 case "theme/organization_id": - return 890 + return 893 case "theme/primary_100": - return 891 + return 894 case "theme/primary_200": - return 892 + return 895 case "theme/primary_300": - return 893 + return 896 case "theme/primary_400": - return 894 + return 897 case "theme/primary_50": - return 895 + return 898 case "theme/primary_500": - return 896 + return 899 case "theme/primary_600": - return 897 + return 900 case "theme/primary_700": - return 898 + return 901 case "theme/primary_800": - return 899 + return 902 case "theme/primary_900": - return 900 + return 903 case "theme/primary_a100": - return 901 + return 904 case "theme/primary_a200": - return 902 + return 905 case "theme/primary_a400": - return 903 + return 906 case "theme/primary_a700": - return 904 + return 907 case "theme/theme_for_organization_id": - return 905 + return 908 case "theme/warn_100": - return 906 + return 909 case "theme/warn_200": - return 907 + return 910 case "theme/warn_300": - return 908 + return 911 case "theme/warn_400": - return 909 + return 912 case "theme/warn_50": - return 910 + return 913 case "theme/warn_500": - return 911 + return 914 case "theme/warn_600": - return 912 + return 915 case "theme/warn_700": - return 913 + return 916 case "theme/warn_800": - return 914 + return 917 case "theme/warn_900": - return 915 + return 918 case "theme/warn_a100": - return 916 + return 919 case "theme/warn_a200": - return 917 + return 920 case "theme/warn_a400": - return 918 + return 921 case "theme/warn_a700": - return 919 + return 922 case "theme/yes": - return 920 + return 923 case "topic/A": - return 921 + return 924 case "topic/agenda_item_id": - return 922 + return 925 case "topic/attachment_meeting_mediafile_ids": - return 923 + return 926 case "topic/id": - return 924 + return 927 case "topic/list_of_speakers_id": - return 925 + return 928 case "topic/meeting_id": - return 926 + return 929 case "topic/poll_ids": - return 927 + return 930 case "topic/projection_ids": - return 928 + return 931 case "topic/sequential_number": - return 929 + return 932 case "topic/text": - return 930 + return 933 case "topic/title": - return 931 + return 934 case "user/A": - return 932 + return 935 case "user/B": - return 933 + return 936 case "user/D": - return 934 + return 937 case "user/E": - return 935 + return 938 case "user/F": - return 936 + return 939 case "user/G": - return 937 + return 940 case "user/H": - return 938 + return 941 case "user/can_change_own_password": - return 939 + return 942 case "user/committee_ids": - return 940 + return 943 case "user/committee_management_ids": - return 941 + return 944 case "user/default_password": - return 942 + return 945 case "user/default_vote_weight": - return 943 + return 946 case "user/email": - return 944 + return 947 case "user/external": - return 945 + return 948 case "user/first_name": - return 946 + return 949 case "user/gender_id": - return 947 + return 950 case "user/history_entry_ids": - return 948 + return 951 case "user/history_position_ids": - return 949 + return 952 case "user/home_committee_id": - return 950 + return 953 case "user/id": - return 951 + return 954 case "user/is_active": - return 952 + return 955 case "user/is_demo_user": - return 953 + return 956 case "user/is_physical_person": - return 954 + return 957 case "user/is_present_in_meeting_ids": - return 955 + return 958 case "user/last_email_sent": - return 956 + return 959 case "user/last_login": - return 957 + return 960 case "user/last_name": - return 958 + return 961 case "user/meeting_ids": - return 959 + return 962 case "user/meeting_user_ids": - return 960 + return 963 case "user/member_number": - return 961 + return 964 case "user/organization_id": - return 962 + return 965 case "user/organization_management_level": - return 963 + return 966 case "user/password": - return 964 + return 967 case "user/pronoun": - return 965 + return 968 case "user/saml_id": - return 966 + return 969 case "user/title": - return 967 + return 970 case "user/username": - return 968 + return 971 default: return -1 } diff --git a/datastore/dsmodels/models_generated.go b/datastore/dsmodels/models_generated.go index 3ee8cf2c2..eed735a20 100644 --- a/datastore/dsmodels/models_generated.go +++ b/datastore/dsmodels/models_generated.go @@ -1322,10 +1322,11 @@ type HistoryEntryModelUnion interface { isHistoryEntryModelUnion() } -func (*Assignment) isHistoryEntryModelUnion() {} -func (*Motion) isHistoryEntryModelUnion() {} -func (*Poll) isHistoryEntryModelUnion() {} -func (*User) isHistoryEntryModelUnion() {} +func (*Assignment) isHistoryEntryModelUnion() {} +func (*MeetingUser) isHistoryEntryModelUnion() {} +func (*Motion) isHistoryEntryModelUnion() {} +func (*Poll) isHistoryEntryModelUnion() {} +func (*User) isHistoryEntryModelUnion() {} type historyEntryModelUnionBuilder struct { builder[historyEntryModelUnionBuilder, *historyEntryModelUnionBuilder, HistoryEntryModelUnion, HistoryEntryModelUnion] @@ -1356,6 +1357,14 @@ func (b *historyEntryModelUnionBuilder) lazy(ds *Fetch, id any) HistoryEntryMode }, } return builder.lazy(ds, intId) + case "meeting_user": + builder := &meetingUserBuilder{ + builder: builder[meetingUserBuilder, *meetingUserBuilder, MeetingUser, *MeetingUser]{ + fetch: ds, + conv: func(p *MeetingUser) MeetingUser { return *p }, + }, + } + return builder.lazy(ds, intId) case "motion": builder := &motionBuilder{ builder: builder[motionBuilder, *motionBuilder, Motion, *Motion]{ @@ -4052,7 +4061,9 @@ type MeetingUser struct { AssignmentCandidateIDs []int ChatMessageIDs []int Comment string + EntitledAtPollIDs []int GroupIDs []int + HistoryEntryIDs []int ID int LockedOut bool MeetingID int @@ -4074,7 +4085,9 @@ type MeetingUser struct { ActingBallotList []PollBallot AssignmentCandidateList []AssignmentCandidate ChatMessageList []ChatMessage + EntitledAtPollList []Poll GroupList []Group + HistoryEntryList []HistoryEntry Meeting *Meeting MotionEditorList []MotionEditor MotionSubmitterList []MotionSubmitter @@ -4103,7 +4116,9 @@ func (b *meetingUserBuilder) lazy(ds *Fetch, idI any) *MeetingUser { ds.MeetingUser_AssignmentCandidateIDs(id).Lazy(&c.AssignmentCandidateIDs) ds.MeetingUser_ChatMessageIDs(id).Lazy(&c.ChatMessageIDs) ds.MeetingUser_Comment(id).Lazy(&c.Comment) + ds.MeetingUser_EntitledAtPollIDs(id).Lazy(&c.EntitledAtPollIDs) ds.MeetingUser_GroupIDs(id).Lazy(&c.GroupIDs) + ds.MeetingUser_HistoryEntryIDs(id).Lazy(&c.HistoryEntryIDs) ds.MeetingUser_ID(id).Lazy(&c.ID) ds.MeetingUser_LockedOut(id).Lazy(&c.LockedOut) ds.MeetingUser_MeetingID(id).Lazy(&c.MeetingID) @@ -4169,6 +4184,19 @@ func (b *meetingUserBuilder) ChatMessageList() *chatMessageBuilder { } } +func (b *meetingUserBuilder) EntitledAtPollList() *pollBuilder { + return &pollBuilder{ + builder: builder[pollBuilder, *pollBuilder, Poll, *Poll]{ + fetch: b.fetch, + parent: b, + idField: "EntitledAtPollIDs", + relField: "EntitledAtPollList", + many: true, + conv: func(p *Poll) Poll { return *p }, + }, + } +} + func (b *meetingUserBuilder) GroupList() *groupBuilder { return &groupBuilder{ builder: builder[groupBuilder, *groupBuilder, Group, *Group]{ @@ -4182,6 +4210,19 @@ func (b *meetingUserBuilder) GroupList() *groupBuilder { } } +func (b *meetingUserBuilder) HistoryEntryList() *historyEntryBuilder { + return &historyEntryBuilder{ + builder: builder[historyEntryBuilder, *historyEntryBuilder, HistoryEntry, *HistoryEntry]{ + fetch: b.fetch, + parent: b, + idField: "HistoryEntryIDs", + relField: "HistoryEntryList", + many: true, + conv: func(p *HistoryEntry) HistoryEntry { return *p }, + }, + } +} + func (b *meetingUserBuilder) Meeting() *meetingBuilder { return &meetingBuilder{ builder: builder[meetingBuilder, *meetingBuilder, Meeting, *Meeting]{ @@ -6540,35 +6581,37 @@ func (r *Fetch) PointOfOrderCategory(ids ...int) *pointOfOrderCategoryBuilder { // Poll has all fields from poll. type Poll struct { - AllowInvalid bool - AllowVoteSplit bool - Anonymized bool - BallotIDs []int - ConfigID string - ContentObjectID string - EntitledGroupIDs []int - HistoryEntryIDs []int - ID int - LiveVotingEnabled bool - MeetingID int - OptionIDs []int - ProjectionIDs []int - Published bool - Result string - SequentialNumber int - State string - Title string - Visibility string - VotedIDs []int - BallotList []PollBallot - Config PollConfigUnion - ContentObject PollContentObjectUnion - EntitledGroupList []Group - HistoryEntryList []HistoryEntry - Meeting *Meeting - OptionList []PollOption - ProjectionList []Projection - VotedList []MeetingUser + AllowInvalid bool + AllowVoteSplit bool + Anonymized bool + BallotIDs []int + ConfigID string + ContentObjectID string + EntitledGroupIDs []int + EntitledMeetingUserIDs []int + HistoryEntryIDs []int + ID int + LiveVotingEnabled bool + MeetingID int + OptionIDs []int + ProjectionIDs []int + Published bool + Result string + SequentialNumber int + State string + Title string + Visibility string + VotedIDs []int + BallotList []PollBallot + Config PollConfigUnion + ContentObject PollContentObjectUnion + EntitledGroupList []Group + EntitledMeetingUserList []MeetingUser + HistoryEntryList []HistoryEntry + Meeting *Meeting + OptionList []PollOption + ProjectionList []Projection + VotedList []MeetingUser } type pollBuilder struct { @@ -6585,6 +6628,7 @@ func (b *pollBuilder) lazy(ds *Fetch, idI any) *Poll { ds.Poll_ConfigID(id).Lazy(&c.ConfigID) ds.Poll_ContentObjectID(id).Lazy(&c.ContentObjectID) ds.Poll_EntitledGroupIDs(id).Lazy(&c.EntitledGroupIDs) + ds.Poll_EntitledMeetingUserIDs(id).Lazy(&c.EntitledMeetingUserIDs) ds.Poll_HistoryEntryIDs(id).Lazy(&c.HistoryEntryIDs) ds.Poll_ID(id).Lazy(&c.ID) ds.Poll_LiveVotingEnabled(id).Lazy(&c.LiveVotingEnabled) @@ -6800,6 +6844,19 @@ func (b *pollBuilder) EntitledGroupList() *groupBuilder { } } +func (b *pollBuilder) EntitledMeetingUserList() *meetingUserBuilder { + return &meetingUserBuilder{ + builder: builder[meetingUserBuilder, *meetingUserBuilder, MeetingUser, *MeetingUser]{ + fetch: b.fetch, + parent: b, + idField: "EntitledMeetingUserIDs", + relField: "EntitledMeetingUserList", + many: true, + conv: func(p *MeetingUser) MeetingUser { return *p }, + }, + } +} + func (b *pollBuilder) HistoryEntryList() *historyEntryBuilder { return &historyEntryBuilder{ builder: builder[historyEntryBuilder, *historyEntryBuilder, HistoryEntry, *HistoryEntry]{ diff --git a/datastore/field_def.go b/datastore/field_def.go index 444466724..b7b75d6a0 100644 --- a/datastore/field_def.go +++ b/datastore/field_def.go @@ -19,7 +19,7 @@ var collectionFields = map[string][]string{ "meeting": {"admin_group_id", "agenda_enable_numbering", "agenda_item_creation", "agenda_item_ids", "agenda_new_items_default_visibility", "agenda_number_prefix", "agenda_numeral_system", "agenda_show_internal_items_on_projector", "agenda_show_subtitles", "agenda_show_topic_navigation_on_detail_view", "all_projection_ids", "anonymous_group_id", "applause_enable", "applause_max_amount", "applause_min_amount", "applause_particle_image_url", "applause_show_level", "applause_timeout", "applause_type", "assignment_candidate_ids", "assignment_ids", "assignment_poll_add_candidates_to_list_of_speakers", "assignment_poll_config_id", "assignment_poll_default_method", "assignments_export_preamble", "assignments_export_title", "chat_group_ids", "chat_message_ids", "committee_id", "conference_auto_connect", "conference_auto_connect_next_speakers", "conference_enable_helpdesk", "conference_los_restriction", "conference_open_microphone", "conference_open_video", "conference_show", "conference_stream_poster_url", "conference_stream_url", "custom_translations", "default_group_id", "default_meeting_for_committee_id", "default_projector_agenda_item_list_ids", "default_projector_amendment_ids", "default_projector_assignment_ids", "default_projector_assignment_poll_ids", "default_projector_countdown_ids", "default_projector_current_los_ids", "default_projector_list_of_speakers_ids", "default_projector_mediafile_ids", "default_projector_message_ids", "default_projector_motion_block_ids", "default_projector_motion_ids", "default_projector_motion_poll_ids", "default_projector_topic_ids", "default_projector_topic_poll_ids", "description", "enable_anonymous", "end_time", "export_csv_encoding", "export_csv_separator", "export_pdf_fontsize", "export_pdf_line_height", "export_pdf_page_margin_bottom", "export_pdf_page_margin_left", "export_pdf_page_margin_right", "export_pdf_page_margin_top", "export_pdf_pagenumber_alignment", "export_pdf_pagesize", "external_id", "font_bold_id", "font_bold_italic_id", "font_chyron_speaker_name_id", "font_italic_id", "font_monospace_id", "font_projector_h1_id", "font_projector_h2_id", "font_regular_id", "forwarded_motion_ids", "group_ids", "id", "imported_at", "is_active_in_organization_id", "is_archived_in_organization_id", "jitsi_domain", "jitsi_room_name", "jitsi_room_password", "language", "list_of_speakers_allow_multiple_speakers", "list_of_speakers_amount_last_on_projector", "list_of_speakers_amount_next_on_projector", "list_of_speakers_can_create_point_of_order_for_others", "list_of_speakers_can_set_contribution_self", "list_of_speakers_closing_disables_point_of_order", "list_of_speakers_countdown_id", "list_of_speakers_couple_countdown", "list_of_speakers_default_structure_level_time", "list_of_speakers_enable_interposed_question", "list_of_speakers_enable_point_of_order_categories", "list_of_speakers_enable_point_of_order_speakers", "list_of_speakers_enable_pro_contra_speech", "list_of_speakers_hide_contribution_count", "list_of_speakers_ids", "list_of_speakers_initially_closed", "list_of_speakers_intervention_time", "list_of_speakers_present_users_only", "list_of_speakers_show_amount_of_speakers_on_slide", "list_of_speakers_show_first_contribution", "list_of_speakers_speaker_note_for_everyone", "location", "locked_from_inside", "logo_pdf_ballot_paper_id", "logo_pdf_footer_l_id", "logo_pdf_footer_r_id", "logo_pdf_header_l_id", "logo_pdf_header_r_id", "logo_projector_header_id", "logo_projector_main_id", "logo_web_header_id", "mediafile_ids", "meeting_mediafile_ids", "meeting_user_ids", "motion_block_ids", "motion_category_ids", "motion_change_recommendation_ids", "motion_comment_ids", "motion_comment_section_ids", "motion_editor_ids", "motion_ids", "motion_poll_config_id", "motion_state_ids", "motion_submitter_ids", "motion_supporter_ids", "motion_workflow_ids", "motion_working_group_speaker_ids", "motions_amendments_enabled", "motions_amendments_in_main_list", "motions_amendments_multiple_paragraphs", "motions_amendments_of_amendments", "motions_amendments_prefix", "motions_amendments_text_mode", "motions_block_slide_columns", "motions_create_enable_additional_submitter_text", "motions_default_amendment_workflow_id", "motions_default_line_numbering", "motions_default_sorting", "motions_default_workflow_id", "motions_enable_editor", "motions_enable_origin_motion_display", "motions_enable_reason_on_projector", "motions_enable_recommendation_on_projector", "motions_enable_restricted_editor_for_manager", "motions_enable_restricted_editor_for_non_manager", "motions_enable_sidebox_on_projector", "motions_enable_text_on_projector", "motions_enable_working_group_speaker", "motions_export_follow_recommendation", "motions_export_preamble", "motions_export_submitter_recommendation", "motions_export_title", "motions_hide_metadata_background", "motions_line_length", "motions_number_min_digits", "motions_number_type", "motions_number_with_blank", "motions_origin_motion_toggle_default", "motions_preamble", "motions_reason_required", "motions_recommendation_text_mode", "motions_recommendations_by", "motions_show_referring_motions", "motions_show_sequential_number", "motions_supporters_min_amount", "name", "organization_tag_ids", "personal_note_ids", "point_of_order_category_ids", "poll_countdown_id", "poll_couple_countdown", "poll_default_allow_invalid", "poll_default_allow_vote_split", "poll_default_ids", "poll_default_live_voting_enabled", "poll_enable_max_votes_per_option", "poll_ids", "poll_projection_max_columns", "poll_projection_name_order_first", "present_user_ids", "projection_ids", "projector_countdown_default_time", "projector_countdown_ids", "projector_countdown_warning_time", "projector_ids", "projector_message_ids", "reference_projector_id", "relevant_history_entry_ids", "speaker_ids", "start_time", "structure_level_ids", "structure_level_list_of_speakers_ids", "tag_ids", "template_for_organization_id", "time_zone", "topic_ids", "topic_poll_config_id", "topic_poll_default_method", "user_ids", "users_allow_self_set_present", "users_email_body", "users_email_replyto", "users_email_sender", "users_email_subject", "users_enable_presence_view", "users_enable_vote_delegations", "users_enable_vote_weight", "users_forbid_delegator_as_submitter", "users_forbid_delegator_as_supporter", "users_forbid_delegator_in_list_of_speakers", "users_forbid_delegator_to_vote", "users_pdf_welcometext", "users_pdf_welcometitle", "users_pdf_wlan_encryption", "users_pdf_wlan_password", "users_pdf_wlan_ssid", "welcome_text", "welcome_title"}, "meeting_mediafile": {"access_group_ids", "attachment_ids", "id", "inherited_access_group_ids", "is_public", "list_of_speakers_id", "mediafile_id", "meeting_id", "projection_ids", "used_as_font_bold_in_meeting_id", "used_as_font_bold_italic_in_meeting_id", "used_as_font_chyron_speaker_name_in_meeting_id", "used_as_font_italic_in_meeting_id", "used_as_font_monospace_in_meeting_id", "used_as_font_projector_h1_in_meeting_id", "used_as_font_projector_h2_in_meeting_id", "used_as_font_regular_in_meeting_id", "used_as_logo_pdf_ballot_paper_in_meeting_id", "used_as_logo_pdf_footer_l_in_meeting_id", "used_as_logo_pdf_footer_r_in_meeting_id", "used_as_logo_pdf_header_l_in_meeting_id", "used_as_logo_pdf_header_r_in_meeting_id", "used_as_logo_projector_header_in_meeting_id", "used_as_logo_projector_main_in_meeting_id", "used_as_logo_web_header_in_meeting_id"}, "meeting_poll_default": {"allow_abstain", "allow_nota", "display_chart", "group_ids", "id", "meeting_id", "onehundred_percent_base", "sort_result_by_votes", "strike_out", "used_as_assignment_poll_config_in_meeting_id", "used_as_motion_poll_config_in_meeting_id", "used_as_topic_poll_config_in_meeting_id", "visibility"}, - "meeting_user": {"about_me", "acting_ballot_ids", "assignment_candidate_ids", "chat_message_ids", "comment", "group_ids", "id", "locked_out", "meeting_id", "motion_editor_ids", "motion_submitter_ids", "motion_supporter_ids", "motion_working_group_speaker_ids", "number", "personal_note_ids", "poll_option_ids", "poll_voted_ids", "represented_ballot_ids", "speaker_ids", "structure_level_ids", "user_id", "vote_delegated_to_id", "vote_delegations_from_ids", "vote_weight"}, + "meeting_user": {"about_me", "acting_ballot_ids", "assignment_candidate_ids", "chat_message_ids", "comment", "entitled_at_poll_ids", "group_ids", "history_entry_ids", "id", "locked_out", "meeting_id", "motion_editor_ids", "motion_submitter_ids", "motion_supporter_ids", "motion_working_group_speaker_ids", "number", "personal_note_ids", "poll_option_ids", "poll_voted_ids", "represented_ballot_ids", "speaker_ids", "structure_level_ids", "user_id", "vote_delegated_to_id", "vote_delegations_from_ids", "vote_weight"}, "motion": {"additional_submitter", "agenda_item_id", "all_derived_motion_ids", "all_origin_ids", "amendment_ids", "amendment_paragraphs", "attachment_meeting_mediafile_ids", "block_id", "category_id", "category_weight", "change_recommendation_ids", "comment_ids", "created", "derived_motion_ids", "diff_version", "editor_ids", "forwarded", "history_entry_ids", "id", "identical_motion_ids", "last_modified", "lead_motion_id", "list_of_speakers_id", "marked_forwarded", "meeting_id", "modified_final_version", "number", "number_value", "origin_id", "origin_meeting_id", "personal_note_ids", "poll_ids", "projection_ids", "reason", "recommendation_extension", "recommendation_extension_reference_ids", "recommendation_id", "referenced_in_motion_recommendation_extension_ids", "referenced_in_motion_state_extension_ids", "sequential_number", "sort_child_ids", "sort_parent_id", "sort_weight", "start_line_number", "state_extension", "state_extension_reference_ids", "state_id", "submitter_ids", "supporter_ids", "tag_ids", "text", "text_hash", "title", "workflow_timestamp", "working_group_speaker_ids"}, "motion_block": {"agenda_item_id", "id", "internal", "list_of_speakers_id", "meeting_id", "motion_ids", "projection_ids", "sequential_number", "title"}, "motion_category": {"child_ids", "id", "level", "meeting_id", "motion_ids", "name", "parent_id", "prefix", "sequential_number", "weight"}, @@ -36,7 +36,7 @@ var collectionFields = map[string][]string{ "organization_tag": {"color", "id", "name", "organization_id", "tagged_ids"}, "personal_note": {"content_object_id", "id", "meeting_id", "meeting_user_id", "note", "star"}, "point_of_order_category": {"id", "meeting_id", "rank", "speaker_ids", "text"}, - "poll": {"allow_invalid", "allow_vote_split", "anonymized", "ballot_ids", "config_id", "content_object_id", "entitled_group_ids", "history_entry_ids", "id", "live_voting_enabled", "meeting_id", "option_ids", "projection_ids", "published", "result", "sequential_number", "state", "title", "visibility", "voted_ids"}, + "poll": {"allow_invalid", "allow_vote_split", "anonymized", "ballot_ids", "config_id", "content_object_id", "entitled_group_ids", "entitled_meeting_user_ids", "history_entry_ids", "id", "live_voting_enabled", "meeting_id", "option_ids", "projection_ids", "published", "result", "sequential_number", "state", "title", "visibility", "voted_ids"}, "poll_ballot": {"acting_meeting_user_id", "id", "poll_id", "represented_meeting_user_id", "split", "value", "weight"}, "poll_config_approval": {"allow_abstain", "id", "onehundred_percent_base", "poll_id"}, "poll_config_rating_approval": {"allow_abstain", "id", "max_options_amount", "max_yes_amount", "min_options_amount", "onehundred_percent_base", "poll_id"}, diff --git a/datastore/pgtest/sql/schema_relational.sql b/datastore/pgtest/sql/schema_relational.sql index 7fcf26a1c..88a4ea299 100644 --- a/datastore/pgtest/sql/schema_relational.sql +++ b/datastore/pgtest/sql/schema_relational.sql @@ -1,7 +1,7 @@ -- schema_relational.sql for initial database setup OpenSlides -- Code generated. DO NOT EDIT. --- MODELS_YML_CHECKSUM = '37beecae18092481d8b5436d21e9b8e7' +-- MODELS_YML_CHECKSUM = 'c8ed4f685e33d45999dd47ab4e04dc22' -- ENUM definitions @@ -1064,13 +1064,15 @@ CREATE TABLE history_entry_t ( model_id varchar(100), model_id_assignment_id integer CONSTRAINT generated_always_as_history_entry_model_id_assignment_id GENERATED ALWAYS AS (CASE WHEN split_part(model_id, '/', 1) = 'assignment' THEN cast(split_part(model_id, '/', 2) AS INTEGER) ELSE null END) STORED, + model_id_meeting_user_id integer + CONSTRAINT generated_always_as_history_entry_model_id_meeting_user_id GENERATED ALWAYS AS (CASE WHEN split_part(model_id, '/', 1) = 'meeting_user' THEN cast(split_part(model_id, '/', 2) AS INTEGER) ELSE null END) STORED, model_id_motion_id integer CONSTRAINT generated_always_as_history_entry_model_id_motion_id GENERATED ALWAYS AS (CASE WHEN split_part(model_id, '/', 1) = 'motion' THEN cast(split_part(model_id, '/', 2) AS INTEGER) ELSE null END) STORED, model_id_poll_id integer CONSTRAINT generated_always_as_history_entry_model_id_poll_id GENERATED ALWAYS AS (CASE WHEN split_part(model_id, '/', 1) = 'poll' THEN cast(split_part(model_id, '/', 2) AS INTEGER) ELSE null END) STORED, model_id_user_id integer CONSTRAINT generated_always_as_history_entry_model_id_user_id GENERATED ALWAYS AS (CASE WHEN split_part(model_id, '/', 1) = 'user' THEN cast(split_part(model_id, '/', 2) AS INTEGER) ELSE null END) STORED, - CONSTRAINT valid_history_entry_model_id_part1 CHECK (split_part(model_id, '/', 1) IN ('assignment','motion','poll','user')), + CONSTRAINT valid_history_entry_model_id_part1 CHECK (split_part(model_id, '/', 1) IN ('assignment','meeting_user','motion','poll','user')), position_id integer CONSTRAINT required_history_entry_position_id NOT NULL, meeting_id integer @@ -2780,6 +2782,22 @@ CREATE TABLE nm_meeting_user_poll_voted_ids_poll_t ( CREATE INDEX idx_nm_meeting_user_poll_voted_ids_poll_t_meeting_user_id ON nm_meeting_user_poll_voted_ids_poll_t (meeting_user_id); CREATE INDEX idx_nm_meeting_user_poll_voted_ids_poll_t_poll_id ON nm_meeting_user_poll_voted_ids_poll_t (poll_id); +CREATE TABLE nm_meeting_user_entitled_at_poll_ids_poll_t ( + meeting_user_id integer + CONSTRAINT required_nm_meeting_user_entitled_at_poll_ids_poll_t_meef9cfab5 NOT NULL + CONSTRAINT fk_nm_meeting_user_entitled_at_poll_ids_poll_t_meeting_u4b04998 REFERENCES meeting_user_t (id) + ON DELETE CASCADE + INITIALLY DEFERRED, + poll_id integer + CONSTRAINT required_nm_meeting_user_entitled_at_poll_ids_poll_t_poll_id NOT NULL + CONSTRAINT fk_nm_meeting_user_entitled_at_poll_ids_poll_t_poll_id_pda65800 REFERENCES poll_t (id) + ON DELETE CASCADE + INITIALLY DEFERRED, + CONSTRAINT pk_nm_meeting_user_entitled_at_poll_ids_poll_t PRIMARY KEY (meeting_user_id, poll_id) +); +CREATE INDEX idx_nm_meeting_user_entitled_at_poll_ids_poll_t_meeting_user_id ON nm_meeting_user_entitled_at_poll_ids_poll_t (meeting_user_id); +CREATE INDEX idx_nm_meeting_user_entitled_at_poll_ids_poll_t_poll_id ON nm_meeting_user_entitled_at_poll_ids_poll_t (poll_id); + CREATE TABLE nm_meeting_user_structure_level_ids_structure_level_t ( meeting_user_id integer CONSTRAINT required_nm_meeting_user_structure_level_ids_structure_l456f3b7 NOT NULL @@ -3178,9 +3196,11 @@ CREATE VIEW "meeting_user" AS SELECT *, (select array_agg(p.id ORDER BY p.id) from poll_option_t p where p.meeting_user_id = m.id) as poll_option_ids, (select array_agg(p.id ORDER BY p.id) from poll_ballot_t p where p.acting_meeting_user_id = m.id) as acting_ballot_ids, (select array_agg(p.id ORDER BY p.id) from poll_ballot_t p where p.represented_meeting_user_id = m.id) as represented_ballot_ids, +(select array_agg(n.poll_id ORDER BY n.poll_id) from nm_meeting_user_entitled_at_poll_ids_poll_t n where n.meeting_user_id = m.id) as entitled_at_poll_ids, (select array_agg(c.id ORDER BY c.id) from chat_message_t c where c.meeting_user_id = m.id) as chat_message_ids, (select array_agg(n.group_id ORDER BY n.group_id) from nm_group_meeting_user_ids_meeting_user_t n where n.meeting_user_id = m.id) as group_ids, -(select array_agg(n.structure_level_id ORDER BY n.structure_level_id) from nm_meeting_user_structure_level_ids_structure_level_t n where n.meeting_user_id = m.id) as structure_level_ids +(select array_agg(n.structure_level_id ORDER BY n.structure_level_id) from nm_meeting_user_structure_level_ids_structure_level_t n where n.meeting_user_id = m.id) as structure_level_ids, +(select array_agg(h.id ORDER BY h.id) from history_entry_t h where h.model_id_meeting_user_id = m.id) as history_entry_ids FROM meeting_user_t m; @@ -3300,6 +3320,7 @@ CREATE VIEW "poll" AS SELECT *, (select array_agg(pb.id ORDER BY pb.id) from poll_ballot_t pb where pb.poll_id = p.id) as ballot_ids, (select array_agg(n.meeting_user_id ORDER BY n.meeting_user_id) from nm_meeting_user_poll_voted_ids_poll_t n where n.poll_id = p.id) as voted_ids, (select array_agg(n.group_id ORDER BY n.group_id) from nm_group_poll_ids_poll_t n where n.poll_id = p.id) as entitled_group_ids, +(select array_agg(n.meeting_user_id ORDER BY n.meeting_user_id) from nm_meeting_user_entitled_at_poll_ids_poll_t n where n.poll_id = p.id) as entitled_meeting_user_ids, (select array_agg(pt.id ORDER BY pt.id) from projection_t pt where pt.content_object_id_poll_id = p.id) as projection_ids, (select array_agg(h.id ORDER BY h.id) from history_entry_t h where h.model_id_poll_id = p.id) as history_entry_ids FROM poll_t p; @@ -3484,6 +3505,8 @@ CREATE INDEX idx_group_t_meeting_id ON group_t (meeting_id); ALTER TABLE history_entry_t ADD CONSTRAINT fk_history_entry_t_model_id_assignment_id_assignment_t_id FOREIGN KEY(model_id_assignment_id) REFERENCES assignment_t(id) INITIALLY DEFERRED; CREATE INDEX idx_history_entry_t_model_id_assignment_id ON history_entry_t (model_id_assignment_id); +ALTER TABLE history_entry_t ADD CONSTRAINT fk_history_entry_t_model_id_meeting_user_id_meeting_user_t_id FOREIGN KEY(model_id_meeting_user_id) REFERENCES meeting_user_t(id) INITIALLY DEFERRED; +CREATE INDEX idx_history_entry_t_model_id_meeting_user_id ON history_entry_t (model_id_meeting_user_id); ALTER TABLE history_entry_t ADD CONSTRAINT fk_history_entry_t_model_id_motion_id_motion_t_id FOREIGN KEY(model_id_motion_id) REFERENCES motion_t(id) INITIALLY DEFERRED; CREATE INDEX idx_history_entry_t_model_id_motion_id ON history_entry_t (model_id_motion_id); ALTER TABLE history_entry_t ADD CONSTRAINT fk_history_entry_t_model_id_poll_id_poll_t_id FOREIGN KEY(model_id_poll_id) REFERENCES poll_t(id) INITIALLY DEFERRED; @@ -4637,6 +4660,9 @@ DEFERRABLE INITIALLY DEFERRED FOR EACH ROW EXECUTE FUNCTION notify_transaction_e CREATE TRIGGER tr_log_assignment_model_id_assignment_id AFTER INSERT OR UPDATE OF model_id_assignment_id OR DELETE ON history_entry_t FOR EACH ROW EXECUTE FUNCTION log_modified_related_models('assignment','model_id_assignment_id','history_entry_ids'); +CREATE TRIGGER tr_log_meeting_user_model_id_meeting_user_id AFTER INSERT OR UPDATE OF model_id_meeting_user_id OR DELETE ON history_entry_t +FOR EACH ROW EXECUTE FUNCTION log_modified_related_models('meeting_user','model_id_meeting_user_id','history_entry_ids'); + CREATE TRIGGER tr_log_motion_model_id_motion_id AFTER INSERT OR UPDATE OF model_id_motion_id OR DELETE ON history_entry_t FOR EACH ROW EXECUTE FUNCTION log_modified_related_models('motion','model_id_motion_id','history_entry_ids'); @@ -4827,6 +4853,11 @@ FOR EACH ROW EXECUTE FUNCTION log_modified_related_models('meeting_user','meetin CREATE CONSTRAINT TRIGGER notify_transaction_end AFTER INSERT OR UPDATE OR DELETE ON nm_meeting_user_poll_voted_ids_poll_t DEFERRABLE INITIALLY DEFERRED FOR EACH ROW EXECUTE FUNCTION notify_transaction_end(); +CREATE TRIGGER tr_log_nm_meeting_user_entitled_at_poll_ids_poll_t AFTER INSERT OR UPDATE OR DELETE ON nm_meeting_user_entitled_at_poll_ids_poll_t +FOR EACH ROW EXECUTE FUNCTION log_modified_related_models('meeting_user','meeting_user_id','entitled_at_poll_ids','poll','poll_id','entitled_meeting_user_ids'); +CREATE CONSTRAINT TRIGGER notify_transaction_end AFTER INSERT OR UPDATE OR DELETE ON nm_meeting_user_entitled_at_poll_ids_poll_t +DEFERRABLE INITIALLY DEFERRED FOR EACH ROW EXECUTE FUNCTION notify_transaction_end(); + CREATE TRIGGER tr_log_nm_meeting_user_structure_level_ids_structure_level_t AFTER INSERT OR UPDATE OR DELETE ON nm_meeting_user_structure_level_ids_structure_level_t FOR EACH ROW EXECUTE FUNCTION log_modified_related_models('meeting_user','meeting_user_id','structure_level_ids','structure_level','structure_level_id','meeting_user_ids'); CREATE CONSTRAINT TRIGGER notify_transaction_end AFTER INSERT OR UPDATE OR DELETE ON nm_meeting_user_structure_level_ids_structure_level_t @@ -5521,6 +5552,14 @@ CREATE CONSTRAINT TRIGGER equal_meeting_id_on_meeting_user_t_vote_delegations_fr FOR EACH ROW EXECUTE FUNCTION check_equals('meeting_user', 'meeting_user', 'vote_delegated_to_id', 'meeting_id', TRUE); +CREATE CONSTRAINT TRIGGER equal_meeting_id_on_meeting_user_t_entitled_at_poll_ids AFTER INSERT ON meeting_user_t INITIALLY DEFERRED +FOR EACH ROW EXECUTE FUNCTION check_equals_multi('nm_meeting_user_entitled_at_poll_ids_poll_t', 'meeting_user_id', 'meeting_user', 'poll_id', 'poll', 'meeting_id', 'entitled_at_poll_ids'); +CREATE CONSTRAINT TRIGGER equal_meeting_id_on_poll_t_entitled_meeting_user_ids AFTER INSERT ON poll_t INITIALLY DEFERRED +FOR EACH ROW EXECUTE FUNCTION check_equals_multi('nm_meeting_user_entitled_at_poll_ids_poll_t', 'poll_id', 'poll', 'meeting_user_id', 'meeting_user', 'meeting_id', 'entitled_meeting_user_ids'); +CREATE CONSTRAINT TRIGGER equal_meeting_id_on_meeting_user_t_entitled_at_poll_ids_058a2c8 AFTER INSERT ON nm_meeting_user_entitled_at_poll_ids_poll_t INITIALLY DEFERRED +FOR EACH ROW EXECUTE FUNCTION check_equals_intermediate('meeting_user_id', 'meeting_user', 'poll_id', 'poll', 'meeting_id', 'entitled_at_poll_ids'); + + CREATE CONSTRAINT TRIGGER equal_meeting_id_on_meeting_user_t_structure_level_ids AFTER INSERT ON meeting_user_t INITIALLY DEFERRED FOR EACH ROW EXECUTE FUNCTION check_equals_multi('nm_meeting_user_structure_level_ids_structure_level_t', 'meeting_user_id', 'meeting_user', 'structure_level_id', 'structure_level', 'meeting_id', 'structure_level_ids'); CREATE CONSTRAINT TRIGGER equal_meeting_id_on_structure_level_t_meeting_user_ids AFTER INSERT ON structure_level_t INITIALLY DEFERRED @@ -5962,7 +6001,7 @@ SQL nt:nt => group/poll_ids:-> poll/entitled_group_ids SQL nt:nt => group/used_in_meeting_poll_default_ids:-> meeting_poll_default/group_ids FIELD 1rR:nt => group/meeting_id:-> meeting/group_ids -FIELD 1Gr:nt,nt,nt,nt => history_entry/model_id:-> assignment/history_entry_ids,motion/history_entry_ids,poll/history_entry_ids,user/history_entry_ids +FIELD 1Gr:nt,nt,nt,nt,nt => history_entry/model_id:-> assignment/history_entry_ids,meeting_user/history_entry_ids,motion/history_entry_ids,poll/history_entry_ids,user/history_entry_ids FIELD 1rR:nt => history_entry/position_id:-> history_position/entry_ids FIELD 1r:nt => history_entry/meeting_id:-> meeting/relevant_history_entry_ids @@ -6114,9 +6153,11 @@ SQL nt:nt => meeting_user/poll_voted_ids:-> poll/voted_ids SQL nr:1r => meeting_user/poll_option_ids:-> poll_option/meeting_user_id SQL nt:1r => meeting_user/acting_ballot_ids:-> poll_ballot/acting_meeting_user_id SQL nt:1r => meeting_user/represented_ballot_ids:-> poll_ballot/represented_meeting_user_id +SQL nt:nt => meeting_user/entitled_at_poll_ids:-> poll/entitled_meeting_user_ids SQL nt:1r => meeting_user/chat_message_ids:-> chat_message/meeting_user_id SQL ntR:nt => meeting_user/group_ids:-> group/meeting_user_ids SQL nt:nt => meeting_user/structure_level_ids:-> structure_level/meeting_user_ids +SQL nt:1Gr => meeting_user/history_entry_ids:-> history_entry/model_id FIELD 1r:nt => motion/lead_motion_id:-> motion/amendment_ids SQL nt:1r => motion/amendment_ids:-> motion/lead_motion_id @@ -6235,6 +6276,7 @@ FIELD 1GrR:nt,nt,nt => poll/content_object_id:-> motion/poll_ids,assignment/poll SQL nr:1rR => poll/ballot_ids:-> poll_ballot/poll_id SQL nt:nt => poll/voted_ids:-> meeting_user/poll_voted_ids SQL nt:nt => poll/entitled_group_ids:-> group/poll_ids +SQL nt:nt => poll/entitled_meeting_user_ids:-> meeting_user/entitled_at_poll_ids SQL nt:1GrR => poll/projection_ids:-> projection/content_object_id FIELD 1rR:nr => poll/meeting_id:-> meeting/poll_ids SQL nt:1Gr => poll/history_entry_ids:-> history_entry/model_id @@ -6331,5 +6373,4 @@ FIELD 1rR:nr => user/organization_id:-> organization/user_ids */ -/* Missing attribute handling for on_delete, constant_legacy, deferred */ -/* Missing handling for collections _meta attributes: managed_by */ \ No newline at end of file +/* Missing attribute handling for on_delete, constant_legacy, deferred */ \ No newline at end of file diff --git a/meta b/meta index 5f42bf2fe..5e35d718d 160000 --- a/meta +++ b/meta @@ -1 +1 @@ -Subproject commit 5f42bf2fecc78a4d2520d199ee45d273357fa525 +Subproject commit 5e35d718d7ba3a0c0f3e78905473f10adf3b8a04 diff --git a/metagen/field_def.go b/metagen/field_def.go index b13935fac..acbddb47f 100644 --- a/metagen/field_def.go +++ b/metagen/field_def.go @@ -293,7 +293,9 @@ var RelationListFields = map[string]string{ "meeting_user/acting_ballot_ids": "poll_ballot/acting_meeting_user_id", "meeting_user/assignment_candidate_ids": "assignment_candidate/meeting_user_id", "meeting_user/chat_message_ids": "chat_message/meeting_user_id", + "meeting_user/entitled_at_poll_ids": "poll/entitled_meeting_user_ids", "meeting_user/group_ids": "group/meeting_user_ids", + "meeting_user/history_entry_ids": "history_entry/model_id", "meeting_user/motion_editor_ids": "motion_editor/meeting_user_id", "meeting_user/motion_submitter_ids": "motion_submitter/meeting_user_id", "meeting_user/motion_supporter_ids": "motion_supporter/meeting_user_id", @@ -351,6 +353,7 @@ var RelationListFields = map[string]string{ "point_of_order_category/speaker_ids": "speaker/point_of_order_category_id", "poll/ballot_ids": "poll_ballot/poll_id", "poll/entitled_group_ids": "group/poll_ids", + "poll/entitled_meeting_user_ids": "meeting_user/entitled_at_poll_ids", "poll/history_entry_ids": "history_entry/model_id", "poll/option_ids": "poll_option/poll_id", "poll/projection_ids": "projection/content_object_id", @@ -379,7 +382,7 @@ var RelationListFields = map[string]string{ // to the fields, there relate to. var GenericRelationFields = map[string]map[string]string{ "agenda_item/content_object_id": {"assignment": "agenda_item_id", "motion": "agenda_item_id", "motion_block": "agenda_item_id", "topic": "agenda_item_id"}, - "history_entry/model_id": {"assignment": "history_entry_ids", "motion": "history_entry_ids", "poll": "history_entry_ids", "user": "history_entry_ids"}, + "history_entry/model_id": {"assignment": "history_entry_ids", "meeting_user": "history_entry_ids", "motion": "history_entry_ids", "poll": "history_entry_ids", "user": "history_entry_ids"}, "list_of_speakers/content_object_id": {"assignment": "list_of_speakers_id", "meeting_mediafile": "list_of_speakers_id", "motion": "list_of_speakers_id", "motion_block": "list_of_speakers_id", "topic": "list_of_speakers_id"}, "mediafile/owner_id": {"meeting": "mediafile_ids", "organization": "mediafile_ids"}, "personal_note/content_object_id": {"motion": "personal_note_ids"}, @@ -839,7 +842,9 @@ var RestrictionModes = map[string]string{ "meeting_user/acting_ballot_ids": "A", "meeting_user/assignment_candidate_ids": "A", "meeting_user/chat_message_ids": "A", + "meeting_user/entitled_at_poll_ids": "A", "meeting_user/group_ids": "A", + "meeting_user/history_entry_ids": "A", "meeting_user/id": "A", "meeting_user/motion_editor_ids": "A", "meeting_user/motion_submitter_ids": "A", @@ -1102,26 +1107,27 @@ var RestrictionModes = map[string]string{ "point_of_order_category/text": "A", // poll - "poll/allow_invalid": "A", - "poll/allow_vote_split": "A", - "poll/anonymized": "A", - "poll/ballot_ids": "A", - "poll/config_id": "A", - "poll/content_object_id": "A", - "poll/entitled_group_ids": "A", - "poll/history_entry_ids": "A", - "poll/id": "A", - "poll/live_voting_enabled": "A", - "poll/meeting_id": "A", - "poll/option_ids": "A", - "poll/projection_ids": "A", - "poll/published": "A", - "poll/sequential_number": "A", - "poll/state": "A", - "poll/title": "A", - "poll/visibility": "A", - "poll/result": "B", - "poll/voted_ids": "B", + "poll/allow_invalid": "A", + "poll/allow_vote_split": "A", + "poll/anonymized": "A", + "poll/ballot_ids": "A", + "poll/config_id": "A", + "poll/content_object_id": "A", + "poll/entitled_group_ids": "A", + "poll/entitled_meeting_user_ids": "A", + "poll/history_entry_ids": "A", + "poll/id": "A", + "poll/live_voting_enabled": "A", + "poll/meeting_id": "A", + "poll/option_ids": "A", + "poll/projection_ids": "A", + "poll/published": "A", + "poll/sequential_number": "A", + "poll/state": "A", + "poll/title": "A", + "poll/visibility": "A", + "poll/result": "B", + "poll/voted_ids": "B", // poll_ballot "poll_ballot/id": "A", From 2eec347183068ea1fe0693f3c802689b25058dd2 Mon Sep 17 00:00:00 2001 From: Oskar Hahn Date: Wed, 15 Jul 2026 15:21:33 +0200 Subject: [PATCH 2/2] go generate --- datastore/dsfetch/fields_generated.go | 79 +- datastore/dskey/gen_collection_fields.go | 1032 ++++++++++---------- datastore/dsmodels/models_generated.go | 182 ++-- datastore/field_def.go | 7 +- datastore/pgtest/sql/schema_relational.sql | 108 +- meta | 2 +- metagen/field_def.go | 37 +- 7 files changed, 787 insertions(+), 660 deletions(-) diff --git a/datastore/dsfetch/fields_generated.go b/datastore/dsfetch/fields_generated.go index f1934f0e0..dc8bfba8c 100644 --- a/datastore/dsfetch/fields_generated.go +++ b/datastore/dsfetch/fields_generated.go @@ -2453,15 +2453,6 @@ func (r *Fetch) MeetingUser_PollOptionIDs(meetingUserID int) *ValueIntSlice { return &ValueIntSlice{fetch: r, key: key} } -func (r *Fetch) MeetingUser_PollVotedIDs(meetingUserID int) *ValueIntSlice { - key, err := dskey.FromParts("meeting_user", meetingUserID, "poll_voted_ids") - if err != nil { - return &ValueIntSlice{err: err} - } - - return &ValueIntSlice{fetch: r, key: key} -} - func (r *Fetch) MeetingUser_RepresentedBallotIDs(meetingUserID int) *ValueIntSlice { key, err := dskey.FromParts("meeting_user", meetingUserID, "represented_ballot_ids") if err != nil { @@ -6431,8 +6422,26 @@ func (r *Fetch) PointOfOrderCategory_Text(pointOfOrderCategoryID int) *ValueStri return &ValueString{fetch: r, key: key, required: true} } -func (r *Fetch) PollBallot_ActingMeetingUserID(pollBallotID int) *ValueMaybeInt { - key, err := dskey.FromParts("poll_ballot", pollBallotID, "acting_meeting_user_id") +func (r *Fetch) PollBallotUser_ActingMeetingUserID(pollBallotUserID int) *ValueInt { + key, err := dskey.FromParts("poll_ballot_user", pollBallotUserID, "acting_meeting_user_id") + if err != nil { + return &ValueInt{err: err} + } + + return &ValueInt{fetch: r, key: key, required: true} +} + +func (r *Fetch) PollBallotUser_ID(pollBallotUserID int) *ValueInt { + key, err := dskey.FromParts("poll_ballot_user", pollBallotUserID, "id") + if err != nil { + return &ValueInt{err: err} + } + + return &ValueInt{fetch: r, key: key, required: true} +} + +func (r *Fetch) PollBallotUser_PollBallotID(pollBallotUserID int) *ValueMaybeInt { + key, err := dskey.FromParts("poll_ballot_user", pollBallotUserID, "poll_ballot_id") if err != nil { return &ValueMaybeInt{err: err} } @@ -6440,8 +6449,8 @@ func (r *Fetch) PollBallot_ActingMeetingUserID(pollBallotID int) *ValueMaybeInt return &ValueMaybeInt{fetch: r, key: key} } -func (r *Fetch) PollBallot_ID(pollBallotID int) *ValueInt { - key, err := dskey.FromParts("poll_ballot", pollBallotID, "id") +func (r *Fetch) PollBallotUser_PollID(pollBallotUserID int) *ValueInt { + key, err := dskey.FromParts("poll_ballot_user", pollBallotUserID, "poll_id") if err != nil { return &ValueInt{err: err} } @@ -6449,8 +6458,8 @@ func (r *Fetch) PollBallot_ID(pollBallotID int) *ValueInt { return &ValueInt{fetch: r, key: key, required: true} } -func (r *Fetch) PollBallot_PollID(pollBallotID int) *ValueInt { - key, err := dskey.FromParts("poll_ballot", pollBallotID, "poll_id") +func (r *Fetch) PollBallotUser_RepresentedMeetingUserID(pollBallotUserID int) *ValueInt { + key, err := dskey.FromParts("poll_ballot_user", pollBallotUserID, "represented_meeting_user_id") if err != nil { return &ValueInt{err: err} } @@ -6458,8 +6467,17 @@ func (r *Fetch) PollBallot_PollID(pollBallotID int) *ValueInt { return &ValueInt{fetch: r, key: key, required: true} } -func (r *Fetch) PollBallot_RepresentedMeetingUserID(pollBallotID int) *ValueMaybeInt { - key, err := dskey.FromParts("poll_ballot", pollBallotID, "represented_meeting_user_id") +func (r *Fetch) PollBallot_ID(pollBallotID int) *ValueInt { + key, err := dskey.FromParts("poll_ballot", pollBallotID, "id") + if err != nil { + return &ValueInt{err: err} + } + + return &ValueInt{fetch: r, key: key, required: true} +} + +func (r *Fetch) PollBallot_PollBallotUserID(pollBallotID int) *ValueMaybeInt { + key, err := dskey.FromParts("poll_ballot", pollBallotID, "poll_ballot_user_id") if err != nil { return &ValueMaybeInt{err: err} } @@ -6467,6 +6485,15 @@ func (r *Fetch) PollBallot_RepresentedMeetingUserID(pollBallotID int) *ValueMayb return &ValueMaybeInt{fetch: r, key: key} } +func (r *Fetch) PollBallot_PollID(pollBallotID int) *ValueInt { + key, err := dskey.FromParts("poll_ballot", pollBallotID, "poll_id") + if err != nil { + return &ValueInt{err: err} + } + + return &ValueInt{fetch: r, key: key, required: true} +} + func (r *Fetch) PollBallot_Split(pollBallotID int) *ValueBool { key, err := dskey.FromParts("poll_ballot", pollBallotID, "split") if err != nil { @@ -6845,6 +6872,15 @@ func (r *Fetch) Poll_BallotIDs(pollID int) *ValueIntSlice { return &ValueIntSlice{fetch: r, key: key} } +func (r *Fetch) Poll_BallotUserIDs(pollID int) *ValueIntSlice { + key, err := dskey.FromParts("poll", pollID, "ballot_user_ids") + if err != nil { + return &ValueIntSlice{err: err} + } + + return &ValueIntSlice{fetch: r, key: key} +} + func (r *Fetch) Poll_ConfigID(pollID int) *ValueString { key, err := dskey.FromParts("poll", pollID, "config_id") if err != nil { @@ -6989,15 +7025,6 @@ func (r *Fetch) Poll_Visibility(pollID int) *ValueString { return &ValueString{fetch: r, key: key, required: true} } -func (r *Fetch) Poll_VotedIDs(pollID int) *ValueIntSlice { - key, err := dskey.FromParts("poll", pollID, "voted_ids") - if err != nil { - return &ValueIntSlice{err: err} - } - - return &ValueIntSlice{fetch: r, key: key} -} - func (r *Fetch) Projection_ContentObjectID(projectionID int) *ValueString { key, err := dskey.FromParts("projection", projectionID, "content_object_id") if err != nil { diff --git a/datastore/dskey/gen_collection_fields.go b/datastore/dskey/gen_collection_fields.go index 816b444f7..438bc0a03 100644 --- a/datastore/dskey/gen_collection_fields.go +++ b/datastore/dskey/gen_collection_fields.go @@ -451,7 +451,6 @@ var collectionFields = [...]collectionField{ {"meeting_user", "number"}, {"meeting_user", "personal_note_ids"}, {"meeting_user", "poll_option_ids"}, - {"meeting_user", "poll_voted_ids"}, {"meeting_user", "represented_ballot_ids"}, {"meeting_user", "speaker_ids"}, {"meeting_user", "structure_level_ids"}, @@ -698,6 +697,7 @@ var collectionFields = [...]collectionField{ {"poll", "allow_vote_split"}, {"poll", "anonymized"}, {"poll", "ballot_ids"}, + {"poll", "ballot_user_ids"}, {"poll", "config_id"}, {"poll", "content_object_id"}, {"poll", "entitled_group_ids"}, @@ -714,17 +714,19 @@ var collectionFields = [...]collectionField{ {"poll", "state"}, {"poll", "title"}, {"poll", "visibility"}, - {"poll", "voted_ids"}, {"poll_ballot", "A"}, - {"poll_ballot", "B"}, - {"poll_ballot", "C"}, - {"poll_ballot", "acting_meeting_user_id"}, {"poll_ballot", "id"}, + {"poll_ballot", "poll_ballot_user_id"}, {"poll_ballot", "poll_id"}, - {"poll_ballot", "represented_meeting_user_id"}, {"poll_ballot", "split"}, {"poll_ballot", "value"}, {"poll_ballot", "weight"}, + {"poll_ballot_user", "A"}, + {"poll_ballot_user", "acting_meeting_user_id"}, + {"poll_ballot_user", "id"}, + {"poll_ballot_user", "poll_ballot_id"}, + {"poll_ballot_user", "poll_id"}, + {"poll_ballot_user", "represented_meeting_user_id"}, {"poll_config_approval", "A"}, {"poll_config_approval", "allow_abstain"}, {"poll_config_approval", "id"}, @@ -1874,499 +1876,499 @@ func collectionFieldToID(cf string) int { return 447 case "meeting_user/poll_option_ids": return 448 - case "meeting_user/poll_voted_ids": - return 449 case "meeting_user/represented_ballot_ids": - return 450 + return 449 case "meeting_user/speaker_ids": - return 451 + return 450 case "meeting_user/structure_level_ids": - return 452 + return 451 case "meeting_user/user_id": - return 453 + return 452 case "meeting_user/vote_delegated_to_id": - return 454 + return 453 case "meeting_user/vote_delegations_from_ids": - return 455 + return 454 case "meeting_user/vote_weight": - return 456 + return 455 case "motion/A": - return 457 + return 456 case "motion/B": - return 458 + return 457 case "motion/C": - return 459 + return 458 case "motion/D": - return 460 + return 459 case "motion/E": - return 461 + return 460 case "motion/additional_submitter": - return 462 + return 461 case "motion/agenda_item_id": - return 463 + return 462 case "motion/all_derived_motion_ids": - return 464 + return 463 case "motion/all_origin_ids": - return 465 + return 464 case "motion/amendment_ids": - return 466 + return 465 case "motion/amendment_paragraphs": - return 467 + return 466 case "motion/attachment_meeting_mediafile_ids": - return 468 + return 467 case "motion/block_id": - return 469 + return 468 case "motion/category_id": - return 470 + return 469 case "motion/category_weight": - return 471 + return 470 case "motion/change_recommendation_ids": - return 472 + return 471 case "motion/comment_ids": - return 473 + return 472 case "motion/created": - return 474 + return 473 case "motion/derived_motion_ids": - return 475 + return 474 case "motion/diff_version": - return 476 + return 475 case "motion/editor_ids": - return 477 + return 476 case "motion/forwarded": - return 478 + return 477 case "motion/history_entry_ids": - return 479 + return 478 case "motion/id": - return 480 + return 479 case "motion/identical_motion_ids": - return 481 + return 480 case "motion/last_modified": - return 482 + return 481 case "motion/lead_motion_id": - return 483 + return 482 case "motion/list_of_speakers_id": - return 484 + return 483 case "motion/marked_forwarded": - return 485 + return 484 case "motion/meeting_id": - return 486 + return 485 case "motion/modified_final_version": - return 487 + return 486 case "motion/number": - return 488 + return 487 case "motion/number_value": - return 489 + return 488 case "motion/origin_id": - return 490 + return 489 case "motion/origin_meeting_id": - return 491 + return 490 case "motion/personal_note_ids": - return 492 + return 491 case "motion/poll_ids": - return 493 + return 492 case "motion/projection_ids": - return 494 + return 493 case "motion/reason": - return 495 + return 494 case "motion/recommendation_extension": - return 496 + return 495 case "motion/recommendation_extension_reference_ids": - return 497 + return 496 case "motion/recommendation_id": - return 498 + return 497 case "motion/referenced_in_motion_recommendation_extension_ids": - return 499 + return 498 case "motion/referenced_in_motion_state_extension_ids": - return 500 + return 499 case "motion/sequential_number": - return 501 + return 500 case "motion/sort_child_ids": - return 502 + return 501 case "motion/sort_parent_id": - return 503 + return 502 case "motion/sort_weight": - return 504 + return 503 case "motion/start_line_number": - return 505 + return 504 case "motion/state_extension": - return 506 + return 505 case "motion/state_extension_reference_ids": - return 507 + return 506 case "motion/state_id": - return 508 + return 507 case "motion/submitter_ids": - return 509 + return 508 case "motion/supporter_ids": - return 510 + return 509 case "motion/tag_ids": - return 511 + return 510 case "motion/text": - return 512 + return 511 case "motion/text_hash": - return 513 + return 512 case "motion/title": - return 514 + return 513 case "motion/workflow_timestamp": - return 515 + return 514 case "motion/working_group_speaker_ids": - return 516 + return 515 case "motion_block/A": - return 517 + return 516 case "motion_block/agenda_item_id": - return 518 + return 517 case "motion_block/id": - return 519 + return 518 case "motion_block/internal": - return 520 + return 519 case "motion_block/list_of_speakers_id": - return 521 + return 520 case "motion_block/meeting_id": - return 522 + return 521 case "motion_block/motion_ids": - return 523 + return 522 case "motion_block/projection_ids": - return 524 + return 523 case "motion_block/sequential_number": - return 525 + return 524 case "motion_block/title": - return 526 + return 525 case "motion_category/A": - return 527 + return 526 case "motion_category/child_ids": - return 528 + return 527 case "motion_category/id": - return 529 + return 528 case "motion_category/level": - return 530 + return 529 case "motion_category/meeting_id": - return 531 + return 530 case "motion_category/motion_ids": - return 532 + return 531 case "motion_category/name": - return 533 + return 532 case "motion_category/parent_id": - return 534 + return 533 case "motion_category/prefix": - return 535 + return 534 case "motion_category/sequential_number": - return 536 + return 535 case "motion_category/weight": - return 537 + return 536 case "motion_change_recommendation/A": - return 538 + return 537 case "motion_change_recommendation/creation_time": - return 539 + return 538 case "motion_change_recommendation/id": - return 540 + return 539 case "motion_change_recommendation/internal": - return 541 + return 540 case "motion_change_recommendation/line_from": - return 542 + return 541 case "motion_change_recommendation/line_to": - return 543 + return 542 case "motion_change_recommendation/meeting_id": - return 544 + return 543 case "motion_change_recommendation/motion_id": - return 545 + return 544 case "motion_change_recommendation/other_description": - return 546 + return 545 case "motion_change_recommendation/rejected": - return 547 + return 546 case "motion_change_recommendation/text": - return 548 + return 547 case "motion_change_recommendation/type": - return 549 + return 548 case "motion_comment/A": - return 550 + return 549 case "motion_comment/comment": - return 551 + return 550 case "motion_comment/id": - return 552 + return 551 case "motion_comment/meeting_id": - return 553 + return 552 case "motion_comment/motion_id": - return 554 + return 553 case "motion_comment/section_id": - return 555 + return 554 case "motion_comment_section/A": - return 556 + return 555 case "motion_comment_section/comment_ids": - return 557 + return 556 case "motion_comment_section/id": - return 558 + return 557 case "motion_comment_section/meeting_id": - return 559 + return 558 case "motion_comment_section/name": - return 560 + return 559 case "motion_comment_section/read_group_ids": - return 561 + return 560 case "motion_comment_section/sequential_number": - return 562 + return 561 case "motion_comment_section/submitter_can_write": - return 563 + return 562 case "motion_comment_section/weight": - return 564 + return 563 case "motion_comment_section/write_group_ids": - return 565 + return 564 case "motion_editor/A": - return 566 + return 565 case "motion_editor/id": - return 567 + return 566 case "motion_editor/meeting_id": - return 568 + return 567 case "motion_editor/meeting_user_id": - return 569 + return 568 case "motion_editor/motion_id": - return 570 + return 569 case "motion_editor/weight": - return 571 + return 570 case "motion_state/A": - return 572 + return 571 case "motion_state/allow_amendment_forwarding": - return 573 + return 572 case "motion_state/allow_create_poll": - return 574 + return 573 case "motion_state/allow_motion_forwarding": - return 575 + return 574 case "motion_state/allow_submitter_edit": - return 576 + return 575 case "motion_state/allow_support": - return 577 + return 576 case "motion_state/css_class": - return 578 + return 577 case "motion_state/first_state_of_workflow_id": - return 579 + return 578 case "motion_state/id": - return 580 + return 579 case "motion_state/is_internal": - return 581 + return 580 case "motion_state/meeting_id": - return 582 + return 581 case "motion_state/merge_amendment_into_final": - return 583 + return 582 case "motion_state/motion_ids": - return 584 + return 583 case "motion_state/motion_recommendation_ids": - return 585 + return 584 case "motion_state/name": - return 586 + return 585 case "motion_state/next_state_ids": - return 587 + return 586 case "motion_state/previous_state_ids": - return 588 + return 587 case "motion_state/recommendation_label": - return 589 + return 588 case "motion_state/restrictions": - return 590 + return 589 case "motion_state/set_number": - return 591 + return 590 case "motion_state/set_workflow_timestamp": - return 592 + return 591 case "motion_state/show_recommendation_extension_field": - return 593 + return 592 case "motion_state/show_state_extension_field": - return 594 + return 593 case "motion_state/state_button_label": - return 595 + return 594 case "motion_state/submitter_withdraw_back_ids": - return 596 + return 595 case "motion_state/submitter_withdraw_state_id": - return 597 + return 596 case "motion_state/weight": - return 598 + return 597 case "motion_state/workflow_id": - return 599 + return 598 case "motion_submitter/A": - return 600 + return 599 case "motion_submitter/id": - return 601 + return 600 case "motion_submitter/meeting_id": - return 602 + return 601 case "motion_submitter/meeting_user_id": - return 603 + return 602 case "motion_submitter/motion_id": - return 604 + return 603 case "motion_submitter/weight": - return 605 + return 604 case "motion_supporter/A": - return 606 + return 605 case "motion_supporter/id": - return 607 + return 606 case "motion_supporter/meeting_id": - return 608 + return 607 case "motion_supporter/meeting_user_id": - return 609 + return 608 case "motion_supporter/motion_id": - return 610 + return 609 case "motion_workflow/A": - return 611 + return 610 case "motion_workflow/default_amendment_workflow_meeting_id": - return 612 + return 611 case "motion_workflow/default_workflow_meeting_id": - return 613 + return 612 case "motion_workflow/first_state_id": - return 614 + return 613 case "motion_workflow/id": - return 615 + return 614 case "motion_workflow/meeting_id": - return 616 + return 615 case "motion_workflow/name": - return 617 + return 616 case "motion_workflow/sequential_number": - return 618 + return 617 case "motion_workflow/state_ids": - return 619 + return 618 case "motion_working_group_speaker/A": - return 620 + return 619 case "motion_working_group_speaker/id": - return 621 + return 620 case "motion_working_group_speaker/meeting_id": - return 622 + return 621 case "motion_working_group_speaker/meeting_user_id": - return 623 + return 622 case "motion_working_group_speaker/motion_id": - return 624 + return 623 case "motion_working_group_speaker/weight": - return 625 + return 624 case "organization/A": - return 626 + return 625 case "organization/B": - return 627 + return 626 case "organization/C": - return 628 + return 627 case "organization/D": - return 629 + return 628 case "organization/E": - return 630 + return 629 case "organization/active_meeting_ids": - return 631 + return 630 case "organization/archived_meeting_ids": - return 632 + return 631 case "organization/committee_ids": - return 633 + return 632 case "organization/default_language": - return 634 + return 633 case "organization/description": - return 635 + return 634 case "organization/disable_forward_with_attachments": - return 636 + return 635 case "organization/enable_anonymous": - return 637 + return 636 case "organization/enable_chat": - return 638 + return 637 case "organization/enable_electronic_voting": - return 639 + return 638 case "organization/gender_ids": - return 640 + return 639 case "organization/id": - return 641 + return 640 case "organization/legal_notice": - return 642 + return 641 case "organization/limit_of_meetings": - return 643 + return 642 case "organization/limit_of_users": - return 644 + return 643 case "organization/login_text": - return 645 + return 644 case "organization/mediafile_ids": - return 646 + return 645 case "organization/name": - return 647 + return 646 case "organization/organization_tag_ids": - return 648 + return 647 case "organization/privacy_policy": - return 649 + return 648 case "organization/published_mediafile_ids": - return 650 + return 649 case "organization/require_duplicate_from": - return 651 + return 650 case "organization/reset_password_verbose_errors": - return 652 + return 651 case "organization/restrict_edit_forward_committees": - return 653 + return 652 case "organization/restrict_editing_same_level_committee_admins": - return 654 + return 653 case "organization/saml_attr_mapping": - return 655 + return 654 case "organization/saml_enabled": - return 656 + return 655 case "organization/saml_login_button_text": - return 657 + return 656 case "organization/saml_metadata_idp": - return 658 + return 657 case "organization/saml_metadata_sp": - return 659 + return 658 case "organization/saml_private_key": - return 660 + return 659 case "organization/template_meeting_ids": - return 661 + return 660 case "organization/theme_id": - return 662 + return 661 case "organization/theme_ids": - return 663 + return 662 case "organization/time_zone": - return 664 + return 663 case "organization/url": - return 665 + return 664 case "organization/user_ids": - return 666 + return 665 case "organization/users_email_body": - return 667 + return 666 case "organization/users_email_replyto": - return 668 + return 667 case "organization/users_email_sender": - return 669 + return 668 case "organization/users_email_subject": - return 670 + return 669 case "organization_tag/A": - return 671 + return 670 case "organization_tag/color": - return 672 + return 671 case "organization_tag/id": - return 673 + return 672 case "organization_tag/name": - return 674 + return 673 case "organization_tag/organization_id": - return 675 + return 674 case "organization_tag/tagged_ids": - return 676 + return 675 case "personal_note/A": - return 677 + return 676 case "personal_note/content_object_id": - return 678 + return 677 case "personal_note/id": - return 679 + return 678 case "personal_note/meeting_id": - return 680 + return 679 case "personal_note/meeting_user_id": - return 681 + return 680 case "personal_note/note": - return 682 + return 681 case "personal_note/star": - return 683 + return 682 case "point_of_order_category/A": - return 684 + return 683 case "point_of_order_category/id": - return 685 + return 684 case "point_of_order_category/meeting_id": - return 686 + return 685 case "point_of_order_category/rank": - return 687 + return 686 case "point_of_order_category/speaker_ids": - return 688 + return 687 case "point_of_order_category/text": - return 689 + return 688 case "poll/A": - return 690 + return 689 case "poll/B": - return 691 + return 690 case "poll/allow_invalid": - return 692 + return 691 case "poll/allow_vote_split": - return 693 + return 692 case "poll/anonymized": - return 694 + return 693 case "poll/ballot_ids": + return 694 + case "poll/ballot_user_ids": return 695 case "poll/config_id": return 696 @@ -2400,526 +2402,530 @@ func collectionFieldToID(cf string) int { return 710 case "poll/visibility": return 711 - case "poll/voted_ids": - return 712 case "poll_ballot/A": + return 712 + case "poll_ballot/id": return 713 - case "poll_ballot/B": + case "poll_ballot/poll_ballot_user_id": return 714 - case "poll_ballot/C": + case "poll_ballot/poll_id": return 715 - case "poll_ballot/acting_meeting_user_id": + case "poll_ballot/split": return 716 - case "poll_ballot/id": + case "poll_ballot/value": return 717 - case "poll_ballot/poll_id": + case "poll_ballot/weight": return 718 - case "poll_ballot/represented_meeting_user_id": + case "poll_ballot_user/A": return 719 - case "poll_ballot/split": + case "poll_ballot_user/acting_meeting_user_id": return 720 - case "poll_ballot/value": + case "poll_ballot_user/id": return 721 - case "poll_ballot/weight": + case "poll_ballot_user/poll_ballot_id": return 722 - case "poll_config_approval/A": + case "poll_ballot_user/poll_id": return 723 - case "poll_config_approval/allow_abstain": + case "poll_ballot_user/represented_meeting_user_id": return 724 - case "poll_config_approval/id": + case "poll_config_approval/A": return 725 - case "poll_config_approval/onehundred_percent_base": + case "poll_config_approval/allow_abstain": return 726 - case "poll_config_approval/poll_id": + case "poll_config_approval/id": return 727 - case "poll_config_rating_approval/A": + case "poll_config_approval/onehundred_percent_base": return 728 - case "poll_config_rating_approval/allow_abstain": + case "poll_config_approval/poll_id": return 729 - case "poll_config_rating_approval/id": + case "poll_config_rating_approval/A": return 730 - case "poll_config_rating_approval/max_options_amount": + case "poll_config_rating_approval/allow_abstain": return 731 - case "poll_config_rating_approval/max_yes_amount": + case "poll_config_rating_approval/id": return 732 - case "poll_config_rating_approval/min_options_amount": + case "poll_config_rating_approval/max_options_amount": return 733 - case "poll_config_rating_approval/onehundred_percent_base": + case "poll_config_rating_approval/max_yes_amount": return 734 - case "poll_config_rating_approval/poll_id": + case "poll_config_rating_approval/min_options_amount": return 735 - case "poll_config_rating_score/A": + case "poll_config_rating_approval/onehundred_percent_base": return 736 - case "poll_config_rating_score/id": + case "poll_config_rating_approval/poll_id": return 737 - case "poll_config_rating_score/max_options_amount": + case "poll_config_rating_score/A": return 738 - case "poll_config_rating_score/max_vote_sum": + case "poll_config_rating_score/id": return 739 - case "poll_config_rating_score/max_votes_per_option": + case "poll_config_rating_score/max_options_amount": return 740 - case "poll_config_rating_score/min_options_amount": + case "poll_config_rating_score/max_vote_sum": return 741 - case "poll_config_rating_score/min_vote_sum": + case "poll_config_rating_score/max_votes_per_option": return 742 - case "poll_config_rating_score/onehundred_percent_base": + case "poll_config_rating_score/min_options_amount": return 743 - case "poll_config_rating_score/poll_id": + case "poll_config_rating_score/min_vote_sum": return 744 - case "poll_config_selection/A": + case "poll_config_rating_score/onehundred_percent_base": return 745 - case "poll_config_selection/allow_nota": + case "poll_config_rating_score/poll_id": return 746 - case "poll_config_selection/display_chart": + case "poll_config_selection/A": return 747 - case "poll_config_selection/id": + case "poll_config_selection/allow_nota": return 748 - case "poll_config_selection/max_options_amount": + case "poll_config_selection/display_chart": return 749 - case "poll_config_selection/min_options_amount": + case "poll_config_selection/id": return 750 - case "poll_config_selection/onehundred_percent_base": + case "poll_config_selection/max_options_amount": return 751 - case "poll_config_selection/poll_id": + case "poll_config_selection/min_options_amount": return 752 - case "poll_config_selection/strike_out": + case "poll_config_selection/onehundred_percent_base": return 753 - case "poll_config_stv_scottish/A": + case "poll_config_selection/poll_id": return 754 - case "poll_config_stv_scottish/id": + case "poll_config_selection/strike_out": return 755 - case "poll_config_stv_scottish/poll_id": + case "poll_config_stv_scottish/A": return 756 - case "poll_config_stv_scottish/posts": + case "poll_config_stv_scottish/id": return 757 - case "poll_option/A": + case "poll_config_stv_scottish/poll_id": return 758 - case "poll_option/id": + case "poll_config_stv_scottish/posts": return 759 - case "poll_option/meeting_user_id": + case "poll_option/A": return 760 - case "poll_option/poll_id": + case "poll_option/id": return 761 - case "poll_option/text": + case "poll_option/meeting_user_id": return 762 - case "poll_option/weight": + case "poll_option/poll_id": return 763 - case "projection/A": + case "poll_option/text": return 764 - case "projection/content_object_id": + case "poll_option/weight": return 765 - case "projection/current_projector_id": + case "projection/A": return 766 - case "projection/history_projector_id": + case "projection/content_object_id": return 767 - case "projection/id": + case "projection/current_projector_id": return 768 - case "projection/meeting_id": + case "projection/history_projector_id": return 769 - case "projection/options": + case "projection/id": return 770 - case "projection/preview_projector_id": + case "projection/meeting_id": return 771 - case "projection/stable": + case "projection/options": return 772 - case "projection/type": + case "projection/preview_projector_id": return 773 - case "projection/weight": + case "projection/stable": return 774 - case "projector/A": + case "projection/type": return 775 - case "projector/aspect_ratio_denominator": + case "projection/weight": return 776 - case "projector/aspect_ratio_numerator": + case "projector/A": return 777 - case "projector/background_color": + case "projector/aspect_ratio_denominator": return 778 - case "projector/chyron_background_color": + case "projector/aspect_ratio_numerator": return 779 - case "projector/chyron_background_color_2": + case "projector/background_color": return 780 - case "projector/chyron_font_color": + case "projector/chyron_background_color": return 781 - case "projector/chyron_font_color_2": + case "projector/chyron_background_color_2": return 782 - case "projector/color": + case "projector/chyron_font_color": return 783 - case "projector/current_projection_ids": + case "projector/chyron_font_color_2": return 784 - case "projector/header_background_color": + case "projector/color": return 785 - case "projector/header_font_color": + case "projector/current_projection_ids": return 786 - case "projector/header_h1_color": + case "projector/header_background_color": return 787 - case "projector/history_projection_ids": + case "projector/header_font_color": return 788 - case "projector/id": + case "projector/header_h1_color": return 789 - case "projector/is_internal": + case "projector/history_projection_ids": return 790 - case "projector/meeting_id": + case "projector/id": return 791 - case "projector/name": + case "projector/is_internal": return 792 - case "projector/preview_projection_ids": + case "projector/meeting_id": return 793 - case "projector/scale": + case "projector/name": return 794 - case "projector/scroll": + case "projector/preview_projection_ids": return 795 - case "projector/sequential_number": + case "projector/scale": return 796 - case "projector/show_clock": + case "projector/scroll": return 797 - case "projector/show_header_footer": + case "projector/sequential_number": return 798 - case "projector/show_logo": + case "projector/show_clock": return 799 - case "projector/show_title": + case "projector/show_header_footer": return 800 - case "projector/used_as_default_projector_for_agenda_item_list_in_meeting_id": + case "projector/show_logo": return 801 - case "projector/used_as_default_projector_for_amendment_in_meeting_id": + case "projector/show_title": return 802 - case "projector/used_as_default_projector_for_assignment_in_meeting_id": + case "projector/used_as_default_projector_for_agenda_item_list_in_meeting_id": return 803 - case "projector/used_as_default_projector_for_assignment_poll_in_meeting_id": + case "projector/used_as_default_projector_for_amendment_in_meeting_id": return 804 - case "projector/used_as_default_projector_for_countdown_in_meeting_id": + case "projector/used_as_default_projector_for_assignment_in_meeting_id": return 805 - case "projector/used_as_default_projector_for_current_los_in_meeting_id": + case "projector/used_as_default_projector_for_assignment_poll_in_meeting_id": return 806 - case "projector/used_as_default_projector_for_list_of_speakers_in_meeting_id": + case "projector/used_as_default_projector_for_countdown_in_meeting_id": return 807 - case "projector/used_as_default_projector_for_mediafile_in_meeting_id": + case "projector/used_as_default_projector_for_current_los_in_meeting_id": return 808 - case "projector/used_as_default_projector_for_message_in_meeting_id": + case "projector/used_as_default_projector_for_list_of_speakers_in_meeting_id": return 809 - case "projector/used_as_default_projector_for_motion_block_in_meeting_id": + case "projector/used_as_default_projector_for_mediafile_in_meeting_id": return 810 - case "projector/used_as_default_projector_for_motion_in_meeting_id": + case "projector/used_as_default_projector_for_message_in_meeting_id": return 811 - case "projector/used_as_default_projector_for_motion_poll_in_meeting_id": + case "projector/used_as_default_projector_for_motion_block_in_meeting_id": return 812 - case "projector/used_as_default_projector_for_topic_in_meeting_id": + case "projector/used_as_default_projector_for_motion_in_meeting_id": return 813 - case "projector/used_as_default_projector_for_topic_poll_in_meeting_id": + case "projector/used_as_default_projector_for_motion_poll_in_meeting_id": return 814 - case "projector/used_as_reference_projector_meeting_id": + case "projector/used_as_default_projector_for_topic_in_meeting_id": return 815 - case "projector/width": + case "projector/used_as_default_projector_for_topic_poll_in_meeting_id": return 816 - case "projector_countdown/A": + case "projector/used_as_reference_projector_meeting_id": return 817 - case "projector_countdown/countdown_time": + case "projector/width": return 818 - case "projector_countdown/default_time": + case "projector_countdown/A": return 819 - case "projector_countdown/description": + case "projector_countdown/countdown_time": return 820 - case "projector_countdown/id": + case "projector_countdown/default_time": return 821 - case "projector_countdown/meeting_id": + case "projector_countdown/description": return 822 - case "projector_countdown/projection_ids": + case "projector_countdown/id": return 823 - case "projector_countdown/running": + case "projector_countdown/meeting_id": return 824 - case "projector_countdown/title": + case "projector_countdown/projection_ids": return 825 - case "projector_countdown/used_as_list_of_speakers_countdown_meeting_id": + case "projector_countdown/running": return 826 - case "projector_countdown/used_as_poll_countdown_meeting_id": + case "projector_countdown/title": return 827 - case "projector_message/A": + case "projector_countdown/used_as_list_of_speakers_countdown_meeting_id": return 828 - case "projector_message/id": + case "projector_countdown/used_as_poll_countdown_meeting_id": return 829 - case "projector_message/meeting_id": + case "projector_message/A": return 830 - case "projector_message/message": + case "projector_message/id": return 831 - case "projector_message/projection_ids": + case "projector_message/meeting_id": return 832 - case "speaker/A": + case "projector_message/message": return 833 - case "speaker/answer": + case "projector_message/projection_ids": return 834 - case "speaker/begin_time": + case "speaker/A": return 835 - case "speaker/end_time": + case "speaker/answer": return 836 - case "speaker/id": + case "speaker/begin_time": return 837 - case "speaker/list_of_speakers_id": + case "speaker/end_time": return 838 - case "speaker/meeting_id": + case "speaker/id": return 839 - case "speaker/meeting_user_id": + case "speaker/list_of_speakers_id": return 840 - case "speaker/note": + case "speaker/meeting_id": return 841 - case "speaker/pause_time": + case "speaker/meeting_user_id": return 842 + case "speaker/note": + return 843 + case "speaker/pause_time": + return 844 case "speaker/point_of_order": - return 843 + return 845 case "speaker/point_of_order_category_id": - return 844 + return 846 case "speaker/speech_state": - return 845 + return 847 case "speaker/structure_level_list_of_speakers_id": - return 846 + return 848 case "speaker/total_pause": - return 847 + return 849 case "speaker/unpause_time": - return 848 + return 850 case "speaker/weight": - return 849 + return 851 case "structure_level/A": - return 850 + return 852 case "structure_level/color": - return 851 + return 853 case "structure_level/default_time": - return 852 + return 854 case "structure_level/id": - return 853 + return 855 case "structure_level/meeting_id": - return 854 + return 856 case "structure_level/meeting_user_ids": - return 855 + return 857 case "structure_level/name": - return 856 + return 858 case "structure_level/structure_level_list_of_speakers_ids": - return 857 + return 859 case "structure_level_list_of_speakers/A": - return 858 + return 860 case "structure_level_list_of_speakers/additional_time": - return 859 + return 861 case "structure_level_list_of_speakers/current_start_time": - return 860 + return 862 case "structure_level_list_of_speakers/id": - return 861 + return 863 case "structure_level_list_of_speakers/initial_time": - return 862 + return 864 case "structure_level_list_of_speakers/list_of_speakers_id": - return 863 + return 865 case "structure_level_list_of_speakers/meeting_id": - return 864 + return 866 case "structure_level_list_of_speakers/remaining_time": - return 865 + return 867 case "structure_level_list_of_speakers/speaker_ids": - return 866 + return 868 case "structure_level_list_of_speakers/structure_level_id": - return 867 + return 869 case "tag/A": - return 868 + return 870 case "tag/id": - return 869 + return 871 case "tag/meeting_id": - return 870 + return 872 case "tag/name": - return 871 + return 873 case "tag/tagged_ids": - return 872 + return 874 case "theme/A": - return 873 + return 875 case "theme/abstain": - return 874 + return 876 case "theme/accent_100": - return 875 + return 877 case "theme/accent_200": - return 876 + return 878 case "theme/accent_300": - return 877 + return 879 case "theme/accent_400": - return 878 + return 880 case "theme/accent_50": - return 879 + return 881 case "theme/accent_500": - return 880 + return 882 case "theme/accent_600": - return 881 + return 883 case "theme/accent_700": - return 882 + return 884 case "theme/accent_800": - return 883 + return 885 case "theme/accent_900": - return 884 + return 886 case "theme/accent_a100": - return 885 + return 887 case "theme/accent_a200": - return 886 + return 888 case "theme/accent_a400": - return 887 + return 889 case "theme/accent_a700": - return 888 + return 890 case "theme/headbar": - return 889 + return 891 case "theme/id": - return 890 + return 892 case "theme/name": - return 891 + return 893 case "theme/no": - return 892 + return 894 case "theme/organization_id": - return 893 + return 895 case "theme/primary_100": - return 894 + return 896 case "theme/primary_200": - return 895 + return 897 case "theme/primary_300": - return 896 + return 898 case "theme/primary_400": - return 897 + return 899 case "theme/primary_50": - return 898 + return 900 case "theme/primary_500": - return 899 + return 901 case "theme/primary_600": - return 900 + return 902 case "theme/primary_700": - return 901 + return 903 case "theme/primary_800": - return 902 + return 904 case "theme/primary_900": - return 903 + return 905 case "theme/primary_a100": - return 904 + return 906 case "theme/primary_a200": - return 905 + return 907 case "theme/primary_a400": - return 906 + return 908 case "theme/primary_a700": - return 907 + return 909 case "theme/theme_for_organization_id": - return 908 + return 910 case "theme/warn_100": - return 909 + return 911 case "theme/warn_200": - return 910 + return 912 case "theme/warn_300": - return 911 + return 913 case "theme/warn_400": - return 912 + return 914 case "theme/warn_50": - return 913 + return 915 case "theme/warn_500": - return 914 + return 916 case "theme/warn_600": - return 915 + return 917 case "theme/warn_700": - return 916 + return 918 case "theme/warn_800": - return 917 + return 919 case "theme/warn_900": - return 918 + return 920 case "theme/warn_a100": - return 919 + return 921 case "theme/warn_a200": - return 920 + return 922 case "theme/warn_a400": - return 921 + return 923 case "theme/warn_a700": - return 922 + return 924 case "theme/yes": - return 923 + return 925 case "topic/A": - return 924 + return 926 case "topic/agenda_item_id": - return 925 + return 927 case "topic/attachment_meeting_mediafile_ids": - return 926 + return 928 case "topic/id": - return 927 + return 929 case "topic/list_of_speakers_id": - return 928 + return 930 case "topic/meeting_id": - return 929 + return 931 case "topic/poll_ids": - return 930 + return 932 case "topic/projection_ids": - return 931 + return 933 case "topic/sequential_number": - return 932 + return 934 case "topic/text": - return 933 + return 935 case "topic/title": - return 934 + return 936 case "user/A": - return 935 + return 937 case "user/B": - return 936 + return 938 case "user/D": - return 937 + return 939 case "user/E": - return 938 + return 940 case "user/F": - return 939 + return 941 case "user/G": - return 940 + return 942 case "user/H": - return 941 + return 943 case "user/can_change_own_password": - return 942 + return 944 case "user/committee_ids": - return 943 + return 945 case "user/committee_management_ids": - return 944 + return 946 case "user/default_password": - return 945 + return 947 case "user/default_vote_weight": - return 946 + return 948 case "user/email": - return 947 + return 949 case "user/external": - return 948 + return 950 case "user/first_name": - return 949 + return 951 case "user/gender_id": - return 950 + return 952 case "user/history_entry_ids": - return 951 + return 953 case "user/history_position_ids": - return 952 + return 954 case "user/home_committee_id": - return 953 + return 955 case "user/id": - return 954 + return 956 case "user/is_active": - return 955 + return 957 case "user/is_demo_user": - return 956 + return 958 case "user/is_physical_person": - return 957 + return 959 case "user/is_present_in_meeting_ids": - return 958 + return 960 case "user/last_email_sent": - return 959 + return 961 case "user/last_login": - return 960 + return 962 case "user/last_name": - return 961 + return 963 case "user/meeting_ids": - return 962 + return 964 case "user/meeting_user_ids": - return 963 + return 965 case "user/member_number": - return 964 + return 966 case "user/organization_id": - return 965 + return 967 case "user/organization_management_level": - return 966 + return 968 case "user/password": - return 967 + return 969 case "user/pronoun": - return 968 + return 970 case "user/saml_id": - return 969 + return 971 case "user/title": - return 970 + return 972 case "user/username": - return 971 + return 973 default: return -1 } diff --git a/datastore/dsmodels/models_generated.go b/datastore/dsmodels/models_generated.go index eed735a20..f25f5d605 100644 --- a/datastore/dsmodels/models_generated.go +++ b/datastore/dsmodels/models_generated.go @@ -4074,7 +4074,6 @@ type MeetingUser struct { Number string PersonalNoteIDs []int PollOptionIDs []int - PollVotedIDs []int RepresentedBallotIDs []int SpeakerIDs []int StructureLevelIDs []int @@ -4082,7 +4081,7 @@ type MeetingUser struct { VoteDelegatedToID dsfetch.Maybe[int] VoteDelegationsFromIDs []int VoteWeight decimal.Decimal - ActingBallotList []PollBallot + ActingBallotList []PollBallotUser AssignmentCandidateList []AssignmentCandidate ChatMessageList []ChatMessage EntitledAtPollList []Poll @@ -4095,8 +4094,7 @@ type MeetingUser struct { MotionWorkingGroupSpeakerList []MotionWorkingGroupSpeaker PersonalNoteList []PersonalNote PollOptionList []PollOption - PollVotedList []Poll - RepresentedBallotList []PollBallot + RepresentedBallotList []PollBallotUser SpeakerList []Speaker StructureLevelList []StructureLevel User *User @@ -4129,7 +4127,6 @@ func (b *meetingUserBuilder) lazy(ds *Fetch, idI any) *MeetingUser { ds.MeetingUser_Number(id).Lazy(&c.Number) ds.MeetingUser_PersonalNoteIDs(id).Lazy(&c.PersonalNoteIDs) ds.MeetingUser_PollOptionIDs(id).Lazy(&c.PollOptionIDs) - ds.MeetingUser_PollVotedIDs(id).Lazy(&c.PollVotedIDs) ds.MeetingUser_RepresentedBallotIDs(id).Lazy(&c.RepresentedBallotIDs) ds.MeetingUser_SpeakerIDs(id).Lazy(&c.SpeakerIDs) ds.MeetingUser_StructureLevelIDs(id).Lazy(&c.StructureLevelIDs) @@ -4145,15 +4142,15 @@ func (b *meetingUserBuilder) Preload(rel builderWrapperI) *meetingUserBuilder { return b } -func (b *meetingUserBuilder) ActingBallotList() *pollBallotBuilder { - return &pollBallotBuilder{ - builder: builder[pollBallotBuilder, *pollBallotBuilder, PollBallot, *PollBallot]{ +func (b *meetingUserBuilder) ActingBallotList() *pollBallotUserBuilder { + return &pollBallotUserBuilder{ + builder: builder[pollBallotUserBuilder, *pollBallotUserBuilder, PollBallotUser, *PollBallotUser]{ fetch: b.fetch, parent: b, idField: "ActingBallotIDs", relField: "ActingBallotList", many: true, - conv: func(p *PollBallot) PollBallot { return *p }, + conv: func(p *PollBallotUser) PollBallotUser { return *p }, }, } } @@ -4313,28 +4310,15 @@ func (b *meetingUserBuilder) PollOptionList() *pollOptionBuilder { } } -func (b *meetingUserBuilder) PollVotedList() *pollBuilder { - return &pollBuilder{ - builder: builder[pollBuilder, *pollBuilder, Poll, *Poll]{ - fetch: b.fetch, - parent: b, - idField: "PollVotedIDs", - relField: "PollVotedList", - many: true, - conv: func(p *Poll) Poll { return *p }, - }, - } -} - -func (b *meetingUserBuilder) RepresentedBallotList() *pollBallotBuilder { - return &pollBallotBuilder{ - builder: builder[pollBallotBuilder, *pollBallotBuilder, PollBallot, *PollBallot]{ +func (b *meetingUserBuilder) RepresentedBallotList() *pollBallotUserBuilder { + return &pollBallotUserBuilder{ + builder: builder[pollBallotUserBuilder, *pollBallotUserBuilder, PollBallotUser, *PollBallotUser]{ fetch: b.fetch, parent: b, idField: "RepresentedBallotIDs", relField: "RepresentedBallotList", many: true, - conv: func(p *PollBallot) PollBallot { return *p }, + conv: func(p *PollBallotUser) PollBallotUser { return *p }, }, } } @@ -6585,6 +6569,7 @@ type Poll struct { AllowVoteSplit bool Anonymized bool BallotIDs []int + BallotUserIDs []int ConfigID string ContentObjectID string EntitledGroupIDs []int @@ -6601,8 +6586,8 @@ type Poll struct { State string Title string Visibility string - VotedIDs []int BallotList []PollBallot + BallotUserList []PollBallotUser Config PollConfigUnion ContentObject PollContentObjectUnion EntitledGroupList []Group @@ -6611,7 +6596,6 @@ type Poll struct { Meeting *Meeting OptionList []PollOption ProjectionList []Projection - VotedList []MeetingUser } type pollBuilder struct { @@ -6625,6 +6609,7 @@ func (b *pollBuilder) lazy(ds *Fetch, idI any) *Poll { ds.Poll_AllowVoteSplit(id).Lazy(&c.AllowVoteSplit) ds.Poll_Anonymized(id).Lazy(&c.Anonymized) ds.Poll_BallotIDs(id).Lazy(&c.BallotIDs) + ds.Poll_BallotUserIDs(id).Lazy(&c.BallotUserIDs) ds.Poll_ConfigID(id).Lazy(&c.ConfigID) ds.Poll_ContentObjectID(id).Lazy(&c.ContentObjectID) ds.Poll_EntitledGroupIDs(id).Lazy(&c.EntitledGroupIDs) @@ -6641,7 +6626,6 @@ func (b *pollBuilder) lazy(ds *Fetch, idI any) *Poll { ds.Poll_State(id).Lazy(&c.State) ds.Poll_Title(id).Lazy(&c.Title) ds.Poll_Visibility(id).Lazy(&c.Visibility) - ds.Poll_VotedIDs(id).Lazy(&c.VotedIDs) return &c } @@ -6663,6 +6647,19 @@ func (b *pollBuilder) BallotList() *pollBallotBuilder { } } +func (b *pollBuilder) BallotUserList() *pollBallotUserBuilder { + return &pollBallotUserBuilder{ + builder: builder[pollBallotUserBuilder, *pollBallotUserBuilder, PollBallotUser, *PollBallotUser]{ + fetch: b.fetch, + parent: b, + idField: "BallotUserIDs", + relField: "BallotUserList", + many: true, + conv: func(p *PollBallotUser) PollBallotUser { return *p }, + }, + } +} + func (b *pollBuilder) Config() *pollConfigUnionBuilder { return &pollConfigUnionBuilder{ builder: builder[pollConfigUnionBuilder, *pollConfigUnionBuilder, PollConfigUnion, PollConfigUnion]{ @@ -6908,19 +6905,6 @@ func (b *pollBuilder) ProjectionList() *projectionBuilder { } } -func (b *pollBuilder) VotedList() *meetingUserBuilder { - return &meetingUserBuilder{ - builder: builder[meetingUserBuilder, *meetingUserBuilder, MeetingUser, *MeetingUser]{ - fetch: b.fetch, - parent: b, - idField: "VotedIDs", - relField: "VotedList", - many: true, - conv: func(p *MeetingUser) MeetingUser { return *p }, - }, - } -} - func (r *Fetch) Poll(ids ...int) *pollBuilder { return &pollBuilder{ builder: builder[pollBuilder, *pollBuilder, Poll, *Poll]{ @@ -6933,16 +6917,14 @@ func (r *Fetch) Poll(ids ...int) *pollBuilder { // PollBallot has all fields from poll_ballot. type PollBallot struct { - ActingMeetingUserID dsfetch.Maybe[int] - ID int - PollID int - RepresentedMeetingUserID dsfetch.Maybe[int] - Split bool - Value string - Weight decimal.Decimal - ActingMeetingUser *dsfetch.Maybe[MeetingUser] - Poll *Poll - RepresentedMeetingUser *dsfetch.Maybe[MeetingUser] + ID int + PollBallotUserID dsfetch.Maybe[int] + PollID int + Split bool + Value string + Weight decimal.Decimal + PollBallotUser *dsfetch.Maybe[PollBallotUser] + Poll *Poll } type pollBallotBuilder struct { @@ -6952,10 +6934,9 @@ type pollBallotBuilder struct { func (b *pollBallotBuilder) lazy(ds *Fetch, idI any) *PollBallot { id := idI.(int) c := PollBallot{} - ds.PollBallot_ActingMeetingUserID(id).Lazy(&c.ActingMeetingUserID) ds.PollBallot_ID(id).Lazy(&c.ID) + ds.PollBallot_PollBallotUserID(id).Lazy(&c.PollBallotUserID) ds.PollBallot_PollID(id).Lazy(&c.PollID) - ds.PollBallot_RepresentedMeetingUserID(id).Lazy(&c.RepresentedMeetingUserID) ds.PollBallot_Split(id).Lazy(&c.Split) ds.PollBallot_Value(id).Lazy(&c.Value) ds.PollBallot_Weight(id).Lazy(&c.Weight) @@ -6967,7 +6948,74 @@ func (b *pollBallotBuilder) Preload(rel builderWrapperI) *pollBallotBuilder { return b } -func (b *pollBallotBuilder) ActingMeetingUser() *meetingUserBuilder { +func (b *pollBallotBuilder) PollBallotUser() *pollBallotUserBuilder { + return &pollBallotUserBuilder{ + builder: builder[pollBallotUserBuilder, *pollBallotUserBuilder, PollBallotUser, *PollBallotUser]{ + fetch: b.fetch, + parent: b, + idField: "PollBallotUserID", + relField: "PollBallotUser", + conv: func(p *PollBallotUser) PollBallotUser { return *p }, + }, + } +} + +func (b *pollBallotBuilder) Poll() *pollBuilder { + return &pollBuilder{ + builder: builder[pollBuilder, *pollBuilder, Poll, *Poll]{ + fetch: b.fetch, + parent: b, + idField: "PollID", + relField: "Poll", + conv: func(p *Poll) Poll { return *p }, + }, + } +} + +func (r *Fetch) PollBallot(ids ...int) *pollBallotBuilder { + return &pollBallotBuilder{ + builder: builder[pollBallotBuilder, *pollBallotBuilder, PollBallot, *PollBallot]{ + ids: ids, + fetch: r, + conv: func(p *PollBallot) PollBallot { return *p }, + }, + } +} + +// PollBallotUser has all fields from poll_ballot_user. +type PollBallotUser struct { + ActingMeetingUserID int + ID int + PollBallotID dsfetch.Maybe[int] + PollID int + RepresentedMeetingUserID int + ActingMeetingUser *MeetingUser + PollBallot *dsfetch.Maybe[PollBallot] + Poll *Poll + RepresentedMeetingUser *MeetingUser +} + +type pollBallotUserBuilder struct { + builder[pollBallotUserBuilder, *pollBallotUserBuilder, PollBallotUser, *PollBallotUser] +} + +func (b *pollBallotUserBuilder) lazy(ds *Fetch, idI any) *PollBallotUser { + id := idI.(int) + c := PollBallotUser{} + ds.PollBallotUser_ActingMeetingUserID(id).Lazy(&c.ActingMeetingUserID) + ds.PollBallotUser_ID(id).Lazy(&c.ID) + ds.PollBallotUser_PollBallotID(id).Lazy(&c.PollBallotID) + ds.PollBallotUser_PollID(id).Lazy(&c.PollID) + ds.PollBallotUser_RepresentedMeetingUserID(id).Lazy(&c.RepresentedMeetingUserID) + return &c +} + +func (b *pollBallotUserBuilder) Preload(rel builderWrapperI) *pollBallotUserBuilder { + b.builder.Preload(rel) + return b +} + +func (b *pollBallotUserBuilder) ActingMeetingUser() *meetingUserBuilder { return &meetingUserBuilder{ builder: builder[meetingUserBuilder, *meetingUserBuilder, MeetingUser, *MeetingUser]{ fetch: b.fetch, @@ -6979,7 +7027,19 @@ func (b *pollBallotBuilder) ActingMeetingUser() *meetingUserBuilder { } } -func (b *pollBallotBuilder) Poll() *pollBuilder { +func (b *pollBallotUserBuilder) PollBallot() *pollBallotBuilder { + return &pollBallotBuilder{ + builder: builder[pollBallotBuilder, *pollBallotBuilder, PollBallot, *PollBallot]{ + fetch: b.fetch, + parent: b, + idField: "PollBallotID", + relField: "PollBallot", + conv: func(p *PollBallot) PollBallot { return *p }, + }, + } +} + +func (b *pollBallotUserBuilder) Poll() *pollBuilder { return &pollBuilder{ builder: builder[pollBuilder, *pollBuilder, Poll, *Poll]{ fetch: b.fetch, @@ -6991,7 +7051,7 @@ func (b *pollBallotBuilder) Poll() *pollBuilder { } } -func (b *pollBallotBuilder) RepresentedMeetingUser() *meetingUserBuilder { +func (b *pollBallotUserBuilder) RepresentedMeetingUser() *meetingUserBuilder { return &meetingUserBuilder{ builder: builder[meetingUserBuilder, *meetingUserBuilder, MeetingUser, *MeetingUser]{ fetch: b.fetch, @@ -7003,12 +7063,12 @@ func (b *pollBallotBuilder) RepresentedMeetingUser() *meetingUserBuilder { } } -func (r *Fetch) PollBallot(ids ...int) *pollBallotBuilder { - return &pollBallotBuilder{ - builder: builder[pollBallotBuilder, *pollBallotBuilder, PollBallot, *PollBallot]{ +func (r *Fetch) PollBallotUser(ids ...int) *pollBallotUserBuilder { + return &pollBallotUserBuilder{ + builder: builder[pollBallotUserBuilder, *pollBallotUserBuilder, PollBallotUser, *PollBallotUser]{ ids: ids, fetch: r, - conv: func(p *PollBallot) PollBallot { return *p }, + conv: func(p *PollBallotUser) PollBallotUser { return *p }, }, } } diff --git a/datastore/field_def.go b/datastore/field_def.go index b7b75d6a0..375bcd60b 100644 --- a/datastore/field_def.go +++ b/datastore/field_def.go @@ -19,7 +19,7 @@ var collectionFields = map[string][]string{ "meeting": {"admin_group_id", "agenda_enable_numbering", "agenda_item_creation", "agenda_item_ids", "agenda_new_items_default_visibility", "agenda_number_prefix", "agenda_numeral_system", "agenda_show_internal_items_on_projector", "agenda_show_subtitles", "agenda_show_topic_navigation_on_detail_view", "all_projection_ids", "anonymous_group_id", "applause_enable", "applause_max_amount", "applause_min_amount", "applause_particle_image_url", "applause_show_level", "applause_timeout", "applause_type", "assignment_candidate_ids", "assignment_ids", "assignment_poll_add_candidates_to_list_of_speakers", "assignment_poll_config_id", "assignment_poll_default_method", "assignments_export_preamble", "assignments_export_title", "chat_group_ids", "chat_message_ids", "committee_id", "conference_auto_connect", "conference_auto_connect_next_speakers", "conference_enable_helpdesk", "conference_los_restriction", "conference_open_microphone", "conference_open_video", "conference_show", "conference_stream_poster_url", "conference_stream_url", "custom_translations", "default_group_id", "default_meeting_for_committee_id", "default_projector_agenda_item_list_ids", "default_projector_amendment_ids", "default_projector_assignment_ids", "default_projector_assignment_poll_ids", "default_projector_countdown_ids", "default_projector_current_los_ids", "default_projector_list_of_speakers_ids", "default_projector_mediafile_ids", "default_projector_message_ids", "default_projector_motion_block_ids", "default_projector_motion_ids", "default_projector_motion_poll_ids", "default_projector_topic_ids", "default_projector_topic_poll_ids", "description", "enable_anonymous", "end_time", "export_csv_encoding", "export_csv_separator", "export_pdf_fontsize", "export_pdf_line_height", "export_pdf_page_margin_bottom", "export_pdf_page_margin_left", "export_pdf_page_margin_right", "export_pdf_page_margin_top", "export_pdf_pagenumber_alignment", "export_pdf_pagesize", "external_id", "font_bold_id", "font_bold_italic_id", "font_chyron_speaker_name_id", "font_italic_id", "font_monospace_id", "font_projector_h1_id", "font_projector_h2_id", "font_regular_id", "forwarded_motion_ids", "group_ids", "id", "imported_at", "is_active_in_organization_id", "is_archived_in_organization_id", "jitsi_domain", "jitsi_room_name", "jitsi_room_password", "language", "list_of_speakers_allow_multiple_speakers", "list_of_speakers_amount_last_on_projector", "list_of_speakers_amount_next_on_projector", "list_of_speakers_can_create_point_of_order_for_others", "list_of_speakers_can_set_contribution_self", "list_of_speakers_closing_disables_point_of_order", "list_of_speakers_countdown_id", "list_of_speakers_couple_countdown", "list_of_speakers_default_structure_level_time", "list_of_speakers_enable_interposed_question", "list_of_speakers_enable_point_of_order_categories", "list_of_speakers_enable_point_of_order_speakers", "list_of_speakers_enable_pro_contra_speech", "list_of_speakers_hide_contribution_count", "list_of_speakers_ids", "list_of_speakers_initially_closed", "list_of_speakers_intervention_time", "list_of_speakers_present_users_only", "list_of_speakers_show_amount_of_speakers_on_slide", "list_of_speakers_show_first_contribution", "list_of_speakers_speaker_note_for_everyone", "location", "locked_from_inside", "logo_pdf_ballot_paper_id", "logo_pdf_footer_l_id", "logo_pdf_footer_r_id", "logo_pdf_header_l_id", "logo_pdf_header_r_id", "logo_projector_header_id", "logo_projector_main_id", "logo_web_header_id", "mediafile_ids", "meeting_mediafile_ids", "meeting_user_ids", "motion_block_ids", "motion_category_ids", "motion_change_recommendation_ids", "motion_comment_ids", "motion_comment_section_ids", "motion_editor_ids", "motion_ids", "motion_poll_config_id", "motion_state_ids", "motion_submitter_ids", "motion_supporter_ids", "motion_workflow_ids", "motion_working_group_speaker_ids", "motions_amendments_enabled", "motions_amendments_in_main_list", "motions_amendments_multiple_paragraphs", "motions_amendments_of_amendments", "motions_amendments_prefix", "motions_amendments_text_mode", "motions_block_slide_columns", "motions_create_enable_additional_submitter_text", "motions_default_amendment_workflow_id", "motions_default_line_numbering", "motions_default_sorting", "motions_default_workflow_id", "motions_enable_editor", "motions_enable_origin_motion_display", "motions_enable_reason_on_projector", "motions_enable_recommendation_on_projector", "motions_enable_restricted_editor_for_manager", "motions_enable_restricted_editor_for_non_manager", "motions_enable_sidebox_on_projector", "motions_enable_text_on_projector", "motions_enable_working_group_speaker", "motions_export_follow_recommendation", "motions_export_preamble", "motions_export_submitter_recommendation", "motions_export_title", "motions_hide_metadata_background", "motions_line_length", "motions_number_min_digits", "motions_number_type", "motions_number_with_blank", "motions_origin_motion_toggle_default", "motions_preamble", "motions_reason_required", "motions_recommendation_text_mode", "motions_recommendations_by", "motions_show_referring_motions", "motions_show_sequential_number", "motions_supporters_min_amount", "name", "organization_tag_ids", "personal_note_ids", "point_of_order_category_ids", "poll_countdown_id", "poll_couple_countdown", "poll_default_allow_invalid", "poll_default_allow_vote_split", "poll_default_ids", "poll_default_live_voting_enabled", "poll_enable_max_votes_per_option", "poll_ids", "poll_projection_max_columns", "poll_projection_name_order_first", "present_user_ids", "projection_ids", "projector_countdown_default_time", "projector_countdown_ids", "projector_countdown_warning_time", "projector_ids", "projector_message_ids", "reference_projector_id", "relevant_history_entry_ids", "speaker_ids", "start_time", "structure_level_ids", "structure_level_list_of_speakers_ids", "tag_ids", "template_for_organization_id", "time_zone", "topic_ids", "topic_poll_config_id", "topic_poll_default_method", "user_ids", "users_allow_self_set_present", "users_email_body", "users_email_replyto", "users_email_sender", "users_email_subject", "users_enable_presence_view", "users_enable_vote_delegations", "users_enable_vote_weight", "users_forbid_delegator_as_submitter", "users_forbid_delegator_as_supporter", "users_forbid_delegator_in_list_of_speakers", "users_forbid_delegator_to_vote", "users_pdf_welcometext", "users_pdf_welcometitle", "users_pdf_wlan_encryption", "users_pdf_wlan_password", "users_pdf_wlan_ssid", "welcome_text", "welcome_title"}, "meeting_mediafile": {"access_group_ids", "attachment_ids", "id", "inherited_access_group_ids", "is_public", "list_of_speakers_id", "mediafile_id", "meeting_id", "projection_ids", "used_as_font_bold_in_meeting_id", "used_as_font_bold_italic_in_meeting_id", "used_as_font_chyron_speaker_name_in_meeting_id", "used_as_font_italic_in_meeting_id", "used_as_font_monospace_in_meeting_id", "used_as_font_projector_h1_in_meeting_id", "used_as_font_projector_h2_in_meeting_id", "used_as_font_regular_in_meeting_id", "used_as_logo_pdf_ballot_paper_in_meeting_id", "used_as_logo_pdf_footer_l_in_meeting_id", "used_as_logo_pdf_footer_r_in_meeting_id", "used_as_logo_pdf_header_l_in_meeting_id", "used_as_logo_pdf_header_r_in_meeting_id", "used_as_logo_projector_header_in_meeting_id", "used_as_logo_projector_main_in_meeting_id", "used_as_logo_web_header_in_meeting_id"}, "meeting_poll_default": {"allow_abstain", "allow_nota", "display_chart", "group_ids", "id", "meeting_id", "onehundred_percent_base", "sort_result_by_votes", "strike_out", "used_as_assignment_poll_config_in_meeting_id", "used_as_motion_poll_config_in_meeting_id", "used_as_topic_poll_config_in_meeting_id", "visibility"}, - "meeting_user": {"about_me", "acting_ballot_ids", "assignment_candidate_ids", "chat_message_ids", "comment", "entitled_at_poll_ids", "group_ids", "history_entry_ids", "id", "locked_out", "meeting_id", "motion_editor_ids", "motion_submitter_ids", "motion_supporter_ids", "motion_working_group_speaker_ids", "number", "personal_note_ids", "poll_option_ids", "poll_voted_ids", "represented_ballot_ids", "speaker_ids", "structure_level_ids", "user_id", "vote_delegated_to_id", "vote_delegations_from_ids", "vote_weight"}, + "meeting_user": {"about_me", "acting_ballot_ids", "assignment_candidate_ids", "chat_message_ids", "comment", "entitled_at_poll_ids", "group_ids", "history_entry_ids", "id", "locked_out", "meeting_id", "motion_editor_ids", "motion_submitter_ids", "motion_supporter_ids", "motion_working_group_speaker_ids", "number", "personal_note_ids", "poll_option_ids", "represented_ballot_ids", "speaker_ids", "structure_level_ids", "user_id", "vote_delegated_to_id", "vote_delegations_from_ids", "vote_weight"}, "motion": {"additional_submitter", "agenda_item_id", "all_derived_motion_ids", "all_origin_ids", "amendment_ids", "amendment_paragraphs", "attachment_meeting_mediafile_ids", "block_id", "category_id", "category_weight", "change_recommendation_ids", "comment_ids", "created", "derived_motion_ids", "diff_version", "editor_ids", "forwarded", "history_entry_ids", "id", "identical_motion_ids", "last_modified", "lead_motion_id", "list_of_speakers_id", "marked_forwarded", "meeting_id", "modified_final_version", "number", "number_value", "origin_id", "origin_meeting_id", "personal_note_ids", "poll_ids", "projection_ids", "reason", "recommendation_extension", "recommendation_extension_reference_ids", "recommendation_id", "referenced_in_motion_recommendation_extension_ids", "referenced_in_motion_state_extension_ids", "sequential_number", "sort_child_ids", "sort_parent_id", "sort_weight", "start_line_number", "state_extension", "state_extension_reference_ids", "state_id", "submitter_ids", "supporter_ids", "tag_ids", "text", "text_hash", "title", "workflow_timestamp", "working_group_speaker_ids"}, "motion_block": {"agenda_item_id", "id", "internal", "list_of_speakers_id", "meeting_id", "motion_ids", "projection_ids", "sequential_number", "title"}, "motion_category": {"child_ids", "id", "level", "meeting_id", "motion_ids", "name", "parent_id", "prefix", "sequential_number", "weight"}, @@ -36,8 +36,9 @@ var collectionFields = map[string][]string{ "organization_tag": {"color", "id", "name", "organization_id", "tagged_ids"}, "personal_note": {"content_object_id", "id", "meeting_id", "meeting_user_id", "note", "star"}, "point_of_order_category": {"id", "meeting_id", "rank", "speaker_ids", "text"}, - "poll": {"allow_invalid", "allow_vote_split", "anonymized", "ballot_ids", "config_id", "content_object_id", "entitled_group_ids", "entitled_meeting_user_ids", "history_entry_ids", "id", "live_voting_enabled", "meeting_id", "option_ids", "projection_ids", "published", "result", "sequential_number", "state", "title", "visibility", "voted_ids"}, - "poll_ballot": {"acting_meeting_user_id", "id", "poll_id", "represented_meeting_user_id", "split", "value", "weight"}, + "poll": {"allow_invalid", "allow_vote_split", "anonymized", "ballot_ids", "ballot_user_ids", "config_id", "content_object_id", "entitled_group_ids", "entitled_meeting_user_ids", "history_entry_ids", "id", "live_voting_enabled", "meeting_id", "option_ids", "projection_ids", "published", "result", "sequential_number", "state", "title", "visibility"}, + "poll_ballot": {"id", "poll_ballot_user_id", "poll_id", "split", "value", "weight"}, + "poll_ballot_user": {"acting_meeting_user_id", "id", "poll_ballot_id", "poll_id", "represented_meeting_user_id"}, "poll_config_approval": {"allow_abstain", "id", "onehundred_percent_base", "poll_id"}, "poll_config_rating_approval": {"allow_abstain", "id", "max_options_amount", "max_yes_amount", "min_options_amount", "onehundred_percent_base", "poll_id"}, "poll_config_rating_score": {"id", "max_options_amount", "max_vote_sum", "max_votes_per_option", "min_options_amount", "min_vote_sum", "onehundred_percent_base", "poll_id"}, diff --git a/datastore/pgtest/sql/schema_relational.sql b/datastore/pgtest/sql/schema_relational.sql index 88a4ea299..e70a1297e 100644 --- a/datastore/pgtest/sql/schema_relational.sql +++ b/datastore/pgtest/sql/schema_relational.sql @@ -1,7 +1,7 @@ -- schema_relational.sql for initial database setup OpenSlides -- Code generated. DO NOT EDIT. --- MODELS_YML_CHECKSUM = 'c8ed4f685e33d45999dd47ab4e04dc22' +-- MODELS_YML_CHECKSUM = '671a93e88ed17ae341b9432ae3091542' -- ENUM definitions @@ -2027,9 +2027,22 @@ CREATE TABLE poll_ballot_t ( value text, poll_id integer CONSTRAINT required_poll_ballot_poll_id NOT NULL, - acting_meeting_user_id integer, - represented_meeting_user_id integer, - CONSTRAINT unique_poll_ballot_poll_id_represented_meeting_user_id UNIQUE (poll_id, represented_meeting_user_id) + poll_ballot_user_id integer + CONSTRAINT unique_poll_ballot_poll_ballot_user_id UNIQUE +); + + + + +CREATE TABLE poll_ballot_user_t ( + id integer PRIMARY KEY GENERATED BY DEFAULT AS IDENTITY NOT NULL, + poll_id integer + CONSTRAINT required_poll_ballot_user_poll_id NOT NULL, + acting_meeting_user_id integer + CONSTRAINT required_poll_ballot_user_acting_meeting_user_id NOT NULL, + represented_meeting_user_id integer + CONSTRAINT required_poll_ballot_user_represented_meeting_user_id NOT NULL, + CONSTRAINT unique_poll_ballot_user_poll_id_represented_meeting_user_id UNIQUE (poll_id, represented_meeting_user_id) ); @@ -2766,22 +2779,6 @@ CREATE INDEX idx_gm_meeting_mediafile_attachment_ids_t_attachment_id_3c67b77 ON CREATE INDEX idx_gm_meeting_mediafile_attachment_ids_t_attachment_id_8abf47a ON gm_meeting_mediafile_attachment_ids_t (attachment_id_topic_id); CREATE INDEX idx_gm_meeting_mediafile_attachment_ids_t_attachment_id_66fb18e ON gm_meeting_mediafile_attachment_ids_t (attachment_id_assignment_id); -CREATE TABLE nm_meeting_user_poll_voted_ids_poll_t ( - meeting_user_id integer - CONSTRAINT required_nm_meeting_user_poll_voted_ids_poll_t_meeting_user_id NOT NULL - CONSTRAINT fk_nm_meeting_user_poll_voted_ids_poll_t_meeting_user_id44ef71d REFERENCES meeting_user_t (id) - ON DELETE CASCADE - INITIALLY DEFERRED, - poll_id integer - CONSTRAINT required_nm_meeting_user_poll_voted_ids_poll_t_poll_id NOT NULL - CONSTRAINT fk_nm_meeting_user_poll_voted_ids_poll_t_poll_id_poll_t_id REFERENCES poll_t (id) - ON DELETE CASCADE - INITIALLY DEFERRED, - CONSTRAINT pk_nm_meeting_user_poll_voted_ids_poll_t PRIMARY KEY (meeting_user_id, poll_id) -); -CREATE INDEX idx_nm_meeting_user_poll_voted_ids_poll_t_meeting_user_id ON nm_meeting_user_poll_voted_ids_poll_t (meeting_user_id); -CREATE INDEX idx_nm_meeting_user_poll_voted_ids_poll_t_poll_id ON nm_meeting_user_poll_voted_ids_poll_t (poll_id); - CREATE TABLE nm_meeting_user_entitled_at_poll_ids_poll_t ( meeting_user_id integer CONSTRAINT required_nm_meeting_user_entitled_at_poll_ids_poll_t_meef9cfab5 NOT NULL @@ -3192,10 +3189,9 @@ CREATE VIEW "meeting_user" AS SELECT *, (select array_agg(ms.id ORDER BY ms.id) from motion_submitter_t ms where ms.meeting_user_id = m.id) as motion_submitter_ids, (select array_agg(a.id ORDER BY a.id) from assignment_candidate_t a where a.meeting_user_id = m.id) as assignment_candidate_ids, (select array_agg(mu.id ORDER BY mu.id) from meeting_user_t mu where mu.vote_delegated_to_id = m.id) as vote_delegations_from_ids, -(select array_agg(n.poll_id ORDER BY n.poll_id) from nm_meeting_user_poll_voted_ids_poll_t n where n.meeting_user_id = m.id) as poll_voted_ids, (select array_agg(p.id ORDER BY p.id) from poll_option_t p where p.meeting_user_id = m.id) as poll_option_ids, -(select array_agg(p.id ORDER BY p.id) from poll_ballot_t p where p.acting_meeting_user_id = m.id) as acting_ballot_ids, -(select array_agg(p.id ORDER BY p.id) from poll_ballot_t p where p.represented_meeting_user_id = m.id) as represented_ballot_ids, +(select array_agg(p.id ORDER BY p.id) from poll_ballot_user_t p where p.acting_meeting_user_id = m.id) as acting_ballot_ids, +(select array_agg(p.id ORDER BY p.id) from poll_ballot_user_t p where p.represented_meeting_user_id = m.id) as represented_ballot_ids, (select array_agg(n.poll_id ORDER BY n.poll_id) from nm_meeting_user_entitled_at_poll_ids_poll_t n where n.meeting_user_id = m.id) as entitled_at_poll_ids, (select array_agg(c.id ORDER BY c.id) from chat_message_t c where c.meeting_user_id = m.id) as chat_message_ids, (select array_agg(n.group_id ORDER BY n.group_id) from nm_group_meeting_user_ids_meeting_user_t n where n.meeting_user_id = m.id) as group_ids, @@ -3318,7 +3314,7 @@ FROM point_of_order_category_t p; CREATE VIEW "poll" AS SELECT *, (select array_agg(po.id ORDER BY po.id) from poll_option_t po where po.poll_id = p.id) as option_ids, (select array_agg(pb.id ORDER BY pb.id) from poll_ballot_t pb where pb.poll_id = p.id) as ballot_ids, -(select array_agg(n.meeting_user_id ORDER BY n.meeting_user_id) from nm_meeting_user_poll_voted_ids_poll_t n where n.poll_id = p.id) as voted_ids, +(select array_agg(pb.id ORDER BY pb.id) from poll_ballot_user_t pb where pb.poll_id = p.id) as ballot_user_ids, (select array_agg(n.group_id ORDER BY n.group_id) from nm_group_poll_ids_poll_t n where n.poll_id = p.id) as entitled_group_ids, (select array_agg(n.meeting_user_id ORDER BY n.meeting_user_id) from nm_meeting_user_entitled_at_poll_ids_poll_t n where n.poll_id = p.id) as entitled_meeting_user_ids, (select array_agg(pt.id ORDER BY pt.id) from projection_t pt where pt.content_object_id_poll_id = p.id) as projection_ids, @@ -3329,6 +3325,11 @@ FROM poll_t p; CREATE VIEW "poll_ballot" AS SELECT * FROM poll_ballot_t p; +CREATE VIEW "poll_ballot_user" AS SELECT *, +(select pb.id from poll_ballot_t pb where pb.poll_ballot_user_id = p.id) as poll_ballot_id +FROM poll_ballot_user_t p; + + CREATE VIEW "poll_config_approval" AS SELECT *, (select p1.id from poll_t p1 where p1.config_id_poll_config_approval_id = p.id) as poll_id FROM poll_config_approval_t p; @@ -3740,10 +3741,15 @@ CREATE INDEX idx_poll_t_meeting_id ON poll_t (meeting_id); ALTER TABLE poll_ballot_t ADD CONSTRAINT fk_poll_ballot_t_poll_id_poll_t_id FOREIGN KEY(poll_id) REFERENCES poll_t(id) INITIALLY DEFERRED; CREATE INDEX idx_poll_ballot_t_poll_id ON poll_ballot_t (poll_id); -ALTER TABLE poll_ballot_t ADD CONSTRAINT fk_poll_ballot_t_acting_meeting_user_id_meeting_user_t_id FOREIGN KEY(acting_meeting_user_id) REFERENCES meeting_user_t(id) INITIALLY DEFERRED; -CREATE INDEX idx_poll_ballot_t_acting_meeting_user_id ON poll_ballot_t (acting_meeting_user_id); -ALTER TABLE poll_ballot_t ADD CONSTRAINT fk_poll_ballot_t_represented_meeting_user_id_meeting_user_t_id FOREIGN KEY(represented_meeting_user_id) REFERENCES meeting_user_t(id) INITIALLY DEFERRED; -CREATE INDEX idx_poll_ballot_t_represented_meeting_user_id ON poll_ballot_t (represented_meeting_user_id); +ALTER TABLE poll_ballot_t ADD CONSTRAINT fk_poll_ballot_t_poll_ballot_user_id_poll_ballot_user_t_id FOREIGN KEY(poll_ballot_user_id) REFERENCES poll_ballot_user_t(id) INITIALLY DEFERRED; +CREATE INDEX idx_poll_ballot_t_poll_ballot_user_id ON poll_ballot_t (poll_ballot_user_id); + +ALTER TABLE poll_ballot_user_t ADD CONSTRAINT fk_poll_ballot_user_t_poll_id_poll_t_id FOREIGN KEY(poll_id) REFERENCES poll_t(id) INITIALLY DEFERRED; +CREATE INDEX idx_poll_ballot_user_t_poll_id ON poll_ballot_user_t (poll_id); +ALTER TABLE poll_ballot_user_t ADD CONSTRAINT fk_poll_ballot_user_t_acting_meeting_user_id_meeting_user_t_id FOREIGN KEY(acting_meeting_user_id) REFERENCES meeting_user_t(id) INITIALLY DEFERRED; +CREATE INDEX idx_poll_ballot_user_t_acting_meeting_user_id ON poll_ballot_user_t (acting_meeting_user_id); +ALTER TABLE poll_ballot_user_t ADD CONSTRAINT fk_poll_ballot_user_t_represented_meeting_user_id_meetin7f0c82a FOREIGN KEY(represented_meeting_user_id) REFERENCES meeting_user_t(id) INITIALLY DEFERRED; +CREATE INDEX idx_poll_ballot_user_t_represented_meeting_user_id ON poll_ballot_user_t (represented_meeting_user_id); ALTER TABLE poll_option_t ADD CONSTRAINT fk_poll_option_t_poll_id_poll_t_id FOREIGN KEY(poll_id) REFERENCES poll_t(id) INITIALLY DEFERRED; CREATE INDEX idx_poll_option_t_poll_id ON poll_option_t (poll_id); @@ -4400,6 +4406,11 @@ CREATE TRIGGER tr_constant_poll_ballot_poll_id BEFORE UPDATE OF poll_id ON poll_ FOR EACH ROW EXECUTE FUNCTION prevent_updates('poll_ballot', 'poll_id'); +-- definition trigger prevent_updates for poll_ballot_user.poll_id +CREATE TRIGGER tr_constant_poll_ballot_user_poll_id BEFORE UPDATE OF poll_id ON poll_ballot_user_t +FOR EACH ROW EXECUTE FUNCTION prevent_updates('poll_ballot_user', 'poll_id'); + + -- definition trigger prevent_updates for projection.content_object_id CREATE TRIGGER tr_constant_projection_content_object_id BEFORE UPDATE OF content_object_id ON projection_t FOR EACH ROW EXECUTE FUNCTION prevent_updates('projection', 'content_object_id'); @@ -4848,11 +4859,6 @@ FOR EACH ROW EXECUTE FUNCTION log_modified_related_models('meeting', 'meeting_id CREATE TRIGGER tr_log_meeting_user_t_vote_delegated_to_id AFTER INSERT OR UPDATE OF vote_delegated_to_id OR DELETE ON meeting_user_t FOR EACH ROW EXECUTE FUNCTION log_modified_related_models('meeting_user', 'vote_delegated_to_id', 'vote_delegations_from_ids'); -CREATE TRIGGER tr_log_nm_meeting_user_poll_voted_ids_poll_t AFTER INSERT OR UPDATE OR DELETE ON nm_meeting_user_poll_voted_ids_poll_t -FOR EACH ROW EXECUTE FUNCTION log_modified_related_models('meeting_user','meeting_user_id','poll_voted_ids','poll','poll_id','voted_ids'); -CREATE CONSTRAINT TRIGGER notify_transaction_end AFTER INSERT OR UPDATE OR DELETE ON nm_meeting_user_poll_voted_ids_poll_t -DEFERRABLE INITIALLY DEFERRED FOR EACH ROW EXECUTE FUNCTION notify_transaction_end(); - CREATE TRIGGER tr_log_nm_meeting_user_entitled_at_poll_ids_poll_t AFTER INSERT OR UPDATE OR DELETE ON nm_meeting_user_entitled_at_poll_ids_poll_t FOR EACH ROW EXECUTE FUNCTION log_modified_related_models('meeting_user','meeting_user_id','entitled_at_poll_ids','poll','poll_id','entitled_meeting_user_ids'); CREATE CONSTRAINT TRIGGER notify_transaction_end AFTER INSERT OR UPDATE OR DELETE ON nm_meeting_user_entitled_at_poll_ids_poll_t @@ -5114,9 +5120,19 @@ DEFERRABLE INITIALLY DEFERRED FOR EACH ROW EXECUTE FUNCTION notify_transaction_e CREATE TRIGGER tr_log_poll_ballot_t_poll_id AFTER INSERT OR UPDATE OF poll_id OR DELETE ON poll_ballot_t FOR EACH ROW EXECUTE FUNCTION log_modified_related_models('poll', 'poll_id', 'ballot_ids'); -CREATE TRIGGER tr_log_poll_ballot_t_acting_meeting_user_id AFTER INSERT OR UPDATE OF acting_meeting_user_id OR DELETE ON poll_ballot_t +CREATE TRIGGER tr_log_poll_ballot_t_poll_ballot_user_id AFTER INSERT OR UPDATE OF poll_ballot_user_id OR DELETE ON poll_ballot_t +FOR EACH ROW EXECUTE FUNCTION log_modified_related_models('poll_ballot_user', 'poll_ballot_user_id', 'poll_ballot_id'); + +CREATE TRIGGER tr_log_poll_ballot_user AFTER INSERT OR UPDATE OR DELETE ON poll_ballot_user_t +FOR EACH ROW EXECUTE FUNCTION log_modified_models('poll_ballot_user'); +CREATE CONSTRAINT TRIGGER notify_transaction_end AFTER INSERT OR UPDATE OR DELETE ON poll_ballot_user_t +DEFERRABLE INITIALLY DEFERRED FOR EACH ROW EXECUTE FUNCTION notify_transaction_end(); + +CREATE TRIGGER tr_log_poll_ballot_user_t_poll_id AFTER INSERT OR UPDATE OF poll_id OR DELETE ON poll_ballot_user_t +FOR EACH ROW EXECUTE FUNCTION log_modified_related_models('poll', 'poll_id', 'ballot_user_ids'); +CREATE TRIGGER tr_log_poll_ballot_user_t_acting_meeting_user_id AFTER INSERT OR UPDATE OF acting_meeting_user_id OR DELETE ON poll_ballot_user_t FOR EACH ROW EXECUTE FUNCTION log_modified_related_models('meeting_user', 'acting_meeting_user_id', 'acting_ballot_ids'); -CREATE TRIGGER tr_log_poll_ballot_t_represented_meeting_user_id AFTER INSERT OR UPDATE OF represented_meeting_user_id OR DELETE ON poll_ballot_t +CREATE TRIGGER tr_log_poll_ballot_user_t_represented_meeting_user_id AFTER INSERT OR UPDATE OF represented_meeting_user_id OR DELETE ON poll_ballot_user_t FOR EACH ROW EXECUTE FUNCTION log_modified_related_models('meeting_user', 'represented_meeting_user_id', 'represented_ballot_ids'); CREATE TRIGGER tr_log_poll_config_approval AFTER INSERT OR UPDATE OR DELETE ON poll_config_approval_t @@ -5775,6 +5791,13 @@ FOR EACH ROW EXECUTE FUNCTION check_equals('poll', 'topic', 'content_object_id_t +CREATE CONSTRAINT TRIGGER equal_poll_id_on_poll_ballot_t_poll_ballot_user_id AFTER INSERT OR UPDATE OF poll_ballot_user_id ON poll_ballot_t INITIALLY DEFERRED +FOR EACH ROW EXECUTE FUNCTION check_equals('poll_ballot', 'poll_ballot_user', 'poll_ballot_user_id', 'poll_id', FALSE); +CREATE CONSTRAINT TRIGGER equal_poll_id_on_poll_ballot_user_t_poll_ballot_id AFTER INSERT ON poll_ballot_user_t INITIALLY DEFERRED +FOR EACH ROW EXECUTE FUNCTION check_equals('poll_ballot', 'poll_ballot_user', 'poll_ballot_user_id', 'poll_id', TRUE); + + + CREATE CONSTRAINT TRIGGER equal_meeting_id_on_projection_t_current_projector_id AFTER INSERT OR UPDATE OF current_projector_id ON projection_t INITIALLY DEFERRED FOR EACH ROW EXECUTE FUNCTION check_equals('projection', 'projector', 'current_projector_id', 'meeting_id', FALSE); CREATE CONSTRAINT TRIGGER equal_meeting_id_on_projector_t_current_projection_ids AFTER INSERT ON projector_t INITIALLY DEFERRED @@ -6149,10 +6172,9 @@ SQL nt:1r => meeting_user/motion_submitter_ids:-> motion_submitter/meeting_user_ SQL nt:1r => meeting_user/assignment_candidate_ids:-> assignment_candidate/meeting_user_id FIELD 1r:nt => meeting_user/vote_delegated_to_id:-> meeting_user/vote_delegations_from_ids SQL nt:1r => meeting_user/vote_delegations_from_ids:-> meeting_user/vote_delegated_to_id -SQL nt:nt => meeting_user/poll_voted_ids:-> poll/voted_ids SQL nr:1r => meeting_user/poll_option_ids:-> poll_option/meeting_user_id -SQL nt:1r => meeting_user/acting_ballot_ids:-> poll_ballot/acting_meeting_user_id -SQL nt:1r => meeting_user/represented_ballot_ids:-> poll_ballot/represented_meeting_user_id +SQL nt:1rR => meeting_user/acting_ballot_ids:-> poll_ballot_user/acting_meeting_user_id +SQL nt:1rR => meeting_user/represented_ballot_ids:-> poll_ballot_user/represented_meeting_user_id SQL nt:nt => meeting_user/entitled_at_poll_ids:-> poll/entitled_meeting_user_ids SQL nt:1r => meeting_user/chat_message_ids:-> chat_message/meeting_user_id SQL ntR:nt => meeting_user/group_ids:-> group/meeting_user_ids @@ -6274,7 +6296,7 @@ FIELD 1GrR:1tR,1tR,1tR,1tR,1tR => poll/config_id:-> poll_config_approval/poll_id SQL nt:1rR => poll/option_ids:-> poll_option/poll_id FIELD 1GrR:nt,nt,nt => poll/content_object_id:-> motion/poll_ids,assignment/poll_ids,topic/poll_ids SQL nr:1rR => poll/ballot_ids:-> poll_ballot/poll_id -SQL nt:nt => poll/voted_ids:-> meeting_user/poll_voted_ids +SQL nr:1rR => poll/ballot_user_ids:-> poll_ballot_user/poll_id SQL nt:nt => poll/entitled_group_ids:-> group/poll_ids SQL nt:nt => poll/entitled_meeting_user_ids:-> meeting_user/entitled_at_poll_ids SQL nt:1GrR => poll/projection_ids:-> projection/content_object_id @@ -6282,8 +6304,12 @@ FIELD 1rR:nr => poll/meeting_id:-> meeting/poll_ids SQL nt:1Gr => poll/history_entry_ids:-> history_entry/model_id FIELD 1rR:nr => poll_ballot/poll_id:-> poll/ballot_ids -FIELD 1r:nt => poll_ballot/acting_meeting_user_id:-> meeting_user/acting_ballot_ids -FIELD 1r:nt => poll_ballot/represented_meeting_user_id:-> meeting_user/represented_ballot_ids +FIELD 1r:1t => poll_ballot/poll_ballot_user_id:-> poll_ballot_user/poll_ballot_id + +FIELD 1rR:nr => poll_ballot_user/poll_id:-> poll/ballot_user_ids +SQL 1t:1r => poll_ballot_user/poll_ballot_id:-> poll_ballot/poll_ballot_user_id +FIELD 1rR:nt => poll_ballot_user/acting_meeting_user_id:-> meeting_user/acting_ballot_ids +FIELD 1rR:nt => poll_ballot_user/represented_meeting_user_id:-> meeting_user/represented_ballot_ids SQL 1tR:1GrR => poll_config_approval/poll_id:-> poll/config_id diff --git a/meta b/meta index 5e35d718d..b91bf4fc6 160000 --- a/meta +++ b/meta @@ -1 +1 @@ -Subproject commit 5e35d718d7ba3a0c0f3e78905473f10adf3b8a04 +Subproject commit b91bf4fc6975c43e08109df37208e6e3d683523e diff --git a/metagen/field_def.go b/metagen/field_def.go index acbddb47f..bfd487174 100644 --- a/metagen/field_def.go +++ b/metagen/field_def.go @@ -136,9 +136,12 @@ var RelationFields = map[string]string{ "personal_note/meeting_user_id": "meeting_user/personal_note_ids", "point_of_order_category/meeting_id": "meeting/point_of_order_category_ids", "poll/meeting_id": "meeting/poll_ids", - "poll_ballot/acting_meeting_user_id": "meeting_user/acting_ballot_ids", + "poll_ballot/poll_ballot_user_id": "poll_ballot_user/poll_ballot_id", "poll_ballot/poll_id": "poll/ballot_ids", - "poll_ballot/represented_meeting_user_id": "meeting_user/represented_ballot_ids", + "poll_ballot_user/acting_meeting_user_id": "meeting_user/acting_ballot_ids", + "poll_ballot_user/poll_ballot_id": "poll_ballot/poll_ballot_user_id", + "poll_ballot_user/poll_id": "poll/ballot_user_ids", + "poll_ballot_user/represented_meeting_user_id": "meeting_user/represented_ballot_ids", "poll_config_approval/poll_id": "poll/config_id", "poll_config_rating_approval/poll_id": "poll/config_id", "poll_config_rating_score/poll_id": "poll/config_id", @@ -290,7 +293,7 @@ var RelationListFields = map[string]string{ "meeting_mediafile/inherited_access_group_ids": "group/meeting_mediafile_inherited_access_group_ids", "meeting_mediafile/projection_ids": "projection/content_object_id", "meeting_poll_default/group_ids": "group/used_in_meeting_poll_default_ids", - "meeting_user/acting_ballot_ids": "poll_ballot/acting_meeting_user_id", + "meeting_user/acting_ballot_ids": "poll_ballot_user/acting_meeting_user_id", "meeting_user/assignment_candidate_ids": "assignment_candidate/meeting_user_id", "meeting_user/chat_message_ids": "chat_message/meeting_user_id", "meeting_user/entitled_at_poll_ids": "poll/entitled_meeting_user_ids", @@ -302,8 +305,7 @@ var RelationListFields = map[string]string{ "meeting_user/motion_working_group_speaker_ids": "motion_working_group_speaker/meeting_user_id", "meeting_user/personal_note_ids": "personal_note/meeting_user_id", "meeting_user/poll_option_ids": "poll_option/meeting_user_id", - "meeting_user/poll_voted_ids": "poll/voted_ids", - "meeting_user/represented_ballot_ids": "poll_ballot/represented_meeting_user_id", + "meeting_user/represented_ballot_ids": "poll_ballot_user/represented_meeting_user_id", "meeting_user/speaker_ids": "speaker/meeting_user_id", "meeting_user/structure_level_ids": "structure_level/meeting_user_ids", "meeting_user/vote_delegations_from_ids": "meeting_user/vote_delegated_to_id", @@ -352,12 +354,12 @@ var RelationListFields = map[string]string{ "organization/user_ids": "user/organization_id", "point_of_order_category/speaker_ids": "speaker/point_of_order_category_id", "poll/ballot_ids": "poll_ballot/poll_id", + "poll/ballot_user_ids": "poll_ballot_user/poll_id", "poll/entitled_group_ids": "group/poll_ids", "poll/entitled_meeting_user_ids": "meeting_user/entitled_at_poll_ids", "poll/history_entry_ids": "history_entry/model_id", "poll/option_ids": "poll_option/poll_id", "poll/projection_ids": "projection/content_object_id", - "poll/voted_ids": "meeting_user/poll_voted_ids", "projector/current_projection_ids": "projection/current_projector_id", "projector/history_projection_ids": "projection/history_projector_id", "projector/preview_projection_ids": "projection/preview_projector_id", @@ -852,7 +854,6 @@ var RestrictionModes = map[string]string{ "meeting_user/motion_working_group_speaker_ids": "A", "meeting_user/number": "A", "meeting_user/poll_option_ids": "A", - "meeting_user/poll_voted_ids": "A", "meeting_user/represented_ballot_ids": "A", "meeting_user/speaker_ids": "A", "meeting_user/structure_level_ids": "A", @@ -1111,6 +1112,7 @@ var RestrictionModes = map[string]string{ "poll/allow_vote_split": "A", "poll/anonymized": "A", "poll/ballot_ids": "A", + "poll/ballot_user_ids": "A", "poll/config_id": "A", "poll/content_object_id": "A", "poll/entitled_group_ids": "A", @@ -1127,16 +1129,21 @@ var RestrictionModes = map[string]string{ "poll/title": "A", "poll/visibility": "A", "poll/result": "B", - "poll/voted_ids": "B", // poll_ballot - "poll_ballot/id": "A", - "poll_ballot/poll_id": "A", - "poll_ballot/split": "B", - "poll_ballot/value": "B", - "poll_ballot/weight": "B", - "poll_ballot/acting_meeting_user_id": "C", - "poll_ballot/represented_meeting_user_id": "C", + "poll_ballot/id": "A", + "poll_ballot/poll_ballot_user_id": "A", + "poll_ballot/poll_id": "A", + "poll_ballot/split": "A", + "poll_ballot/value": "A", + "poll_ballot/weight": "A", + + // poll_ballot_user + "poll_ballot_user/acting_meeting_user_id": "A", + "poll_ballot_user/id": "A", + "poll_ballot_user/poll_ballot_id": "A", + "poll_ballot_user/poll_id": "A", + "poll_ballot_user/represented_meeting_user_id": "A", // poll_config_approval "poll_config_approval/allow_abstain": "A",