# Generated by Django 3.1.13 on 2021-11-15 08:56

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


class Migration(migrations.Migration):

    dependencies = [
        ('reservation_units', '0027_reservation_unit_purpose_changes'),
    ]

    operations = [
        migrations.CreateModel(
            name='ReservationUnitCancellationRule',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255, verbose_name='Name for the rule')),
                ('name_fi', models.CharField(max_length=255, null=True, verbose_name='Name for the rule')),
                ('name_en', models.CharField(max_length=255, null=True, verbose_name='Name for the rule')),
                ('name_sv', models.CharField(max_length=255, null=True, verbose_name='Name for the rule')),
                ('can_be_cancelled_time_before', models.DurationField(blank=True, default=datetime.timedelta(days=1), help_text='Seconds before reservations related to this cancellation rule can be cancelled without handling.', null=True, verbose_name='Time before user can cancel reservations of this reservation unit')),
                ('needs_handling', models.BooleanField(default=False, verbose_name='Will the cancellation need manual staff handling')),
            ],
        ),
        migrations.AddField(
            model_name='reservationunit',
            name='cancellation_rule',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to='reservation_units.reservationunitcancellationrule'),
        ),
    ]

# Generated by Django 3.1.13 on 2021-11-15 08:56

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


class Migration(migrations.Migration):

    dependencies = [
        ('reservation_units', '0027_reservation_unit_purpose_changes'),
    ]

    operations = [
        migrations.CreateModel(
            name='ReservationUnitCancellationRule',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255, verbose_name='Name for the rule')),
                ('name_fi', models.CharField(max_length=255, null=True, verbose_name='Name for the rule')),
                ('name_en', models.CharField(max_length=255, null=True, verbose_name='Name for the rule')),
                ('name_sv', models.CharField(max_length=255, null=True, verbose_name='Name for the rule')),
                ('can_be_cancelled_time_before', models.DurationField(blank=True, default=datetime.timedelta(days=1), help_text='Seconds before reservations related to this cancellation rule can be cancelled without handling.', null=True, verbose_name='Time before user can cancel reservations of this reservation unit')),
                ('needs_handling', models.BooleanField(default=False, verbose_name='Will the cancellation need manual staff handling')),
            ],
        ),
        migrations.AddField(
            model_name='reservationunit',
            name='cancellation_rule',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to='reservation_units.reservationunitcancellationrule'),
        ),
    ]

# Generated by Django 3.1.13 on 2021-11-15 08:56