# Generated by Django 4.0.1 on 2023-03-29 22:16

import datetime
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone


class Migration(migrations.Migration):

    dependencies = [
        ('members', '0001_initial_squashed_0015_alter_member_options_and_more'),
    ]

    operations = [
        migrations.RemoveField(
            model_name='member',
            name='not_waiting',
        ),
        migrations.AddField(
            model_name='freizeit',
            name='kilometers_traveled',
            field=models.IntegerField(default=0, validators=[django.core.validators.MinValueValidator(0)], verbose_name='Kilometers traveled'),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='member',
            name='iban',
            field=models.CharField(blank=True, max_length=30, verbose_name='IBAN'),
        ),
        migrations.AlterField(
            model_name='freizeit',
            name='date',
            field=models.DateTimeField(default=datetime.datetime.today, verbose_name='Begin'),
        ),
        migrations.AlterField(
            model_name='freizeit',
            name='end',
            field=models.DateTimeField(default=datetime.datetime.today, verbose_name='End (optional)'),
        ),
        migrations.AlterField(
            model_name='freizeit',
            name='tour_approach',
            field=models.IntegerField(choices=[(0, 'Muskelkraft'), (1, 'ÖPNV'), (2, 'Fahrgemeinschaften')], default=0, verbose_name='Means of transportation'),
        ),
        migrations.CreateModel(
            name='PermissionMember',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('change_groups', models.ManyToManyField(blank=True, related_name='changeable_by', to='members.Group', verbose_name='May change members of groups')),
                ('change_members', models.ManyToManyField(blank=True, related_name='changeable_by', to='members.Member', verbose_name='May change members')),
                ('delete_groups', models.ManyToManyField(blank=True, related_name='deletable_by', to='members.Group', verbose_name='May delete members of groups')),
                ('delete_members', models.ManyToManyField(blank=True, related_name='deletable_by', to='members.Member', verbose_name='May delete members')),
                ('list_groups', models.ManyToManyField(blank=True, related_name='listable_by', to='members.Group', verbose_name='May list members of groups')),
                ('list_members', models.ManyToManyField(blank=True, related_name='listable_by', to='members.Member', verbose_name='May list members')),
                ('member', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='permissions', to='members.member')),
                ('view_groups', models.ManyToManyField(blank=True, related_name='viewable_by', to='members.Group', verbose_name='May view members of groups')),
                ('view_members', models.ManyToManyField(blank=True, related_name='viewable_by', to='members.Member', verbose_name='May view members')),
            ],
            options={
                'verbose_name': 'Permissions',
                'verbose_name_plural': 'Permissions',
            },
        ),
        migrations.CreateModel(
            name='PermissionGroup',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('change_groups', models.ManyToManyField(blank=True, related_name='group_members_changeable_by', to='members.Group', verbose_name='May change members of groups')),
                ('change_members', models.ManyToManyField(blank=True, related_name='group_members_changeable_by_group', to='members.Member', verbose_name='May change members')),
                ('delete_groups', models.ManyToManyField(blank=True, related_name='group_members_deletable_by', to='members.Group', verbose_name='May delete members of groups')),
                ('delete_members', models.ManyToManyField(blank=True, related_name='group_members_deletable_by', to='members.Member', verbose_name='May delete members')),
                ('group', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='permissions', to='members.group')),
                ('list_groups', models.ManyToManyField(blank=True, related_name='group_members_listable_by', to='members.Group', verbose_name='May list members of groups')),
                ('list_members', models.ManyToManyField(blank=True, related_name='group_members_listable_by', to='members.Member', verbose_name='May list members')),
                ('view_groups', models.ManyToManyField(blank=True, related_name='group_members_viewable_by', to='members.Group', verbose_name='May view members of groups')),
                ('view_members', models.ManyToManyField(blank=True, related_name='group_members_viewable_by', to='members.Member', verbose_name='May view members')),
            ],
            options={
                'verbose_name': 'Group permissions',
                'verbose_name_plural': 'Group permissions',
            },
        ),
        migrations.CreateModel(
            name='MemberWaitingList',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('prename', models.CharField(max_length=20, verbose_name='prename')),
                ('lastname', models.CharField(max_length=20, verbose_name='last name')),
                ('email', models.EmailField(default='', max_length=100)),
                ('email_parents', models.EmailField(blank=True, default='', max_length=100, verbose_name="Parents' Email")),
                ('cc_email_parents', models.BooleanField(default=True, verbose_name='Also send mails to parents')),
                ('birth_date', models.DateField(verbose_name='birth date')),
                ('comments', models.TextField(blank=True, default='', verbose_name='comments')),
                ('confirmed_mail', models.BooleanField(default=True, verbose_name='Email confirmed')),
                ('confirmed_mail_parents', models.BooleanField(default=True, verbose_name='Parents email confirmed')),
                ('confirm_mail_key', models.CharField(default='', max_length=32)),
                ('confirm_mail_parents_key', models.CharField(default='', max_length=32)),
                ('last_wait_confirmation', models.DateField(auto_now=True, verbose_name='Last wait confirmation')),
                ('wait_confirmation_key', models.CharField(default='', max_length=32)),
                ('wait_confirmation_key_expire', models.DateTimeField(default=django.utils.timezone.now)),
                ('registration_key', models.CharField(default='', max_length=32)),
                ('registration_expire', models.DateTimeField(default=django.utils.timezone.now)),
                ('invited_for_group', models.ForeignKey(blank=True, default=None, null=True, on_delete=django.db.models.deletion.SET_NULL, to='members.group', verbose_name='Invited for group')),
            ],
            options={
                'verbose_name': 'Waiter',
                'verbose_name_plural': 'Waiters',
                'permissions': (('may_manage_waiting_list', 'Can view and manage the waiting list.'),),
            },
        ),
        migrations.CreateModel(
            name='LJPProposal',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=30, verbose_name='Title')),
                ('goals_alpinistic', models.TextField(verbose_name='Alpinistic goals')),
                ('goals_pedagogic', models.TextField(verbose_name='Pedagogic goals')),
                ('methods', models.TextField(verbose_name='Content and methods')),
                ('evaluation', models.TextField(verbose_name='Evaluation')),
                ('experiences', models.TextField(verbose_name='Experiences and possible improvements')),
                ('excursion', models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='members.freizeit', verbose_name='Excursion')),
            ],
            options={
                'verbose_name': 'LJP Proposal',
                'verbose_name_plural': 'LJP Proposals',
            },
        ),
        migrations.CreateModel(
            name='Intervention',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date_start', models.DateTimeField(verbose_name='Starting time')),
                ('duration', models.DecimalField(decimal_places=2, max_digits=4, verbose_name='Duration in hours')),
                ('activity', models.TextField(verbose_name='Activity and method')),
                ('ljp_proposal', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='members.ljpproposal', verbose_name='LJP Proposal')),
            ],
            options={
                'verbose_name': 'Intervention',
                'verbose_name_plural': 'Interventions',
            },
        ),
    ]
