# Generated by Django 4.0.1 on 2023-03-29 20:12

import datetime
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
import utils


class Migration(migrations.Migration):

    replaces = [('members', '0001_initial'), ('members', '0002_auto_20170704_1711'), ('members', '0003_auto_20170712_1822'), ('members', '0004_auto_20171011_2045'), ('members', '0005_auto_20190615_1224'), ('members', '0006_auto_20190914_2341'), ('members', '0007_auto_20200924_1512'), ('members', '0008_auto_20210924_1155'), ('members', '0009_member_cc_email_parents_alter_activitycategory_id_and_more'), ('members', '0010_alter_activitycategory_id_alter_freizeit_id_and_more'), ('members', '0011_freizeit_tour_approach'), ('members', '0012_remove_group_min_age_group_year_from_group_year_to'), ('members', '0013_member_echo_expire_member_echo_key_member_echoed'), ('members', '0014_memberunconfirmedproxy_member_confirm_mail_key_and_more'), ('members', '0015_alter_member_options_and_more')]

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('contenttypes', '0002_remove_content_type_name'),
    ]

    operations = [
        migrations.CreateModel(
            name='ActivityCategory',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=20, verbose_name='Name')),
                ('description', models.TextField(verbose_name='Description')),
            ],
            options={
                'verbose_name': 'Activity',
                'verbose_name_plural': 'Activities',
            },
        ),
        migrations.CreateModel(
            name='Group',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=20, verbose_name='name')),
                ('year_from', models.IntegerField(default=2010, verbose_name='lowest year')),
                ('year_to', models.IntegerField(default=2011, verbose_name='highest year')),
            ],
            options={
                'verbose_name': 'group',
                'verbose_name_plural': 'groups',
            },
        ),
        migrations.CreateModel(
            name='Member',
            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')),
                ('street', models.CharField(blank=True, default='', max_length=30, verbose_name='street and house number')),
                ('town', models.CharField(blank=True, default='', max_length=30, verbose_name='town')),
                ('phone_number', models.CharField(blank=True, default='', max_length=18, verbose_name='phone number')),
                ('phone_number_parents', models.CharField(blank=True, default='', max_length=18, verbose_name='parents phone number')),
                ('email', models.EmailField(default='', max_length=100)),
                ('birth_date', models.DateField(verbose_name='birth date')),
                ('gets_newsletter', models.BooleanField(default=True, verbose_name='receives newsletter')),
                ('unsubscribe_key', models.CharField(default='', max_length=32)),
                ('unsubscribe_expire', models.DateTimeField(default=django.utils.timezone.now)),
                ('comments', models.TextField(blank=True, default='', verbose_name='comments')),
                ('created', models.DateField(auto_now=True, verbose_name='created')),
                ('registration_form', utils.RestrictedFileField(blank=True, upload_to='registration_forms', verbose_name='registration form')),
                ('group', models.ManyToManyField(to='members.Group', verbose_name='group')),
                ('email_parents', models.EmailField(blank=True, default='', max_length=100, verbose_name="Parents' Email")),
                ('plz', models.CharField(blank=True, default='', max_length=10, verbose_name='Postcode')),
                ('registered', models.BooleanField(default=False, verbose_name='Registration complete')),
                ('active', models.BooleanField(default=True, verbose_name='Active')),
                ('not_waiting', models.BooleanField(default=True, verbose_name='Not waiting')),
                ('cc_email_parents', models.BooleanField(default=True, verbose_name='Also send mails to parents')),
                ('echo_expire', models.DateTimeField(default=django.utils.timezone.now)),
                ('echo_key', models.CharField(default='', max_length=32)),
                ('echoed', models.BooleanField(default=True, verbose_name='Echoed')),
                ('confirm_mail_key', models.CharField(default='', max_length=32)),
                ('confirm_mail_parents_key', models.CharField(default='', max_length=32)),
                ('confirmed', models.BooleanField(default=True, verbose_name='Confirmed')),
                ('confirmed_mail', models.BooleanField(default=True, verbose_name='Email confirmed')),
                ('confirmed_mail_parents', models.BooleanField(default=True, verbose_name='Parents email confirmed')),
                ('user', models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'member',
                'verbose_name_plural': 'members',
                'permissions': (('may_see_qualities', 'Is allowed to see the quality overview'), ('may_set_auth_user', 'Is allowed to set auth user member connections.')),
            },
        ),
        migrations.CreateModel(
            name='MemberList',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(default='', max_length=50, verbose_name='Activity')),
                ('place', models.CharField(default='', max_length=50, verbose_name='Place')),
                ('destination', models.CharField(blank=True, default='', max_length=50, verbose_name='Destination (optional)')),
                ('date', models.DateField(default=datetime.datetime.today, verbose_name='Date')),
                ('end', models.DateField(blank=True, default=datetime.datetime.today, verbose_name='End (optional)')),
                ('tour_type', models.IntegerField(choices=[(0, 'Gemeinschaftstour'), (1, 'Führungstour'), (2, 'Ausbildung')])),
                ('difficulty', models.IntegerField(choices=[(1, 'easy'), (2, 'medium'), (3, 'hard')])),
                ('activity', models.ManyToManyField(default=None, to='members.ActivityCategory', verbose_name='Categories')),
                ('groups', models.ManyToManyField(to='members.Group', verbose_name='Groups')),
                ('jugendleiter', models.ManyToManyField(to='members.Member')),
            ],
            options={
                'verbose_name': 'Memberlist',
                'verbose_name_plural': 'Memberlists',
            },
        ),
        migrations.CreateModel(
            name='Klettertreff',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date', models.DateField(default=datetime.datetime.today, verbose_name='Date')),
                ('location', models.CharField(default='', max_length=60, verbose_name='Location')),
                ('topic', models.CharField(default='', max_length=60, verbose_name='Topic')),
                ('group', models.ForeignKey(default='', on_delete=django.db.models.deletion.CASCADE, to='members.group', verbose_name='Group')),
                ('jugendleiter', models.ManyToManyField(to='members.Member')),
            ],
            options={
                'verbose_name': 'Klettertreff',
                'verbose_name_plural': 'Klettertreffs',
            },
        ),
        migrations.CreateModel(
            name='KlettertreffAttendee',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('klettertreff', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='members.klettertreff')),
                ('member', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='members.member', verbose_name='Member')),
            ],
            options={
                'verbose_name': 'Member',
                'verbose_name_plural': 'Members',
            },
        ),
        migrations.CreateModel(
            name='MemberNoteList',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(default='', max_length=50, verbose_name='Title')),
                ('date', models.DateField(blank=True, default=datetime.datetime.today, null=True, verbose_name='Date')),
            ],
            options={
                'verbose_name_plural': 'Notizlisten',
                'verbose_name': 'Notizliste',
            },
        ),
        migrations.CreateModel(
            name='NewMemberOnList',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('object_id', models.PositiveIntegerField()),
                ('comments', models.TextField(blank=True, default='', verbose_name='Comment')),
                ('content_type', models.ForeignKey(default='members', on_delete=django.db.models.deletion.CASCADE, to='contenttypes.contenttype')),
                ('member', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='members.member', verbose_name='Member')),
            ],
            options={
                'verbose_name_plural': 'Members',
                'verbose_name': 'Member',
            },
        ),
        migrations.CreateModel(
            name='OldMemberOnList',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('comments', models.TextField(blank=True, default='', verbose_name='Comment')),
                ('member', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='members.member', verbose_name='Member')),
                ('memberlist', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='members.memberlist')),
            ],
            options={
                'verbose_name': 'Member',
                'verbose_name_plural': 'Members',
            },
        ),
        migrations.CreateModel(
            name='Freizeit',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(default='', max_length=50, verbose_name='Activity')),
                ('place', models.CharField(default='', max_length=50, verbose_name='Place')),
                ('destination', models.CharField(blank=True, default='', max_length=50, verbose_name='Destination (optional)')),
                ('date', models.DateField(default=datetime.datetime.today, verbose_name='Date')),
                ('end', models.DateField(blank=True, default=datetime.datetime.today, verbose_name='End (optional)')),
                ('tour_type', models.IntegerField(choices=[(0, 'Gemeinschaftstour'), (1, 'Führungstour'), (2, 'Ausbildung')])),
                ('difficulty', models.IntegerField(choices=[(1, 'easy'), (2, 'medium'), (3, 'hard')])),
                ('activity', models.ManyToManyField(default=None, to='members.ActivityCategory', verbose_name='Categories')),
                ('groups', models.ManyToManyField(to='members.Group', verbose_name='Groups')),
                ('jugendleiter', models.ManyToManyField(to='members.Member')),
                ('tour_approach', models.IntegerField(choices=[(0, 'Muskelkraft'), (1, 'Öffentliche VM'), (2, 'Fahrgemeinschaften')], default=0)),
            ],
            options={
                'verbose_name_plural': 'Freizeiten',
                'verbose_name': 'Freizeit',
            },
        ),
        migrations.CreateModel(
            name='RegistrationPassword',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('password', models.CharField(default='', max_length=20, unique=True, verbose_name='Password')),
                ('group', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='members.group')),
            ],
            options={
                'verbose_name': 'registration password',
                'verbose_name_plural': 'registration passwords',
            },
        ),
        migrations.CreateModel(
            name='MemberUnconfirmedProxy',
            fields=[
            ],
            options={
                'verbose_name': 'Unconfirmed registration',
                'verbose_name_plural': 'Unconfirmed registrations',
                'proxy': True,
                'indexes': [],
                'constraints': [],
                'permissions': (('may_manage_all_registrations', 'Can view and manage all unconfirmed registrations.'),),
            },
            bases=('members.member',),
        ),
        migrations.AddField(
            model_name='group',
            name='leiters',
            field=models.ManyToManyField(blank=True, related_name='leited_groups', to='members.Member', verbose_name='youth leaders'),
        ),
    ]
