# Generated by Django 3.0.5 on 2020-07-27 23:36

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Email',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('address', models.EmailField(help_text='Email address', max_length=254, verbose_name='Address')),
                ('is_primary', models.BooleanField(default=False, help_text='Is this primary?', verbose_name='Is Primary')),
                ('name', models.CharField(blank=True, help_text='Name of email (ex: "Work", "Home", "Mobile")', max_length=15, verbose_name='Name')),
            ],
            options={
                'verbose_name': 'email',
                'ordering': ['entity', 'is_primary', 'address'],
            },
        ),
        migrations.CreateModel(
            name='Entity',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('entity_type', models.IntegerField(choices=[(1, 'Organization'), (2, 'Department'), (3, 'Division'), (10, 'Individual')], help_text='The type of entity', null=True, verbose_name='Type')),
                ('full_name', models.CharField(help_text='Full name, ex: "Benjamin Goldberg", "Technology and Content Strategy"', max_length=75, verbose_name='Full Name')),
                ('short_name', models.CharField(help_text='A familiar name, short name, or abbreviation, ex:"Ben", "TCS"', max_length=10, verbose_name='Short Name')),
                ('sort_code', models.CharField(blank=True, default='|', help_text='A string to use for sorting in a list. ex: "_", "A", "zzz", "|".  Default sorting will be on type, sort code, then full name ', max_length=10, verbose_name='Sort Code')),
                ('job_title', models.CharField(blank=True, help_text="The person's job title", max_length=50, verbose_name='Job Title')),
                ('member_of', models.ForeignKey(blank=True, help_text='The entity of which this entity is a part', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='member', to='entities.Entity')),
                ('supervisor', models.ForeignKey(blank=True, help_text="The person who is this person's supervisor", limit_choices_to={'entity_type': 10}, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='subordinate', to='entities.Entity')),
            ],
            options={
                'ordering': ['entity_type', 'sort_code', 'full_name'],
            },
        ),
        migrations.CreateModel(
            name='Roll',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(help_text='The name of this roll', max_length=50, verbose_name='name')),
                ('sort_code', models.CharField(blank=True, default='|', help_text='A string to use for sorting in a list. ex: "_", "A", "zzz", "|".  Default sorting will be on sort code, name ', max_length=10, verbose_name='Sort Code')),
            ],
            options={
                'ordering': ['sort_code', 'name'],
            },
        ),
        migrations.CreateModel(
            name='VoicePhone',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('number', models.CharField(help_text='Ten digit phone number', max_length=15, verbose_name='Number')),
                ('is_primary', models.BooleanField(default=False, help_text='Is this primary?', verbose_name='Is Primary')),
                ('extension', models.CharField(help_text="Extension and extra calling info (ie 'x304', 'Ask for the Floor Manger')", max_length=30, verbose_name='Extension')),
                ('name', models.CharField(blank=True, help_text='Name of phone (ex: "Work", "Home", "Mobile")', max_length=15, verbose_name='Name')),
                ('entity', models.ForeignKey(blank=True, help_text='The entity who has this phone number', null=True, on_delete=django.db.models.deletion.SET_NULL, to='entities.Entity', verbose_name='Entity')),
            ],
            options={
                'verbose_name': 'voice phone',
                'ordering': ['entity', 'is_primary', 'number'],
            },
        ),
        migrations.CreateModel(
            name='SMSPhone',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('number', models.CharField(help_text='Ten digit phone number', max_length=15, verbose_name='Number')),
                ('is_primary', models.BooleanField(default=False, help_text='Is this primary?', verbose_name='Is Primary')),
                ('name', models.CharField(blank=True, help_text='Name of phone (ex: "Work", "Home", "Mobile")', max_length=15, verbose_name='Name')),
                ('entity', models.ForeignKey(blank=True, help_text='The entity who has this phone number', null=True, on_delete=django.db.models.deletion.SET_NULL, to='entities.Entity', verbose_name='Entity')),
            ],
            options={
                'verbose_name': 'SMS phone',
                'ordering': ['entity', 'is_primary', 'number'],
            },
        ),
        migrations.CreateModel(
            name='EntityXRoll',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('entity', models.ForeignKey(help_text='The entity that is on this roll', on_delete=django.db.models.deletion.CASCADE, related_name='entityxroll', to='entities.Entity')),
                ('roll', models.ForeignKey(help_text='The roll that includes this entity', on_delete=django.db.models.deletion.CASCADE, related_name='entityxroll', to='entities.Roll')),
            ],
        ),
    ]
