# Generated by Django 2.2.6 on 2019-11-16 03:40

from django.db import migrations, models
import django.db.models.deletion
import localflavor.us.models
import phonenumber_field.modelfields
import uuid


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Discount',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('notes', models.TextField(blank=True, help_text='Only staff will be able to view these notes', null=True, verbose_name='Notes')),
                ('stripe_coupon_identifier', models.CharField(max_length=100)),
                ('name', models.CharField(max_length=30)),
                ('description', models.TextField(help_text='Who qualifies for this discount, and what are its terms?')),
                ('allow_family_memberships', models.BooleanField(default=False, verbose_name='Allow family memberships?')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='DuesPlan',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('notes', models.TextField(blank=True, help_text='Only staff will be able to view these notes', null=True, verbose_name='Notes')),
                ('stripe_plan_identifier', models.CharField(help_text="Don't change this.", max_length=100)),
                ('name', models.CharField(help_text='This text will appear in member-facing forms, so pick clear and descriptive.', max_length=30)),
                ('requires_setup_fee', models.BooleanField(default=True)),
                ('sort_priority', models.IntegerField(default=100)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Household',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('notes', models.TextField(blank=True, help_text='Only staff will be able to view these notes', null=True, verbose_name='Notes')),
                ('name', models.CharField(help_text='e.g. Team SkyNet', max_length=100, verbose_name='Name')),
                ('valid_through', models.DateTimeField()),
                ('status', models.CharField(choices=[('incomplete', 'Incomplete'), ('active', 'Active'), ('incomplete_expired', 'Incomplete (Expired)'), ('past_due', 'Past Due'), ('canceled', 'Canceled'), ('unpaid', 'Unpaid')], default='incomplete', max_length=50, verbose_name='Status')),
                ('auto_renew', models.BooleanField(default=False)),
                ('external_customer_identifier', models.CharField(max_length=100)),
                ('external_subscription_identifier', models.CharField(max_length=100)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Person',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('notes', models.TextField(blank=True, help_text='Only staff will be able to view these notes', null=True, verbose_name='Notes')),
                ('given_name', models.CharField(max_length=100, verbose_name='Given Name')),
                ('family_name', models.CharField(max_length=100, verbose_name='Family Name')),
                ('email', models.EmailField(max_length=254, verbose_name='Email Address')),
                ('member_since', models.DateField(verbose_name='Date Joined')),
                ('address_street1', models.CharField(max_length=100, verbose_name='Street Address')),
                ('address_street2', models.CharField(blank=True, max_length=100, null=True, verbose_name='Street Address 2')),
                ('address_city', models.CharField(max_length=100, verbose_name='City')),
                ('address_state', localflavor.us.models.USStateField(max_length=2, verbose_name='State')),
                ('address_zip', localflavor.us.models.USZipCodeField(max_length=10, verbose_name='Zip Code')),
                ('phone_number', phonenumber_field.modelfields.PhoneNumberField(max_length=128, region=None)),
                ('phone_can_receive_sms', models.BooleanField(default=False)),
                ('emergency_contact_name', models.CharField(max_length=100)),
                ('emergency_contact_phone', phonenumber_field.modelfields.PhoneNumberField(max_length=128, region=None)),
                ('keyfob_code', models.CharField(max_length=100, verbose_name='Keyfob Code')),
                ('household', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='membership.Household')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='StudentTeam',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('notes', models.TextField(blank=True, help_text='Only staff will be able to view these notes', null=True, verbose_name='Notes')),
                ('name', models.CharField(help_text='e.g. Team SkyNet', max_length=100, verbose_name='Name')),
                ('valid_through', models.DateTimeField()),
                ('status', models.CharField(choices=[('incomplete', 'Incomplete'), ('active', 'Active'), ('incomplete_expired', 'Incomplete (Expired)'), ('past_due', 'Past Due'), ('canceled', 'Canceled'), ('unpaid', 'Unpaid')], default='incomplete', max_length=50, verbose_name='Status')),
                ('organization', models.CharField(help_text='e.g. Mounds View High School', max_length=50, verbose_name='Organization Name')),
                ('authorized_at', models.DateField(help_text='When did the board approve this team?', verbose_name='Date Authorized')),
                ('contact', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='administered_studentteam', to='membership.Person')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.AddField(
            model_name='person',
            name='student_team',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='membership.StudentTeam'),
        ),
        migrations.CreateModel(
            name='Invitation',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('notes', models.TextField(blank=True, help_text='Only staff will be able to view these notes', null=True, verbose_name='Notes')),
                ('given_name', models.CharField(max_length=100, verbose_name='First Name')),
                ('family_name', models.CharField(max_length=100, verbose_name='Last Name')),
                ('email', models.EmailField(max_length=254, verbose_name='Email Address')),
                ('accepted_at', models.DateTimeField(blank=True, null=True)),
                ('household', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='membership.Household')),
                ('student_team', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='membership.StudentTeam')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.AddField(
            model_name='household',
            name='contact',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='administered_household', to='membership.Person'),
        ),
        migrations.AddField(
            model_name='household',
            name='discount',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='membership.Discount'),
        ),
        migrations.AddField(
            model_name='household',
            name='dues_plan',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='membership.DuesPlan'),
        ),
    ]
