OpenSlides/docs/models.yml
2021-07-09 15:46:40 +02:00

2247 lines
52 KiB
YAML

---
# Types:
# - Nativ datatypes: string, number, boolean, JSON
# - HTMLStrict: A string with HTML content.
# - HTMLPermissive: A string with HTML content (with video tags).
# - float: Numbers that are expected to be non-integer. Formatted as in rfc7159.
# - decimal(X): Decimal values represented as a string with X decimal places.
# At the moment we support only X == 6.
# - timestamp: Datetime as a unix timestamp. Why a number? This enables queries
# in the DB. And we do not need more precision than 1 second.
# - <T>[]: This indicates and arbitrary array of the given type. At the moment
# we support only some types. You can add JSON Schema properties for items
# using the extra property `items`
# - color: string that must match ^#[0-9a-f]{6}$
# Relations:
# - We have the following types: `relation`, `relation-list`, `generic-relation`
# and `generic-relation-list`.
# - Non-generic relations: The simple syntax for such a field
# `to: <collection>/<field>`. This is a reference to a collection. The reverse
# relation field in this collection is <field>. E. g. in a motion the field
# `category_id` links to one category where the field `motion_ids` contains the
# motion id. The simple notation for the field is `motion_category/motion_ids`.
# The reverse field has type `relation-list` and is related back to
# `motion/category_id`. The type indicates that there are many
# motion ids.
# - Generic relations: The difference to non-generic relations is that you have a
# list of possible fields, so `to` can either hold multiple collections (if the
# field name is the same):
# to:
# collections:
# - agenda_item
# - assignment
# - ...
# field: tag_ids
# Or `to` can be a list of collection fields:
# to:
# - motion/option_ids
# - user/option_$_ids
# - on_delete: This fields determines what should happen with the foreign model if
# this model gets deleted. Possible values are:
# - SET_NULL (default): delete the id from the foreign key
# - PROTECT: if the foreign key is not empty, throw an error instead of
# deleting the object
# - CASCADE: also delete all models in this foreign key
# Structured fields:
# - There are template fields (see autoupdate service interface) with a `$` as
# the placeholder.
# - The type `template` describes a structured field for the given model. If the
# property `replacement_collection` is given, it describes which model the
# replacement ids are belonging to (=> structured relation). If it is not given,
# the field is a structured tag. The property `fields` contains the definition
# for all the fields that come from the template field.
# JSON Schema Properties:
# - You can add JSON Schema properties to the fields like `enum`, `description`,
# `maxLength` and `minimum`
# Additional properties:
# - The property `read_only` describes a field that can not be changed by an action.
# - The property `default` describes the default value that is used for new objects.
# - The property `required` describes that this field can not be null or an empty
# string. If this field is given it must have some content.
# - The property `equal_fields` describes fields that must have the same value in
# the instance and the related instance.
organization:
id: number
name: string
description: HTMLStrict
# Settings (configurable by the client)
legal_notice: string
privacy_policy: string
login_text: string
theme: string
reset_password_verbose_errors: boolean
# Configuration (only for the server owner)
enable_electronic_voting:
type: boolean
committee_ids:
type: relation-list
to: committee/organization_id
resource_ids:
type: relation-list
to: resource/organization_id
organization_tag_ids:
type: relation-list
to: organization_tag/organization_id
user:
id: number
username:
type: string
required: true
title: string
first_name: string
last_name: string
is_active: boolean
is_physical_person:
type: boolean
default: true
password: string
default_password: string
can_change_own_password:
type: boolean
default: true
gender: string
email: string
default_number: string
default_structure_level: string
default_vote_weight:
type: decimal(6)
default: "1.000000"
last_email_send: timestamp
is_demo_user:
type: boolean
# Organization, meeting and committee
organization_management_level:
type: string
description: Hierarchical permission level for the whole organization.
enum:
- superadmin
- can_manage_organization
- can_manage_users
is_present_in_meeting_ids:
type: relation-list
to: meeting/present_user_ids
committee_ids:
type: relation-list
to: committee/user_ids
# committee specific permissions
committee_$_management_level:
type: template
replacement_collection: committee
description: Hierarchical permission level for the each committee organization.
fields:
type: string
enum:
- can_manage
# Meeting specific personal data
comment_$:
type: template
replacement_collection: meeting
fields: HTMLStrict
number_$:
type: template
replacement_collection: meeting
fields: string
structure_level_$:
type: template
replacement_collection: meeting
fields: string
about_me_$:
type: template
replacement_collection: meeting
fields: HTMLStrict
vote_weight_$:
type: template
replacement_collection: meeting
fields: decimal(6)
# All foreign keys are meeting-specific:
# - Keys are smaller (Space is in O(n^2) for n keys
# in the relation), so this saves storagespace
# - This makes quering things like this possible:
# "Give me all groups for User X in Meeting Y" without
# the need to get all groups and filter them for the meeting
group_$_ids:
type: template
replacement_collection: meeting
fields:
type: relation-list
to: group/user_ids
speaker_$_ids:
type: template
replacement_collection: meeting
fields:
type: relation-list
to: speaker/user_id
personal_note_$_ids:
type: template
replacement_collection: meeting
fields:
type: relation-list
to: personal_note/user_id
on_delete: CASCADE
supported_motion_$_ids:
type: template
replacement_collection: meeting
fields:
type: relation-list
to: motion/supporter_ids
submitted_motion_$_ids:
type: template
replacement_collection: meeting
fields:
type: relation-list
to: motion_submitter/user_id
poll_voted_$_ids:
type: template
replacement_collection: meeting
fields:
type: relation-list
to: poll/voted_ids
option_$_ids:
type: template
replacement_collection: meeting
fields:
type: relation-list
to: option/content_object_id
vote_$_ids:
type: template
replacement_collection: meeting
fields:
type: relation-list
to: vote/user_id
vote_delegated_vote_$_ids:
type: template
replacement_collection: meeting
fields:
type: relation-list
to: vote/delegated_user_id
assignment_candidate_$_ids:
type: template
replacement_collection: meeting
fields:
type: relation-list
to: assignment_candidate/user_id
projection_$_ids:
type: template
replacement_collection: meeting
fields:
type: relation-list
to: projection/content_object_id
vote_delegated_$_to_id:
type: template
replacement_collection: meeting
fields:
type: relation
to: user/vote_delegations_$_from_ids
vote_delegations_$_from_ids:
type: template
replacement_collection: meeting
fields:
type: relation-list
to: user/vote_delegated_$_to_id
meeting_ids:
type: number[]
description: Calculated. All ids from group_$_ids as integers.
read_only: true
# New: Resource
# Resources are organsation wide "mediafiles", like logos for the organisatio or
# organization-wide fonts. Therefore, no permission checks are done and the user
# must not be logged in to retrieve files. A resource has a token, e.g. `web_header`
# or `pdf_font_italic`, so the client knowns, where to put the resource.
resource:
id: number
token: string
filesize: number
mimetype: string
organization_id:
type: relation
to: organization/resource_ids
organization_tag:
id: number
name:
type: string
required: True
color:
type: color
required: True
tagged_ids:
type: generic-relation-list
to:
collections:
- committee
- meeting
field: organization_tag_ids
organization_id:
type: relation
to: organization/organization_tag_ids
committee:
id: number
name:
type: string
required: true
description: HTMLStrict
meeting_ids:
type: relation-list
to: meeting/committee_id
on_delete: PROTECT
template_meeting_id:
type: relation
to: meeting/template_for_committee_id
default_meeting_id:
type: relation
to: meeting/default_meeting_for_committee_id
user_ids:
type: relation-list
to: user/committee_ids
forward_to_committee_ids:
type: relation-list
to: committee/receive_forwardings_from_committee_ids
receive_forwardings_from_committee_ids:
type: relation-list
to: committee/forward_to_committee_ids
organization_tag_ids:
type: relation-list
to: organization_tag/tagged_ids
organization_id:
type: relation
to: organization/committee_ids
required: true
meeting:
id: number
welcome_title:
type: string
default: Welcome to OpenSlides
welcome_text:
type: HTMLPermissive
default: Space for your welcome text.
# General
name:
type: string
maxLength: 100
default: OpenSlides
description:
type: string
maxLength: 100
default: Presentation and assembly system
location: string
start_time: timestamp
end_time: timestamp
imported_at: timestamp
# Configuration (only for the server owner)
jitsi_domain:
type: string
jitsi_room_name:
type: string
jitsi_room_password:
type: string
enable_chat:
type: boolean
# System
url_name:
type: string
description: For unique urls.
template_for_committee_id:
type: relation
to: committee/template_meeting_id
enable_anonymous:
type: boolean
default: False
custom_translations: JSON
# Jitsi/Livestream settings
conference_show:
type: boolean
default: False
conference_auto_connect:
type: boolean
default: False
conference_los_restriction:
type: boolean
default: False
conference_stream_url: string
conference_stream_poster_url: string
conference_open_microphone:
type: boolean
default: False
conference_open_video:
type: boolean
default: False
conference_auto_connect_next_speakers:
type: number
default: 0
conference_enable_helpdesk:
type: boolean
default: False
applause_enable:
type: boolean
default: False
applause_type:
type: string
enum:
- applause-type-bar
- applause-type-particles
default: applause-type-bar
applause_show_level:
type: boolean
default: False
applause_min_amount:
type: number
default: 1
minimum: 0
applause_max_amount:
type: number
default: 0
minimum: 0
applause_timeout:
type: number
default: 5
minimum: 0
applause_particle_image_url:
type: string
# Projector countdown
projector_countdown_default_time:
type: number
default: 60
required: true
projector_countdown_warning_time:
type: number
minimum: 0
default: 0
required: true
# Exports
export_csv_encoding:
type: string
enum:
- utf-8
- iso-8859-15
default: utf-8
export_csv_separator:
type: string
default: ","
export_pdf_pagenumber_alignment:
type: string
enum:
- left
- right
- center
default: center
export_pdf_fontsize:
type: number
enum:
- 10
- 11
- 12
default: 10
export_pdf_pagesize:
type: string
enum:
- A4
- A5
default: A4
# Agenda
agenda_show_subtitles:
type: boolean
default: False
agenda_enable_numbering:
type: boolean
default: True
agenda_number_prefix:
type: string
maxLength: 20
agenda_numeral_system:
type: string
enum:
- arabic
- roman
default: arabic
agenda_item_creation:
type: string
enum:
- always
- never
- default_yes
- default_no
default: default_yes
agenda_new_items_default_visibility:
type: string
enum:
- common
- internal
- hidden
default: internal
agenda_show_internal_items_on_projector:
type: boolean
default: True
# List of speakers
list_of_speakers_amount_last_on_projector:
type: number
minimum: 0
default: 0
list_of_speakers_amount_next_on_projector:
type: number
default: -1
list_of_speakers_couple_countdown:
type: boolean
default: True
list_of_speakers_show_amount_of_speakers_on_slide:
type: boolean
default: True
list_of_speakers_present_users_only:
type: boolean
default: False
list_of_speakers_show_first_contribution:
type: boolean
default: False
list_of_speakers_enable_point_of_order_speakers:
type: boolean
default: False
list_of_speakers_enable_pro_contra_speech:
type: boolean
default: False
list_of_speakers_can_set_contribution_self:
type: boolean
default: False
list_of_speakers_speaker_note_for_everyone:
type: boolean
default: False
list_of_speakers_initially_closed:
type: boolean
default: False
# Motions
motions_default_workflow_id:
type: relation
to: motion_workflow/default_workflow_meeting_id
required: true
motions_default_amendment_workflow_id:
type: relation
to: motion_workflow/default_amendment_workflow_meeting_id
required: true
motions_default_statute_amendment_workflow_id:
type: relation
to: motion_workflow/default_statute_amendment_workflow_meeting_id
required: true
motions_preamble:
type: string
default: "The assembly may decide"
motions_default_line_numbering:
type: string
enum:
- outside
- inline
- none
default: outside
motions_line_length:
type: number
minimum: 40
default: 85
motions_reason_required:
type: boolean
default: False
motions_enable_text_on_projector:
type: boolean
default: True
motions_enable_reason_on_projector:
type: boolean
default: True
motions_enable_sidebox_on_projector:
type: boolean
default: False
motions_enable_recommendation_on_projector:
type: boolean
default: True
motions_show_referring_motions:
type: boolean
default: True
motions_show_sequential_number:
type: boolean
default: True
motions_recommendations_by:
type: string
motions_statute_recommendations_by: string
motions_recommendation_text_mode:
type: string
enum:
- original
- changed
- diff
- agreed
default: diff
motions_default_sorting:
type: string
default: identifier
motions_number_type:
type: string
enum:
- per_category
- serially_numbered
- manually
default: per_category
motions_number_min_digits:
type: number
default: 1
motions_number_with_blank:
type: boolean
default: False
motions_statutes_enabled:
type: boolean
default: False
motions_amendments_enabled:
type: boolean
default: False
motions_amendments_in_main_list:
type: boolean
default: True
motions_amendments_of_amendments:
type: boolean
default: False
motions_amendments_prefix:
type: string
motions_amendments_text_mode:
type: string
enum:
- freestyle
- fulltext
- paragraph
default: paragraph
motions_amendments_multiple_paragraphs:
type: boolean
default: True
motions_supporters_min_amount:
type: number
minimum: 0
default: 0
motions_export_title:
type: string
default: Motions
motions_export_preamble: string
motions_export_submitter_recommendation:
type: boolean
default: False
motions_export_follow_recommendation:
type: boolean
default: False
# Motion poll
motion_poll_ballot_paper_selection:
type: string
enum:
- NUMBER_OF_DELEGATES
- NUMBER_OF_ALL_PARTICIPANTS
- CUSTOM_NUMBER
default: CUSTOM_NUMBER
motion_poll_ballot_paper_number: number
motion_poll_default_type:
type: string
default: analog
motion_poll_default_100_percent_base:
type: string
default: YNA
motion_poll_default_majority_method: string
motion_poll_default_group_ids:
type: relation-list
to: group/used_as_motion_poll_default_id
# Users
users_sort_by:
type: string
enum:
- first_name
- last_name
- number
default: first_name
users_enable_presence_view:
type: boolean
default: False
users_enable_vote_weight:
type: boolean
default: False
users_allow_self_set_present:
type: boolean
default: False
users_pdf_welcometitle:
type: string
default: Welcome to OpenSlides
users_pdf_welcometext:
type: string
default: [Place for your welcome and help text.]
users_pdf_url:
type: string
default: http://example.com:8000
users_pdf_wlan_ssid: string
users_pdf_wlan_password: string
users_pdf_wlan_encryption:
type: string
enum:
- ""
- WEP
- WPA
- nopass
users_email_sender:
type: string
default: OpenSlides
users_email_replyto: string
users_email_subject:
type: string
default: OpenSlides access data
users_email_body: string
# Assignments
assignments_export_title:
type: string
default: Elections
assignments_export_preamble:
type: string
# Assignment polls
assignment_poll_ballot_paper_selection:
type: string
enum:
- NUMBER_OF_DELEGATES
- NUMBER_OF_ALL_PARTICIPANTS
- CUSTOM_NUMBER
default: CUSTOM_NUMBER
assignment_poll_ballot_paper_number:
type: number
default: 8
assignment_poll_add_candidates_to_list_of_speakers:
type: boolean
default: True
assignment_poll_sort_poll_result_by_votes:
type: boolean
default: True
assignment_poll_default_type:
type: string
default: analog
assignment_poll_default_method: string
assignment_poll_default_100_percent_base:
type: string
default: YNA
assignment_poll_default_majority_method: string
assignment_poll_default_group_ids:
type: relation-list
to: group/used_as_assignment_poll_default_id
# Polls
poll_ballot_paper_selection:
type: string
enum:
- NUMBER_OF_DELEGATES
- NUMBER_OF_ALL_PARTICIPANTS
- CUSTOM_NUMBER
poll_ballot_paper_number: number
poll_sort_poll_result_by_votes: boolean
poll_default_type:
type: string
default: analog
poll_default_method: string
poll_default_100_percent_base:
type: string
default: YNA
poll_default_majority_method: string
poll_default_group_ids:
type: relation-list
to: group/used_as_poll_default_id
poll_couple_countdown:
type: boolean
default: True
# Relations
projector_ids:
type: relation-list
to: projector/meeting_id
on_delete: CASCADE
all_projection_ids:
type: relation-list
to: projection/meeting_id
on_delete: CASCADE
projector_message_ids:
type: relation-list
to: projector_message/meeting_id
on_delete: CASCADE
projector_countdown_ids:
type: relation-list
to: projector_countdown/meeting_id
on_delete: CASCADE
tag_ids:
type: relation-list
to: tag/meeting_id
on_delete: CASCADE
agenda_item_ids:
type: relation-list
to: agenda_item/meeting_id
on_delete: CASCADE
list_of_speakers_ids:
type: relation-list
to: list_of_speakers/meeting_id
on_delete: CASCADE
speaker_ids:
type: relation-list
to: speaker/meeting_id
on_delete: CASCADE
topic_ids:
type: relation-list
to: topic/meeting_id
on_delete: CASCADE
group_ids:
type: relation-list
to: group/meeting_id
on_delete: CASCADE
mediafile_ids:
type: relation-list
to: mediafile/meeting_id
on_delete: CASCADE
motion_ids:
type: relation-list
to: motion/meeting_id
on_delete: CASCADE
motion_comment_section_ids:
type: relation-list
to: motion_comment_section/meeting_id
on_delete: CASCADE
motion_category_ids:
type: relation-list
to: motion_category/meeting_id
on_delete: CASCADE
motion_block_ids:
type: relation-list
to: motion_block/meeting_id
on_delete: CASCADE
motion_workflow_ids:
type: relation-list
to: motion_workflow/meeting_id
on_delete: CASCADE
motion_statute_paragraph_ids:
type: relation-list
to: motion_statute_paragraph/meeting_id
on_delete: CASCADE
motion_comment_ids:
type: relation-list
to: motion_comment/meeting_id
on_delete: CASCADE
motion_submitter_ids:
type: relation-list
to: motion_submitter/meeting_id
on_delete: CASCADE
motion_change_recommendation_ids:
type: relation-list
to: motion_change_recommendation/meeting_id
on_delete: CASCADE
motion_state_ids:
type: relation-list
to: motion_state/meeting_id
on_delete: CASCADE
poll_ids:
type: relation-list
to: poll/meeting_id
on_delete: CASCADE
option_ids:
type: relation-list
to: option/meeting_id
on_delete: CASCADE
vote_ids:
type: relation-list
to: vote/meeting_id
on_delete: CASCADE
assignment_ids:
type: relation-list
to: assignment/meeting_id
on_delete: CASCADE
assignment_candidate_ids:
type: relation-list
to: assignment_candidate/meeting_id
on_delete: CASCADE
personal_note_ids:
type: relation-list
to: personal_note/meeting_id
on_delete: CASCADE
chat_group_ids:
type: relation-list
to: chat_group/meeting_id
on_delete: CASCADE
# Logos and Fonts
logo_$_id:
type: template
fields:
type: relation
to: mediafile/used_as_logo_$_in_meeting_id
font_$_id:
type: template
fields:
type: relation
to: mediafile/used_as_font_$_in_meeting_id
# The client can define these resources. There is no need
# to have whitelist/blacklist on the server. The places must
# be checked: They must match `[a-z]([a-z_]*[a-z])?` and must
# not be longer than 32 characters.
# Other relations
committee_id:
type: relation
to: committee/meeting_ids
required: true
default_meeting_for_committee_id:
type: relation
to: committee/default_meeting_id
organization_tag_ids:
type: relation-list
to: organization_tag/tagged_ids
present_user_ids:
type: relation-list
to: user/is_present_in_meeting_ids
user_ids:
type: number[]
description: Calculated. All user ids from all users assigned to groups of this meeting.
read_only: true
reference_projector_id:
type: relation
to: projector/used_as_reference_projector_meeting_id
required: true
list_of_speakers_countdown_id:
type: relation
to: projector_countdown/used_as_list_of_speaker_countdown_meeting_id
poll_countdown_id:
type: relation
to: projector_countdown/used_as_poll_countdown_meeting_id
default_projector_$_id:
type: template
fields:
type: relation
to: projector/used_as_default_$_in_meeting_id
# Available template field replacements:
# - agenda_all_items
# - topics
# - list_of_speakers
# - current_list_of_speakers
# - motion
# - amendment
# - motion_block
# - assignment
# - user
# - mediafile
# - projector_message
# - projector_countdowns
# - assignment_poll
# - motion_poll
# - poll
projection_ids:
type: relation-list
to: projection/content_object_id
default_group_id:
type: relation
to: group/default_group_for_meeting_id
required: true
admin_group_id:
type: relation
to: group/admin_group_for_meeting_id
group:
id: number
name:
type: string
required: true
permissions:
type: string[]
items:
enum:
- agenda_item.can_manage
- agenda_item.can_see
- agenda_item.can_see_internal
- assignment.can_manage
- assignment.can_nominate_other
- assignment.can_nominate_self
- assignment.can_see
- chat.can_manage
- list_of_speakers.can_be_speaker
- list_of_speakers.can_manage
- list_of_speakers.can_see
- mediafile.can_manage
- mediafile.can_see
- meeting.can_manage_logos_and_fonts
- meeting.can_manage_settings
- meeting.can_see_autopilot
- meeting.can_see_frontpage
- meeting.can_see_history
- meeting.can_see_livestream
- motion.can_create
- motion.can_create_amendments
- motion.can_manage
- motion.can_manage_metadata
- motion.can_manage_polls
- motion.can_see
- motion.can_see_internal
- motion.can_support
- poll.can_manage
- projector.can_manage
- projector.can_see
- tag.can_manage
- user.can_manage
- user.can_see
- user.can_see_extra_data
user_ids:
type: relation-list
to: user/group_$_ids
default_group_for_meeting_id:
type: relation
to: meeting/default_group_id
on_delete: PROTECT
admin_group_for_meeting_id:
type: relation
to: meeting/admin_group_id
on_delete: PROTECT
mediafile_access_group_ids:
type: relation-list
to: mediafile/access_group_ids
equal_fields: meeting_id
mediafile_inherited_access_group_ids:
type: relation-list
to: mediafile/inherited_access_group_ids
description: Calculated field.
read_only: true
read_comment_section_ids:
type: relation-list
to: motion_comment_section/read_group_ids
equal_fields: meeting_id
write_comment_section_ids:
type: relation-list
to: motion_comment_section/write_group_ids
equal_fields: meeting_id
read_chat_group_ids:
type: relation-list
to: chat_group/read_group_ids
equal_fields: meeting_id
write_chat_group_ids:
type: relation-list
to: chat_group/write_group_ids
equal_fields: meeting_id
poll_ids:
type: relation-list
to: poll/entitled_group_ids
equal_fields: meeting_id
used_as_motion_poll_default_id:
type: relation
to: meeting/motion_poll_default_group_ids
used_as_assignment_poll_default_id:
type: relation
to: meeting/assignment_poll_default_group_ids
used_as_poll_default_id:
type: relation
to: meeting/poll_default_group_ids
meeting_id:
type: relation
to: meeting/group_ids
required: true
personal_note:
id: number
note: HTMLStrict
star: boolean
user_id:
type: relation
to: user/personal_note_$_ids
content_object_id:
type: generic-relation
to:
collections:
- motion
field: personal_note_ids
equal_fields: meeting_id
meeting_id:
type: relation
to: meeting/personal_note_ids
required: true
tag:
id: number
name:
type: string
required: true
tagged_ids:
type: generic-relation-list
to:
collections:
- agenda_item
- assignment
- motion
- topic
field: tag_ids
equal_fields: meeting_id
meeting_id:
type: relation
to: meeting/tag_ids
required: true
agenda_item:
id: number
item_number: string
comment: string
closed:
type: boolean
default: false
type:
type: string
enum:
- common
- internal
- hidden
default: common
duration:
type: number
description: Given in seconds
minimum: 0
is_internal:
type: boolean
description: Calculated by the server
read_only: true
is_hidden:
type: boolean
description: Calculated by the server
read_only: true
level:
type: number
description: Calculated by the server
read_only: true
weight:
type: number
default: 10000
content_object_id:
type: generic-relation
to:
collections:
- motion
- motion_block
- assignment
- topic
field: agenda_item_id
required: true
equal_fields: meeting_id
parent_id:
type: relation
to: agenda_item/child_ids
equal_fields: meeting_id
child_ids:
type: relation-list
to: agenda_item/parent_id
equal_fields: meeting_id
tag_ids:
type: relation-list
to: tag/tagged_ids
equal_fields: meeting_id
projection_ids:
type: relation-list
to: projection/content_object_id
equal_fields: meeting_id
meeting_id:
type: relation
to: meeting/agenda_item_ids
required: true
list_of_speakers:
id: number
closed:
type: boolean
default: false
content_object_id:
type: generic-relation
to:
collections:
- motion
- motion_block
- assignment
- topic
- mediafile
field: list_of_speakers_id
required: true
equal_fields: meeting_id
speaker_ids:
type: relation-list
to: speaker/list_of_speakers_id
on_delete: CASCADE
equal_fields: meeting_id
projection_ids:
type: relation-list
to: projection/content_object_id
equal_fields: meeting_id
meeting_id:
type: relation
to: meeting/list_of_speakers_ids
required: true
speaker:
id: number
begin_time:
type: timestamp
read_only: true
end_time:
type: timestamp
read_only: true
weight:
type: number
default: 10000
speech_state:
type: string
enum:
- contribution
- pro
- contra
note:
type: string
maxLength: 250
point_of_order: boolean
list_of_speakers_id:
type: relation
to: list_of_speakers/speaker_ids
required: true
equal_fields: meeting_id
user_id:
type: relation
to: user/speaker_$_ids
required: true
equal_fields: meeting_id
meeting_id:
type: relation
to: meeting/speaker_ids
required: true
topic:
id: number
title:
type: string
required: true
text: HTMLPermissive
attachment_ids:
type: relation-list
to: mediafile/attachment_ids
equal_fields: meeting_id
agenda_item_id:
type: relation
to: agenda_item/content_object_id
required: true
on_delete: CASCADE
equal_fields: meeting_id
list_of_speakers_id:
type: relation
to: list_of_speakers/content_object_id
required: true
on_delete: CASCADE
equal_fields: meeting_id
option_ids:
type: relation-list
to: option/content_object_id
on_delete: CASCADE
equal_fields: meeting_id
tag_ids:
type: relation-list
to: tag/tagged_ids
equal_fields: meeting_id
projection_ids:
type: relation-list
to: projection/content_object_id
equal_fields: meeting_id
meeting_id:
type: relation
to: meeting/topic_ids
required: true
motion:
id: number
number: string
number_value:
type: number
description: The number value of this motion. This number is auto-generated and read-only.
read_only: true
sequential_number:
type: number
description: The (positive) serial number of this motion. This number is auto-generated and read-only.
read_only: true
title:
type: string
required: true
text: HTMLStrict
amendment_paragraph_$:
type: template
fields: HTMLStrict
modified_final_version: HTMLStrict
reason: HTMLStrict
category_weight:
type: number
default: 10000
state_extension: string
recommendation_extension: string
sort_weight:
type: number
default: 10000
created:
type: timestamp
read_only: true
last_modified:
type: timestamp
read_only: true
lead_motion_id:
type: relation
to: motion/amendment_ids
equal_fields: meeting_id
amendment_ids:
type: relation-list
to: motion/lead_motion_id
equal_fields: meeting_id
sort_parent_id:
type: relation
to: motion/sort_child_ids
equal_fields: meeting_id
sort_child_ids:
type: relation-list
to: motion/sort_parent_id
equal_fields: meeting_id
origin_id:
type: relation
to: motion/derived_motion_ids # Note: The related motions may not be in the same meeting
derived_motion_ids:
type: relation-list
to: motion/origin_id # Note: The related motions may not be in the same meeting
all_origin_ids: number[] # Calculated: All parents (origin_id), grandparents, etc. of this motion.
all_derived_motion_ids: number[] # Calculated: All children (derived_motion_ids), grandchildren, etc. of this motion.
state_id:
type: relation
to: motion_state/motion_ids
required: true
equal_fields: meeting_id
recommendation_id:
type: relation
to: motion_state/motion_recommendation_ids
equal_fields: meeting_id
recommendation_extension_reference_ids:
type: generic-relation-list
to:
collections:
- motion
field: referenced_in_motion_recommendation_extension_ids
equal_fields: meeting_id
referenced_in_motion_recommendation_extension_ids:
type: relation-list
to: motion/recommendation_extension_reference_ids
equal_fields: meeting_id
category_id:
type: relation
to: motion_category/motion_ids
equal_fields: meeting_id
block_id:
type: relation
to: motion_block/motion_ids
equal_fields: meeting_id
submitter_ids:
type: relation-list
to: motion_submitter/motion_id
on_delete: CASCADE
equal_fields: meeting_id
supporter_ids:
type: relation-list
to: user/supported_motion_$_ids
poll_ids:
type: relation-list
to: poll/content_object_id
on_delete: CASCADE
equal_fields: meeting_id
option_ids:
type: relation-list
to: option/content_object_id
on_delete: CASCADE
equal_fields: meeting_id
change_recommendation_ids:
type: relation-list
to: motion_change_recommendation/motion_id
on_delete: CASCADE
equal_fields: meeting_id
statute_paragraph_id:
type: relation
to: motion_statute_paragraph/motion_ids
equal_fields: meeting_id
comment_ids:
type: relation-list
to: motion_comment/motion_id
on_delete: CASCADE
equal_fields: meeting_id
agenda_item_id:
type: relation
to: agenda_item/content_object_id
on_delete: CASCADE
equal_fields: meeting_id
list_of_speakers_id:
type: relation
to: list_of_speakers/content_object_id
required: true
on_delete: CASCADE
equal_fields: meeting_id
tag_ids:
type: relation-list
to: tag/tagged_ids
equal_fields: meeting_id
attachment_ids:
type: relation-list
to: mediafile/attachment_ids
equal_fields: meeting_id
projection_ids:
type: relation-list
to: projection/content_object_id
equal_fields: meeting_id
personal_note_ids:
type: relation-list
to: personal_note/content_object_id
equal_fields: meeting_id
on_delete: CASCADE
meeting_id:
type: relation
to: meeting/motion_ids
required: true
motion_submitter:
id: number
weight:
type: number
default: 10000
user_id:
type: relation
to: user/submitted_motion_$_ids
motion_id:
type: relation
to: motion/submitter_ids
equal_fields: meeting_id
meeting_id:
type: relation
to: meeting/motion_submitter_ids
required: true
motion_comment:
id: number
comment: HTMLStrict
motion_id:
type: relation
to: motion/comment_ids
required: true
equal_fields: meeting_id
section_id:
type: relation
to: motion_comment_section/comment_ids
required: true
equal_fields: meeting_id
meeting_id:
type: relation
to: meeting/motion_comment_ids
required: true
motion_comment_section:
id: number
name:
type: string
required: true
weight:
type: number
default: 10000
comment_ids:
type: relation-list
to: motion_comment/section_id
on_delete: PROTECT
equal_fields: meeting_id
read_group_ids:
type: relation-list
to: group/read_comment_section_ids
equal_fields: meeting_id
write_group_ids:
type: relation-list
to: group/write_comment_section_ids
equal_fields: meeting_id
meeting_id:
type: relation
to: meeting/motion_comment_section_ids
required: true
motion_category:
id: number
name:
type: string
required: true
prefix:
type: string
weight:
type: number
default: 10000
level:
type: number
description: Calculated field.
read_only: true
parent_id:
type: relation
to: motion_category/child_ids
equal_fields: meeting_id
child_ids:
type: relation-list
to: motion_category/parent_id
equal_fields: meeting_id
motion_ids:
type: relation-list
to: motion/category_id
equal_fields: meeting_id
meeting_id:
type: relation
to: meeting/motion_category_ids
required: true
motion_block:
id: number
title:
type: string
required: true
internal: boolean
motion_ids:
type: relation-list
to: motion/block_id
equal_fields: meeting_id
agenda_item_id:
type: relation
to: agenda_item/content_object_id
on_delete: CASCADE
equal_fields: meeting_id
list_of_speakers_id:
type: relation
to: list_of_speakers/content_object_id
required: true
on_delete: CASCADE
equal_fields: meeting_id
projection_ids:
type: relation-list
to: projection/content_object_id
equal_fields: meeting_id
meeting_id:
type: relation
to: meeting/motion_block_ids
required: true
motion_change_recommendation:
id: number
rejected:
type: boolean
default: false
internal:
type: boolean
default: false
type:
type: string
enum:
- replacement
- insertion
- deletion
- other
default: replacement
other_description: string
line_from:
type: number
minimum: 0
line_to:
type: number
minimum: 0
text: HTMLStrict
creation_time:
type: timestamp
read_only: true
motion_id:
type: relation
to: motion/change_recommendation_ids
required: true
equal_fields: meeting_id
meeting_id:
type: relation
to: meeting/motion_change_recommendation_ids
required: true
motion_state:
id: number
name:
type: string
required: true
recommendation_label: string
css_class:
type: string
enum:
- grey
- red
- green
- lightblue
- yellow
default: lightblue
required: true
restrictions:
type: string[]
items:
enum:
- motion.can_see_internal
- motion.can_manage_metadata
- motion.can_manage
- is_submitter
default: []
allow_support:
type: boolean
default: false
allow_create_poll:
type: boolean
default: false
allow_submitter_edit:
type: boolean
default: false
set_number:
type: boolean
default: true
show_state_extension_field:
type: boolean
default: false
merge_amendment_into_final:
type: string
enum:
- do_not_merge
- undefined
- do_merge
default: undefined
show_recommendation_extension_field:
type: boolean
default: false
next_state_ids:
type: relation-list
to: motion_state/previous_state_ids
equal_fields:
- meeting_id
- workflow_id
previous_state_ids:
type: relation-list
to: motion_state/next_state_ids
equal_fields:
- meeting_id
- workflow_id
motion_ids:
type: relation-list
to: motion/state_id
on_delete: PROTECT
equal_fields: meeting_id
motion_recommendation_ids:
type: relation-list
to: motion/recommendation_id
equal_fields: meeting_id
workflow_id:
type: relation
to: motion_workflow/state_ids
required: true
equal_fields: meeting_id
first_state_of_workflow_id:
type: relation
to: motion_workflow/first_state_id
on_delete: PROTECT
equal_fields: meeting_id
meeting_id:
type: relation
to: meeting/motion_state_ids
required: true
motion_workflow:
id: number
name:
type: string
required: true
state_ids:
type: relation-list
to: motion_state/workflow_id
on_delete: CASCADE
equal_fields: meeting_id
first_state_id:
type: relation
to: motion_state/first_state_of_workflow_id
required: true
equal_fields: meeting_id
default_workflow_meeting_id:
type: relation
to: meeting/motions_default_workflow_id
default_amendment_workflow_meeting_id:
type: relation
to: meeting/motions_default_amendment_workflow_id
default_statute_amendment_workflow_meeting_id:
type: relation
to: meeting/motions_default_statute_amendment_workflow_id
meeting_id:
type: relation
to: meeting/motion_workflow_ids
required: true
motion_statute_paragraph:
id: number
title:
type: string
required: true
text: HTMLStrict
weight:
type: number
default: 10000
motion_ids:
type: relation-list
to: motion/statute_paragraph_id
equal_fields: meeting_id
meeting_id:
type: relation
to: meeting/motion_statute_paragraph_ids
required: true
poll:
id: number
description: string
title:
type: string
required: true
type:
type: string
required: true
enum:
- analog
- named
- pseudoanonymous
backend:
type: string
required: True
default: long
enum:
- long
- fast
is_pseudoanonymized: boolean
pollmethod:
type: string
required: true
enum:
- Y
- YN
- YNA
- N
state:
type: string
enum:
- created
- started
- finished
- published
default: created
min_votes_amount:
type: number
default: 1
max_votes_amount:
type: number
default: 1
global_yes:
type: boolean
default: false
global_no:
type: boolean
default: false
global_abstain:
type: boolean
default: false
onehundred_percent_base:
type: string
required: true
enum:
- Y
- YN
- YNA
- N
- valid
- cast
- entitled
- disabled
default: disabled
majority_method:
type: string
required: true
enum:
- simple
- two_thirds
- three_quarters
- disabled
default: disabled
votesvalid: decimal(6)
votesinvalid: decimal(6)
votescast: decimal(6)
entitled_users_at_stop: JSON
content_object_id: # Note: must not be set - it is allowed to have standalone polls
type: generic-relation
to:
collections:
- motion
- assignment
field: poll_ids
equal_fields: meeting_id
option_ids:
type: relation-list
to: option/poll_id
on_delete: CASCADE
equal_fields: meeting_id
global_option_id:
type: relation
to: option/used_as_global_option_in_poll_id
on_delete: CASCADE
equal_fields: meeting_id
voted_ids:
type: relation-list
to: user/poll_voted_$_ids
entitled_group_ids:
type: relation-list
to: group/poll_ids
equal_fields: meeting_id
projection_ids:
type: relation-list
to: projection/content_object_id
equal_fields: meeting_id
meeting_id:
type: relation
to: meeting/poll_ids
option:
id: number
weight:
type: number
default: 10000
text: HTMLStrict
yes: decimal(6)
no: decimal(6)
abstain: decimal(6)
poll_id:
type: relation
to: poll/option_ids
equal_fields: meeting_id
used_as_global_option_in_poll_id:
type: relation
to: poll/global_option_id
equal_fields: meeting_id
vote_ids:
type: relation-list
to: vote/option_id
on_delete: CASCADE
equal_fields: meeting_id
content_object_id:
type: generic-relation
to:
- motion/option_ids
- topic/option_ids
- user/option_$_ids
equal_fields: meeting_id
meeting_id:
type: relation
to: meeting/option_ids
required: true
vote:
id: number
weight: decimal(6)
value: string
user_token:
type: string
required: true
option_id:
type: relation
to: option/vote_ids
equal_fields: meeting_id
required: true
user_id:
type: relation
to: user/vote_$_ids
delegated_user_id:
type: relation
to: user/vote_delegated_vote_$_ids
meeting_id:
type: relation
to: meeting/vote_ids
required: true
assignment:
id: number
title:
type: string
required: true
description: HTMLStrict
open_posts:
type: number
minimum: 0
default: 0
phase:
type: string
enum:
- search
- voting
- finished
default: search
default_poll_description: string
number_poll_candidates: boolean
candidate_ids:
type: relation-list
to: assignment_candidate/assignment_id
on_delete: CASCADE
equal_fields: meeting_id
poll_ids:
type: relation-list
to: poll/content_object_id
on_delete: CASCADE
equal_fields: meeting_id
agenda_item_id:
type: relation
to: agenda_item/content_object_id
on_delete: CASCADE
equal_fields: meeting_id
list_of_speakers_id:
type: relation
to: list_of_speakers/content_object_id
required: true
on_delete: CASCADE
equal_fields: meeting_id
tag_ids:
type: relation-list
to: tag/tagged_ids
equal_fields: meeting_id
attachment_ids:
type: relation-list
to: mediafile/attachment_ids
equal_fields: meeting_id
projection_ids:
type: relation-list
to: projection/content_object_id
equal_fields: meeting_id
meeting_id:
type: relation
to: meeting/assignment_ids
required: true
assignment_candidate:
id: number
weight:
type: number
default: 10000
assignment_id:
type: relation
to: assignment/candidate_ids
equal_fields: meeting_id
user_id:
type: relation
to: user/assignment_candidate_$_ids
meeting_id:
type: relation
to: meeting/assignment_candidate_ids
required: true
# Mediafiles are delivered by the mediafile server with the URL
# `<media-prefix>/media/<meeting_id>/path`
mediafile:
id: number
title:
type: string
description: Title and parent_id must be unique.
is_directory: boolean
filesize:
type: number
description: In bytes, not the human readable format anymore.
read_only: true
filename:
type: string
descriptin: The uploaded filename. Will be used for downloading. Only writeable on create.
mimetype: string
pdf_information: JSON
create_timestamp: timestamp
is_public:
type: boolean
description: "Calculated field. inherited_access_group_ids == [] can have two causes: cancelling access groups (=> is_public := false) or no access groups at all (=> is_public := true)"
read_only: true
inherited_access_group_ids:
type: relation-list
to: group/mediafile_inherited_access_group_ids
description: Calculated field.
read_only: true
access_group_ids:
type: relation-list
to: group/mediafile_access_group_ids
equal_fields: meeting_id
parent_id:
type: relation
to: mediafile/child_ids
equal_fields: meeting_id
child_ids:
type: relation-list
to: mediafile/parent_id
equal_fields: meeting_id
list_of_speakers_id:
type: relation
to: list_of_speakers/content_object_id
on_delete: CASCADE
equal_fields: meeting_id
projection_ids:
type: relation-list
to: projection/content_object_id
equal_fields: meeting_id
attachment_ids:
type: generic-relation-list
to:
collections:
- motion
- topic
- assignment
field: attachment_ids
equal_fields: meeting_id
meeting_id:
type: relation
to: meeting/mediafile_ids
required: true
# Reverse relations for meetings, if a mediafile is used as a special resource
used_as_logo_$_in_meeting_id:
type: template
fields:
type: relation
to: meeting/logo_$_id
used_as_font_$_in_meeting_id:
type: template
fields:
type: relation
to: meeting/font_$_id
projector:
id: number
name: string
scale:
type: number
default: 0
scroll:
type: number
default: 0
width:
type: number
minimum: 1
default: 1200
aspect_ratio_numerator:
type: number
minimum: 1
default: 16
aspect_ratio_denominator:
type: number
minimum: 1
default: 9
color:
type: color
default: "#000000"
background_color:
type: color
default: "#ffffff"
header_background_color:
type: color
default: "#317796"
header_font_color:
type: color
default: "#f5f5f5"
header_h1_color:
type: color
default: "#317796"
chyron_background_color:
type: color
default: "#317796"
chyron_font_color:
type: color
default: "#ffffff"
show_header_footer:
type: boolean
default: true
show_title:
type: boolean
default: true
show_logo:
type: boolean
default: true
show_clock:
type: boolean
default: true
current_projection_ids:
type: relation-list
to: projection/current_projector_id
on_delete: CASCADE
equal_fields: meeting_id
preview_projection_ids:
type: relation-list
to: projection/preview_projector_id
equal_fields: meeting_id
history_projection_ids:
type: relation-list
to: projection/history_projector_id
equal_fields: meeting_id
used_as_reference_projector_meeting_id:
type: relation
to: meeting/reference_projector_id
used_as_default_$_in_meeting_id:
type: template
fields:
type: relation
to: meeting/default_projector_$_id
meeting_id:
type: relation
to: meeting/projector_ids
# A projection is a M2M model between an element that is assigned to a
# projector. This element can either be the current one projected, in the
# preview, or in the history, but not more than one once. A projection is
# projector-specific, meaning that once a projection is created for a projector
# and element, these references will not change.
projection:
id: number
options: JSON
stable:
type: boolean
default: false
weight: number
type: string
current_projector_id:
type: relation
to: projector/current_projection_ids
equal_fields: meeting_id
preview_projector_id:
type: relation
to: projector/preview_projection_ids
equal_fields: meeting_id
history_projector_id:
type: relation
to: projector/history_projection_ids
equal_fields: meeting_id
content_object_id:
type: generic-relation
to:
- meeting/projection_ids
- motion/projection_ids
- mediafile/projection_ids
- list_of_speakers/projection_ids
- motion_block/projection_ids
- assignment/projection_ids
- agenda_item/projection_ids
- topic/projection_ids
- poll/projection_ids
- projector_message/projection_ids
- projector_countdown/projection_ids
- user/projection_$_ids
equal_fields: meeting_id
meeting_id:
type: relation
to: meeting/all_projection_ids
required: true
projector_message:
id: number
message: HTMLStrict
projection_ids:
type: relation-list
to: projection/content_object_id
equal_fields: meeting_id
meeting_id:
type: relation
to: meeting/projector_message_ids
projector_countdown:
id: number
title:
type: string
required: true
description:
type: string
default: ""
default_time:
type: number
countdown_time:
type: float
default: 60
running:
type: boolean
default: false
projection_ids:
type: relation-list
to: projection/content_object_id
equal_fields: meeting_id
used_as_list_of_speaker_countdown_meeting_id:
type: relation
to: meeting/list_of_speakers_countdown_id
used_as_poll_countdown_meeting_id:
type: relation
to: meeting/poll_countdown_id
meeting_id:
type: relation
to: meeting/projector_countdown_ids
chat_group:
id: number
name:
type: string
required: true
weight:
type: number
default: 10000
read_group_ids:
type: relation-list
to: group/read_chat_group_ids
equal_fields: meeting_id
write_group_ids:
type: relation-list
to: group/write_chat_group_ids
equal_fields: meeting_id
meeting_id:
type: relation
to: meeting/chat_group_ids
required: true