# -*- coding: utf-8 -*-
# Generated by Django 1.11.6 on 2017-12-10 19:08
from __future__ import unicode_literals

import accounts.models
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0008_alter_user_username_max_length'),
    ]

    operations = [
        migrations.CreateModel(
            name='Account',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('password', models.CharField(max_length=128, verbose_name='password')),
                ('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')),
                ('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')),
                ('email', models.EmailField(max_length=255, unique=True)),
                ('first_name', models.CharField(blank=True, max_length=255)),
                ('last_name', models.CharField(blank=True, max_length=255)),
                ('is_staff', models.BooleanField(default=False)),
                ('is_active', models.BooleanField(default=True)),
                ('permission_irf_view', models.BooleanField(default=False)),
                ('permission_irf_add', models.BooleanField(default=False)),
                ('permission_irf_edit', models.BooleanField(default=False)),
                ('permission_irf_delete', models.BooleanField(default=False)),
                ('permission_vif_view', models.BooleanField(default=False)),
                ('permission_vif_add', models.BooleanField(default=False)),
                ('permission_vif_edit', models.BooleanField(default=False)),
                ('permission_vif_delete', models.BooleanField(default=False)),
                ('permission_person_match', models.BooleanField(default=False)),
                ('permission_accounts_manage', models.BooleanField(default=False)),
                ('permission_receive_investigation_alert', models.BooleanField(default=False)),
                ('permission_receive_legal_alert', models.BooleanField(default=False)),
                ('permission_border_stations_view', models.BooleanField(default=False)),
                ('permission_border_stations_add', models.BooleanField(default=False)),
                ('permission_border_stations_edit', models.BooleanField(default=False)),
                ('permission_border_stations_delete', models.BooleanField(default=False)),
                ('permission_address2_manage', models.BooleanField(default=False)),
                ('permission_budget_view', models.BooleanField(default=False)),
                ('permission_budget_add', models.BooleanField(default=False)),
                ('permission_budget_edit', models.BooleanField(default=False)),
                ('permission_budget_delete', models.BooleanField(default=False)),
                ('permission_can_receive_mdf', models.BooleanField(default=False)),
                ('date_joined', models.DateTimeField(default=django.utils.timezone.now)),
                ('activation_key', models.CharField(default=accounts.models.make_activation_key, max_length=40)),
                ('groups', models.ManyToManyField(blank=True, help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_name='user_set', related_query_name='user', to='auth.Group', verbose_name='groups')),
            ],
            options={
                'verbose_name': 'account',
                'verbose_name_plural': 'accounts',
            },
        ),
        migrations.CreateModel(
            name='Alert',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('code', models.CharField(max_length=255, unique=True)),
                ('email_template', models.CharField(max_length=255)),
            ],
            options={
                'verbose_name': 'alert',
                'verbose_name_plural': 'alerts',
            },
        ),
        migrations.CreateModel(
            name='DefaultPermissionsSet',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255, unique=True)),
                ('permission_irf_view', models.BooleanField(default=False)),
                ('permission_irf_add', models.BooleanField(default=False)),
                ('permission_irf_edit', models.BooleanField(default=False)),
                ('permission_irf_delete', models.BooleanField(default=False)),
                ('permission_vif_view', models.BooleanField(default=False)),
                ('permission_vif_add', models.BooleanField(default=False)),
                ('permission_vif_edit', models.BooleanField(default=False)),
                ('permission_vif_delete', models.BooleanField(default=False)),
                ('permission_person_match', models.BooleanField(default=False)),
                ('permission_accounts_manage', models.BooleanField(default=False)),
                ('permission_receive_investigation_alert', models.BooleanField(default=False)),
                ('permission_receive_legal_alert', models.BooleanField(default=False)),
                ('permission_border_stations_view', models.BooleanField(default=False)),
                ('permission_border_stations_add', models.BooleanField(default=False)),
                ('permission_border_stations_edit', models.BooleanField(default=False)),
                ('permission_border_stations_delete', models.BooleanField(default=False)),
                ('permission_address2_manage', models.BooleanField(default=False)),
                ('permission_budget_view', models.BooleanField(default=False)),
                ('permission_budget_add', models.BooleanField(default=False)),
                ('permission_budget_edit', models.BooleanField(default=False)),
                ('permission_budget_delete', models.BooleanField(default=False)),
                ('permission_can_receive_mdf', models.BooleanField(default=False)),
            ],
        ),
        migrations.AddField(
            model_name='alert',
            name='permissions_group',
            field=models.ManyToManyField(to='accounts.DefaultPermissionsSet'),
        ),
        migrations.AddField(
            model_name='account',
            name='user_designation',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='accounts', to='accounts.DefaultPermissionsSet'),
        ),
        migrations.AddField(
            model_name='account',
            name='user_permissions',
            field=models.ManyToManyField(blank=True, help_text='Specific permissions for this user.', related_name='user_set', related_query_name='user', to='auth.Permission', verbose_name='user permissions'),
        ),
    ]
