# Generated by Django 5.0.6 on 2024-07-07 19:27

import django.db.models.deletion
import modelcluster.fields
import wagtail.blocks
import wagtail.fields
from django.db import migrations, models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='OpeningHoursSet',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(help_text='Enkel beskrivelse av hvilken periode disse åpningstidene dekker, f.eks. <em>Vanlige åpningstider</em> eller <em>Sommer 2032</em>.', max_length=256)),
                ('effective_from', models.DateField()),
                ('effective_to', models.DateField(blank=True, null=True)),
                ('announcement', models.TextField(blank=True, help_text='En kort notis som vil vises i forbindelse med åpningstidene, f.eks. <em>Huset er stengt i perioden A til B.</em>. Kan være blank.')),
            ],
            options={
                'verbose_name': 'Opening hours set',
                'verbose_name_plural': 'Opening hours sets',
                'ordering': ['effective_from'],
            },
        ),
        migrations.CreateModel(
            name='OpeningHoursItem',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('sort_order', models.IntegerField(blank=True, editable=False, null=True)),
                ('function', models.CharField(choices=[('glassbaren', 'Glassbaren'), ('bokcafeen', 'Bokcaféen'), ('ekspedisjonen', 'Ekspedisjonen')], default='', help_text='Hvilket lokale/funksjon?', max_length=32)),
                ('week', wagtail.fields.StreamField([('monday', wagtail.blocks.StructBlock([('time_from', wagtail.blocks.TimeBlock(label='Åpner', required=False)), ('time_to', wagtail.blocks.TimeBlock(label='Stenger', required=False)), ('custom', wagtail.blocks.CharBlock(help_text='Tekst som vises istedenfor tidspunkter. F.eks. <em>Åpent ved arrangement</em>', label='Fritekst', required=False))], label='Mandag')), ('tuesday', wagtail.blocks.StructBlock([('time_from', wagtail.blocks.TimeBlock(label='Åpner', required=False)), ('time_to', wagtail.blocks.TimeBlock(label='Stenger', required=False)), ('custom', wagtail.blocks.CharBlock(help_text='Tekst som vises istedenfor tidspunkter. F.eks. <em>Åpent ved arrangement</em>', label='Fritekst', required=False))], label='Tirsdag')), ('wednesday', wagtail.blocks.StructBlock([('time_from', wagtail.blocks.TimeBlock(label='Åpner', required=False)), ('time_to', wagtail.blocks.TimeBlock(label='Stenger', required=False)), ('custom', wagtail.blocks.CharBlock(help_text='Tekst som vises istedenfor tidspunkter. F.eks. <em>Åpent ved arrangement</em>', label='Fritekst', required=False))], label='Onsdag')), ('thursday', wagtail.blocks.StructBlock([('time_from', wagtail.blocks.TimeBlock(label='Åpner', required=False)), ('time_to', wagtail.blocks.TimeBlock(label='Stenger', required=False)), ('custom', wagtail.blocks.CharBlock(help_text='Tekst som vises istedenfor tidspunkter. F.eks. <em>Åpent ved arrangement</em>', label='Fritekst', required=False))], label='Torsdag')), ('friday', wagtail.blocks.StructBlock([('time_from', wagtail.blocks.TimeBlock(label='Åpner', required=False)), ('time_to', wagtail.blocks.TimeBlock(label='Stenger', required=False)), ('custom', wagtail.blocks.CharBlock(help_text='Tekst som vises istedenfor tidspunkter. F.eks. <em>Åpent ved arrangement</em>', label='Fritekst', required=False))], label='Fredag')), ('saturday', wagtail.blocks.StructBlock([('time_from', wagtail.blocks.TimeBlock(label='Åpner', required=False)), ('time_to', wagtail.blocks.TimeBlock(label='Stenger', required=False)), ('custom', wagtail.blocks.CharBlock(help_text='Tekst som vises istedenfor tidspunkter. F.eks. <em>Åpent ved arrangement</em>', label='Fritekst', required=False))], label='Lørdag')), ('sunday', wagtail.blocks.StructBlock([('time_from', wagtail.blocks.TimeBlock(label='Åpner', required=False)), ('time_to', wagtail.blocks.TimeBlock(label='Stenger', required=False)), ('custom', wagtail.blocks.CharBlock(help_text='Tekst som vises istedenfor tidspunkter. F.eks. <em>Åpent ved arrangement</em>', label='Fritekst', required=False))], label='Søndag'))])),
                ('opening_hours_set', modelcluster.fields.ParentalKey(on_delete=django.db.models.deletion.CASCADE, related_name='items', to='openinghours.openinghoursset')),
            ],
            options={
                'ordering': ['sort_order'],
                'abstract': False,
            },
        ),
    ]
