# -*- coding: utf-8 -*-
from __future__ import unicode_literals

import django.contrib.auth.models
import django.core.validators
import django.utils.timezone
from django.conf import settings
from django.db import models, migrations

import membership.models
import utils


class Migration(migrations.Migration):
    dependencies = [
        ('auth', '0006_require_contenttypes_0002'),
    ]

    operations = [
        migrations.CreateModel(
            name='Membership',
            fields=[
                ('id', models.AutoField(verbose_name='ID',
                                        serialize=False, auto_created=True,
                                        primary_key=True)),
                ('password', models.CharField(
                    max_length=128, verbose_name='password')),
                ('last_login', models.DateTimeField(
                    null=True, verbose_name='last login', blank=True)),
                ('is_superuser', models.BooleanField(default=False,
                                                     help_text='Designates that this user has all permissions without explicitly assigning them.',
                                                     verbose_name='superuser status')),
                ('username', models.CharField(error_messages={
                    'unique': 'A user with that username already exists.'},
                                              max_length=30, validators=[
                        django.core.validators.RegexValidator(
                            '^[\\w.@+-]+$',
                            'Enter a valid username. This value may contain only letters, numbers and @/./+/-/_ characters.',
                            'invalid')],
                                              help_text='Required. 30 characters or fewer. Letters, digits and @/./+/-/_ only.',
                                              unique=True,
                                              verbose_name='username')),
                ('first_name', models.CharField(max_length=30,
                                                verbose_name='first name',
                                                blank=True)),
                ('last_name', models.CharField(max_length=30,
                                               verbose_name='last name',
                                               blank=True)),
                ('email', models.EmailField(max_length=254,
                                            verbose_name='email address',
                                            blank=True)),
                ('is_staff', models.BooleanField(default=False,
                                                 help_text='Designates whether the user can log into this admin site.',
                                                 verbose_name='staff status')),
                ('is_active', models.BooleanField(
                    default=True,
                    help_text='Designates whether this user should be treated as active. Unselect this instead of deleting accounts.',
                    verbose_name='active')),
                ('date_joined', models.DateTimeField(
                    default=django.utils.timezone.now,
                    verbose_name='date joined')),
                ('gender',
                 models.CharField(max_length=1, verbose_name='Geschlecht',
                                  choices=[
                                      (b'm', 'M\xe4nnlich'),
                                      (b'f', 'Weiblich')])),
                ('website', models.URLField(blank=True)),
                ('avatar', models.ImageField(storage=utils.OverwriteStorage(
                ), null=True, upload_to=membership.models.get_upload_path,
                    blank=True)),
                ('membership', models.BooleanField(default=False,
                                                   help_text='Ja, ich bin mit den Statuen einverstanden und m\xf6chte Mitglied werden.',
                                                   verbose_name='Mitgliedschaft')),
                ('birthday', models.DateField(null=True,
                                              verbose_name='Geburtstag',
                                              blank=True)),
                ('telephone', models.CharField(max_length=30,
                                               null=True,
                                               verbose_name='Telefon',
                                               blank=True)),
                ('street_name', models.CharField(max_length=75,
                                                 null=True,
                                                 verbose_name='Adresse',
                                                 blank=True)),
                ('post_code', models.PositiveSmallIntegerField(
                    null=True, verbose_name='Postleitzahl', blank=True)),
                ('city', models.CharField(max_length=75,
                                          null=True, verbose_name='Ort',
                                          blank=True)),
                ('deposit', models.PositiveSmallIntegerField(
                    default=0, editable=False)),
                ('registration_date', models.DateField(auto_now_add=True)),
                ('paid_until', models.DateField(null=True,
                                                verbose_name='Bezahlt bis',
                                                blank=True)),
                ('confirmed', models.BooleanField(default=False,
                                                  help_text='Diese Person hat ihre Mitgliedschaft bezahlt',
                                                  verbose_name='Best\xe4tigt')),
                ('comment', models.TextField(blank=True)),
                ('groups', models.ManyToManyField(related_query_name='user',
                                                  related_name='user_set',
                                                  to='auth.Group', blank=True,
                                                  help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.',
                                                  verbose_name='groups')),
                ('user_permissions',
                 models.ManyToManyField(related_query_name='user',
                                        related_name='user_set',
                                        to='auth.Permission',
                                        blank=True,
                                        help_text='Specific permissions for this user.',
                                        verbose_name='user permissions')),
            ],
            options={
                'ordering': ('last_name', 'first_name'),
                'swappable': 'AUTH_USER_MODEL',
                'verbose_name': 'Mitgliedschaft',
                'verbose_name_plural': 'Mitgliedschaften',
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='ActivationRequest',
            fields=[
                ('id', models.AutoField(verbose_name='ID',
                                        serialize=False, auto_created=True,
                                        primary_key=True)),
                ('activation_key', models.CharField(
                    max_length=40, verbose_name='Aktivierungsschl\xfcssel')),
                ('user', models.OneToOneField(
                    verbose_name='Benutzer', to=settings.AUTH_USER_MODEL,
                    on_delete=models.CASCADE)),
            ],
            options={
                'verbose_name': 'Ausstehende Aktivierung',
                'verbose_name_plural': 'Wartende Aktivierungen',
            },
        ),
    ]
