# -*- coding: utf-8 -*-
# pylint: disable=invalid-name, missing-docstring, line-too-long
# Generated by Django 1.9.6 on 2016-05-20 14:15
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Association',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('dts_insert', models.DateTimeField(auto_now_add=True)),
                ('dts_update', models.DateTimeField(blank=True, null=True)),
                ('dts_delete', models.DateTimeField(blank=True, null=True)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Member',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('dts_insert', models.DateTimeField(auto_now_add=True)),
                ('dts_update', models.DateTimeField(blank=True, null=True)),
                ('dts_delete', models.DateTimeField(blank=True, null=True)),
                ('uid_verifier', models.UUIDField(default=uuid.uuid4, null=True, unique=True)),
                ('has_accepted', models.BooleanField(default=False)),
                ('org_managers', models.BooleanField(default=False)),
                ('hrm_managers', models.BooleanField(default=False)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Organisation',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('dts_insert', models.DateTimeField(auto_now_add=True)),
                ('dts_update', models.DateTimeField(blank=True, null=True)),
                ('dts_delete', models.DateTimeField(blank=True, null=True)),
                ('label', models.CharField(max_length=128, unique=True)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.AddField(
            model_name='member',
            name='organisation',
            field=models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, related_name='member', to='django_associations.Organisation'),
        ),
        migrations.AddField(
            model_name='member',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='association_member', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='association',
            name='associations',
            field=models.ManyToManyField(blank=True, related_name='association_associations', to='django_associations.Organisation'),
        ),
        migrations.AddField(
            model_name='association',
            name='organisation',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='association_organisation', to='django_associations.Organisation'),
        ),
    ]
