# Generated by Django 2.0 on 2018-03-22 00:26

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('programme_project', '0001_initial'),
        ('accounts', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='AccessLevel',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=5)),
                ('mode', models.CharField(choices=[(1, 'Read'), (2, 'Write')], default=(1, 'Read'), max_length=1)),
                ('description', models.CharField(max_length=45, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='ActiveProjectAccessDetails',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('modified', models.DateTimeField(auto_now=True)),
                ('uuid', models.UUIDField(null=True)),
                ('access_level', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='permissions.AccessLevel')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Contributor',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('modified', models.DateTimeField(auto_now=True)),
                ('queue_position', models.PositiveSmallIntegerField(default=1)),
                ('note', models.CharField(max_length=255, null=True)),
                ('employee', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='accounts.Employee')),
                ('project', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='programme_project.Project')),
            ],
        ),
        migrations.CreateModel(
            name='Signature',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('modified', models.DateTimeField(auto_now=True)),
                ('token', models.IntegerField(choices=[(1, 'approved'), (2, 'rejected'), (3, 'unsigned')])),
                ('contributor', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='permissions.Contributor')),
                ('project', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='programme_project.Project')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.AddField(
            model_name='activeprojectaccessdetails',
            name='contributor',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='permissions.Contributor'),
        ),
        migrations.AddField(
            model_name='activeprojectaccessdetails',
            name='project',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='programme_project.Project'),
        ),
        migrations.AlterUniqueTogether(
            name='contributor',
            unique_together={('employee', 'project')},
        ),
    ]
