From 4de1e319758a0b94ff3073011700d7e722d598ef Mon Sep 17 00:00:00 2001 From: Joshua Sangmeister Date: Fri, 9 Feb 2024 14:23:43 +0100 Subject: [PATCH] Enhance new motion fields --- models.yml | 84 +++++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 74 insertions(+), 10 deletions(-) diff --git a/models.yml b/models.yml index b09a5528..3355e9a7 100644 --- a/models.yml +++ b/models.yml @@ -422,14 +422,14 @@ meeting_user: to: motion/supporter_meeting_user_ids equal_fields: meeting_id restriction_mode: A - editor_for_motion_ids: + motion_editor_ids: type: relation-list - to: motion/editor_id + to: motion_editor/meeting_user_id equal_fields: meeting_id restriction_mode: A - working_group_speaker_for_motion_ids: + motion_working_group_speaker_ids: type: relation-list - to: motion/working_group_speaker_id + to: motion_working_group_speaker/meeting_user_id equal_fields: meeting_id restriction_mode: A motion_submitter_ids: @@ -1565,6 +1565,16 @@ meeting: to: motion_submitter/meeting_id on_delete: CASCADE restriction_mode: B + motion_editor_ids: + type: relation-list + to: motion_editor/meeting_id + on_delete: CASCADE + restriction_mode: B + motion_working_group_speaker_ids: + type: relation-list + to: motion_working_group_speaker/meeting_id + on_delete: CASCADE + restriction_mode: B motion_change_recommendation_ids: type: relation-list to: motion_change_recommendation/meeting_id @@ -2446,14 +2456,14 @@ motion: to: meeting_user/supported_motion_ids equal_fields: meeting_id restriction_mode: C - editor_id: - type: relation - to: meeting_user/editor_for_motion_ids + editor_ids: + type: relation-list + to: motion_editor/motion_id equal_fields: meeting_id restriction_mode: B - working_group_speaker_id: - type: relation - to: meeting_user/working_group_speaker_for_motion_ids + working_group_speaker_ids: + type: relation-list + to: motion_working_group_speaker/motion_id equal_fields: meeting_id restriction_mode: B poll_ids: @@ -2555,6 +2565,60 @@ motion_submitter: restriction_mode: A constant: true +motion_editor: + id: + type: number + restriction_mode: A + constant: true + weight: + type: number + restriction_mode: A + meeting_user_id: + type: relation + to: meeting_user/motion_editor_ids + restriction_mode: A + required: true + motion_id: + type: relation + to: motion/editor_ids + equal_fields: meeting_id + restriction_mode: A + required: true + constant: true + meeting_id: + type: relation + to: meeting/motion_editor_ids + required: true + restriction_mode: A + constant: true + +motion_working_group_speaker: + id: + type: number + restriction_mode: A + constant: true + weight: + type: number + restriction_mode: A + meeting_user_id: + type: relation + to: meeting_user/motion_working_group_speaker_ids + restriction_mode: A + required: true + motion_id: + type: relation + to: motion/working_group_speaker_ids + equal_fields: meeting_id + restriction_mode: A + required: true + constant: true + meeting_id: + type: relation + to: meeting/motion_working_group_speaker_ids + required: true + restriction_mode: A + constant: true + motion_comment: id: type: number