# Generated by Django 2.1.1 on 2018-09-18 01:50

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Application',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date_submitted', models.DateField(blank=True, help_text='When was this application was submitted?', null=True, verbose_name='Date Submitted')),
                ('image', models.ImageField(help_text='What is the image for this application?', upload_to='applications', verbose_name='Image')),
            ],
        ),
        migrations.CreateModel(
            name='District',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(help_text='What is the name of this district?', max_length=40, verbose_name='Name')),
                ('van_id', models.CharField(blank=True, help_text='What is the VAN id for this district?', max_length=30, null=True, verbose_name='VAN ID')),
            ],
            options={
                'ordering': ['districttype', 'name'],
            },
        ),
        migrations.CreateModel(
            name='DistrictType',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(help_text='What is the name of this type of  district?', max_length=40, verbose_name='Name')),
                ('order', models.SmallIntegerField(help_text='In what position should this appear on a list?', verbose_name='Display Order')),
            ],
            options={
                'ordering': ['order', 'name'],
            },
        ),
        migrations.CreateModel(
            name='Dues',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date_effective', models.DateField(help_text='What is the effective date of the payment?  This may be different (often later) than the actual date of payment.', verbose_name='Effective Date')),
                ('date_checked', models.DateField(blank=True, help_text='What is the date on the check or the date of electronic transfer if applicable?  This is used for helping with locating the payment information', null=True, verbose_name='Check or Transaction Date')),
            ],
        ),
        migrations.CreateModel(
            name='Email',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('address', models.CharField(help_text="What is this person's email address?", max_length=40, verbose_name='Email Address')),
                ('primary', models.BooleanField(help_text='Is this the primary email address?', verbose_name='Primary')),
                ('restrict', models.BooleanField(help_text='Should this email address not be used for email lists and automated emails?', verbose_name='Restrict Use')),
            ],
            options={
                'ordering': ('restrict', '-primary', 'address'),
            },
        ),
        migrations.CreateModel(
            name='Event',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(help_text='What is the name of this event?', max_length=40, verbose_name='Name')),
            ],
            options={
                'ordering': ['event_type', 'name'],
            },
        ),
        migrations.CreateModel(
            name='EventType',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(help_text='What is the name of this type of event?', max_length=40, verbose_name='Name')),
                ('order', models.SmallIntegerField(help_text='In what position should this display (low numbers first by default)?', verbose_name='Display Order')),
            ],
            options={
                'ordering': ['order', 'name'],
            },
        ),
        migrations.CreateModel(
            name='Group',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(help_text='What is the name of this group?', max_length=40, verbose_name='Name')),
                ('protect', models.BooleanField(default=False, help_text='Should this group be protected from edits and deletions from non-staff users?', verbose_name='Protect from Edit')),
            ],
            options={
                'ordering': ['grouptype__order', 'name'],
            },
        ),
        migrations.CreateModel(
            name='GroupMembership',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('role_type', models.CharField(blank=True, choices=[('', 'Unknown or N/A'), ('aA', 'Member'), ('4O', 'Officer'), ('2L', 'Chairperson')], help_text='What type of role does this person hold in the group?', max_length=2, null=True, verbose_name='Role Type')),
                ('role_name', models.CharField(blank=True, help_text='What is the name of the role that the person holds in the group? This can be left blank, in which case the role type will be used.', max_length=40, null=True, verbose_name='Role Name')),
                ('group', models.ForeignKey(help_text='What is the group of which the person is a member?', on_delete=django.db.models.deletion.CASCADE, to='sdcpeople.Group')),
            ],
            options={
                'ordering': ['group__grouptype__order', 'role_type', 'person'],
            },
        ),
        migrations.CreateModel(
            name='GroupType',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(help_text='What is the name of this type of group?', max_length=40, verbose_name='Name')),
                ('order', models.SmallIntegerField(help_text='Where should groups of this type display on lists (low numbers first by default)?', verbose_name='Display Order')),
            ],
            options={
                'ordering': ['order', 'name'],
            },
        ),
        migrations.CreateModel(
            name='MembershipType',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(help_text='What is the name of this status?', max_length=40, verbose_name='Name')),
                ('order', models.SmallIntegerField(help_text='In what position should this display (low numbers first by default)?', verbose_name='Display Order')),
                ('counts_quorum', models.BooleanField(help_text='Should people with this status and an appropriate membership type count towards a quorum?', verbose_name='Counts as Quorum')),
            ],
        ),
        migrations.CreateModel(
            name='Params',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('last_searchstring', models.TextField(blank=True, help_text='What is url encoded string for this search?', null=True, verbose_name='Filter String')),
                ('user', models.OneToOneField(blank=True, help_text='Who is the user for this set of parameters?', null=True, on_delete=django.db.models.deletion.CASCADE, related_name='params', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Participation',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('role_type', models.CharField(blank=True, choices=[('', 'Unknown or N/A'), ('aA', 'Attendee'), ('8C', 'Contributer'), ('6V', 'Volunteer'), ('4O', 'Organizing Assistant'), ('2L', 'Organizer/Leader')], help_text='What type of role did the person perform at or for the event?', max_length=2, verbose_name='Role Type')),
                ('role_name', models.CharField(blank=True, help_text='What is the name of the role that the person performed at the event? This can be left blank, in which case the role type will be used.', max_length=40, null=True, verbose_name='Role Name')),
                ('event', models.ForeignKey(help_text='What is the event in which the person was a participant?', on_delete=django.db.models.deletion.CASCADE, to='sdcpeople.Event')),
            ],
            options={
                'ordering': ['event', 'role_type', 'person'],
            },
        ),
        migrations.CreateModel(
            name='PaymentMethod',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(help_text='What is the name of the type of payment?', max_length=40, verbose_name='Name')),
            ],
        ),
        migrations.CreateModel(
            name='Person',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(blank=True, help_text='What is this person\'s abbreviated title (ie "Mr.", "Ms.", "Dr.", "Rev.")?', max_length=12, verbose_name='Title')),
                ('first_name', models.CharField(help_text="What is this person's first name?", max_length=40, verbose_name='First Name')),
                ('middle_names', models.CharField(blank=True, help_text="What are this person's middle names or middle initials (whichever is prefered)?", max_length=40, verbose_name='Middle Names or Initials')),
                ('last_name', models.CharField(blank=True, help_text="What is this person's last name?", max_length=40, verbose_name='Family Name')),
                ('suffixes', models.CharField(blank=True, help_text='What are this  person\'s suffixes (ie "Sr.", "III", "Esq." )?', max_length=12, verbose_name='Suffixes')),
                ('prefered_name', models.CharField(blank=True, help_text='By what name would this person prefer to be called (ie "Ray")?', max_length=40, verbose_name='Prefered Name')),
                ('certificate_name', models.CharField(blank=True, help_text="How should this person's name appear on a certificate?", max_length=75, verbose_name='Name for Certificates')),
                ('letter_name', models.CharField(blank=True, help_text='How should this name appear in a letter (after "Dear") ( ie "Ms. Smith")?', max_length=50, verbose_name='Name for Letters')),
                ('birth_date', models.DateField(blank=True, help_text='When was this person born?', null=True, verbose_name='Date of Birth')),
                ('voting_address', models.CharField(blank=True, help_text="What is this person's voting address?", max_length=1000, verbose_name='Voting Address')),
                ('mailing_address', models.CharField(blank=True, help_text="What is this person's mailing address?", max_length=1000, verbose_name='Mailing Address')),
                ('vfvid', models.CharField(blank=True, help_text="What is this person's voter File VAN ID?", max_length=20, verbose_name='Voter File Van ID')),
                ('lcvid', models.CharField(blank=True, help_text="What is this person's local VAN ID (aka My Campaign ID)?", max_length=20, verbose_name='Local Van ID')),
                ('membershiptype', models.ForeignKey(help_text="What is the type of this person's membership?", null=True, on_delete=django.db.models.deletion.PROTECT, to='sdcpeople.MembershipType')),
            ],
            options={
                'ordering': ['last_name', 'first_name', 'middle_names'],
            },
        ),
        migrations.CreateModel(
            name='Residency',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('district', models.ForeignKey(blank=True, help_text='What is the district in which the person lives?', null=True, on_delete=django.db.models.deletion.CASCADE, to='sdcpeople.District')),
                ('person', models.ForeignKey(help_text='Who is the person who lives in this district?', on_delete=django.db.models.deletion.CASCADE, to='sdcpeople.Person')),
            ],
        ),
        migrations.CreateModel(
            name='Roster',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(help_text='What is the name of this roster?', max_length=40, verbose_name='Name')),
                ('is_public', models.BooleanField(help_text='Should other users have access to this roster?', verbose_name='Share')),
                ('user', models.ForeignKey(blank=True, help_text='To whom does this roster belong?', null=True, on_delete=django.db.models.deletion.CASCADE, related_name='roster_owner', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['user', 'name'],
            },
        ),
        migrations.CreateModel(
            name='RosterPlacement',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('person', models.ForeignKey(help_text='Who is the person who is a member of this roster?', on_delete=django.db.models.deletion.CASCADE, to='sdcpeople.Person')),
                ('roster', models.ForeignKey(help_text='What is the roster of which the person is a member?', on_delete=django.db.models.deletion.CASCADE, to='sdcpeople.Roster')),
            ],
            options={
                'ordering': ['roster', 'person'],
            },
        ),
        migrations.CreateModel(
            name='SavedSearch',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('searchstring', models.TextField(blank=True, help_text='What is url encoded string for this search?', null=True, verbose_name='Filter String')),
                ('name', models.CharField(help_text='What is the name of this search?', max_length=40, verbose_name='Name')),
                ('is_public', models.BooleanField(default=False, help_text='Should this search be available to all users?', verbose_name='Public')),
                ('hide_name', models.BooleanField(default=True, help_text='If made public, should your name be shown on the list? (Admins may want to set False)', verbose_name='List With Name')),
                ('user', models.ForeignKey(blank=True, help_text='To whom does this saved search belong?', null=True, on_delete=django.db.models.deletion.CASCADE, related_name='saved_search', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Txtmsg',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('number', models.CharField(help_text="What is this person's text number?", max_length=30, verbose_name='Number')),
                ('primary', models.BooleanField(help_text='Is this the primary text number?', verbose_name='Is Primary')),
                ('restrict', models.BooleanField(help_text='Should this number not be used for text lists and automated texts?', verbose_name='Restrict Use')),
                ('notes', models.CharField(blank=True, help_text='What are some important notes about this text number? ', max_length=255, verbose_name='Notes')),
                ('person', models.ForeignKey(help_text='For which person is this messaging device?', on_delete=django.db.models.deletion.CASCADE, to='sdcpeople.Person')),
            ],
            options={
                'verbose_name': 'Txtmsg',
                'ordering': ['restrict', '-primary', 'number'],
            },
        ),
        migrations.CreateModel(
            name='Vox',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('number', models.CharField(help_text="What is this person's voice phone number?  This can include extentions.", max_length=30, verbose_name='Number')),
                ('primary', models.BooleanField(help_text='Is this the primary voice number?', verbose_name='Is Primary')),
                ('restrict', models.BooleanField(help_text='Should this number not be used for call lists and automated calls?', verbose_name='Restrict Use')),
                ('notes', models.CharField(blank=True, help_text='What are notes about this phone (ex "Ask for the floor manger", or "Don\'t call before noon")? ', max_length=255, verbose_name='Notes')),
                ('person', models.ForeignKey(help_text='For which person is this phone?', on_delete=django.db.models.deletion.CASCADE, to='sdcpeople.Person')),
            ],
            options={
                'verbose_name_plural': 'voxes',
                'ordering': ['restrict', '-primary', 'number'],
            },
        ),
        migrations.AddField(
            model_name='participation',
            name='person',
            field=models.ForeignKey(help_text='Who is the person who participated in the event?', on_delete=django.db.models.deletion.CASCADE, to='sdcpeople.Person'),
        ),
        migrations.AddField(
            model_name='groupmembership',
            name='person',
            field=models.ForeignKey(help_text='Who is the person who is a member of this group?', on_delete=django.db.models.deletion.CASCADE, to='sdcpeople.Person'),
        ),
        migrations.AddField(
            model_name='group',
            name='grouptype',
            field=models.ForeignKey(blank=True, help_text='What type of group is this?', null=True, on_delete=django.db.models.deletion.SET_NULL, to='sdcpeople.GroupType'),
        ),
        migrations.AddField(
            model_name='group',
            name='parent',
            field=models.ForeignKey(blank=True, help_text='What is the parent of this group?', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='Child', to='sdcpeople.Group'),
        ),
        migrations.AddField(
            model_name='event',
            name='event_type',
            field=models.ForeignKey(help_text='What type of event is this?', null=True, on_delete=django.db.models.deletion.SET_NULL, to='sdcpeople.EventType'),
        ),
        migrations.AddField(
            model_name='email',
            name='person',
            field=models.ForeignKey(help_text='For which person is this email account?', on_delete=django.db.models.deletion.CASCADE, to='sdcpeople.Person'),
        ),
        migrations.AddField(
            model_name='dues',
            name='payment_method',
            field=models.ForeignKey(help_text='What method was used for this payment?', null=True, on_delete=django.db.models.deletion.SET_NULL, to='sdcpeople.PaymentMethod'),
        ),
        migrations.AddField(
            model_name='dues',
            name='person',
            field=models.ForeignKey(help_text='For which person was this dues payed?', on_delete=django.db.models.deletion.CASCADE, to='sdcpeople.Person'),
        ),
        migrations.AddField(
            model_name='district',
            name='districttype',
            field=models.ForeignKey(help_text='What type of district is this?', null=True, on_delete=django.db.models.deletion.SET_NULL, to='sdcpeople.DistrictType'),
        ),
        migrations.AddField(
            model_name='application',
            name='person',
            field=models.ForeignKey(help_text='For which person is this application?', on_delete=django.db.models.deletion.CASCADE, to='sdcpeople.Person'),
        ),
    ]
