# Generated by Django 3.2.7 on 2022-06-20 05:22

import django.db.models.deletion
from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ("programme", "0020_meetingroom_unique_meetingroom_name_for_event"),
    ]

    operations = [
        migrations.AlterModelOptions(
            name="contribution",
            options={
                "ordering": ["start"],
                "permissions": (
                    ("schedule_slot", "Can set time and date for the slot"),
                    ("accept_contribution", "Can accept the contribution"),
                    ("withdraw_contribution", "Can withdraw the contribution"),
                    (
                        "change_activity",
                        "Can change the activity of the contribution",
                    ),
                    (
                        "upload_material",
                        "Can upload material for the contribution",
                    ),
                ),
            },
        ),
        migrations.AddField(
            model_name="sessionmaterial",
            name="pinned",
            field=models.BooleanField(
                default=False,
                help_text="Should this material be shown to the session sidebar?",
            ),
        ),
        migrations.AddField(
            model_name="sessionmaterial",
            name="registered_only",
            field=models.BooleanField(
                default=False,
                help_text="Shall we make this material only available for users that registered for the event?",
                verbose_name="Restrict access to event participants",
            ),
        ),
        migrations.CreateModel(
            name="ContributionMaterial",
            fields=[
                (
                    "sessionmaterial_ptr",
                    models.OneToOneField(
                        auto_created=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        parent_link=True,
                        primary_key=True,
                        serialize=False,
                        to="programme.sessionmaterial",
                    ),
                ),
                (
                    "contribution",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        to="programme.contribution",
                    ),
                ),
            ],
            options={
                "abstract": False,
            },
            bases=("programme.sessionmaterial",),
        ),
    ]
