# Generated by Django 2.1.1 on 2018-10-29 07:59

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


class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Comment',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('updated', models.DateTimeField(auto_now=True)),
                ('uuid', models.UUIDField(default=uuid.uuid4, editable=False)),
                ('obj_uuid', models.UUIDField(default='')),
                ('content', martor.models.MartorField(default='', verbose_name='Commentaire')),
                ('author', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL, verbose_name='Auteur')),
            ],
            options={
                'verbose_name': 'commentaire',
                'verbose_name_plural': 'commentaires',
                'ordering': ('-created',),
            },
        ),
        migrations.CreateModel(
            name='Epic',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('updated', models.DateTimeField(auto_now=True)),
                ('uuid', models.UUIDField(default=uuid.uuid4, editable=False)),
                ('name', models.CharField(default='', max_length=200, verbose_name='Nom')),
                ('size', models.CharField(choices=[('XXS', 'XXS (< 1 sprints)'), ('XS', 'XS (1 sprint)'), ('S', 'S (1-2 sprints)'), ('M', 'M (2-3 sprints)'), ('L', 'L (3-4 sprints)'), ('XL', 'XL (4-6 sprints)'), ('XXL', 'XXL  (> 6 sprints)')], default='M', max_length=10, verbose_name='Taille')),
                ('value', models.IntegerField(default=0, verbose_name='Valeur')),
                ('description', martor.models.MartorField(blank=True, default='', verbose_name='Description')),
                ('closed', models.BooleanField(default=False, verbose_name='Clôturée')),
            ],
            options={
                'verbose_name': 'epic',
                'verbose_name_plural': 'epics',
                'ordering': ('-value',),
            },
        ),
        migrations.CreateModel(
            name='Project',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('updated', models.DateTimeField(auto_now=True)),
                ('uuid', models.UUIDField(default=uuid.uuid4, editable=False)),
                ('name', models.CharField(max_length=200)),
                ('description', martor.models.MartorField(blank=True, default='', verbose_name='Description')),
                ('color', models.CharField(default='#f6755e', max_length=7)),
            ],
            options={
                'verbose_name': 'projet',
                'verbose_name_plural': 'projets',
            },
        ),
        migrations.CreateModel(
            name='Sprint',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('updated', models.DateTimeField(auto_now=True)),
                ('uuid', models.UUIDField(default=uuid.uuid4, editable=False)),
                ('date_start', models.DateField()),
                ('date_end', models.DateField()),
                ('retro', martor.models.MartorField(blank=True, default='', verbose_name='Bilan / Rétrospective')),
            ],
            options={
                'verbose_name_plural': 'sprints',
                'ordering': ('-date_start',),
            },
        ),
        migrations.CreateModel(
            name='Story',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('updated', models.DateTimeField(auto_now=True)),
                ('uuid', models.UUIDField(default=uuid.uuid4, editable=False)),
                ('name', models.CharField(default='', max_length=200, verbose_name='Nom')),
                ('weight', models.IntegerField(blank=True, choices=[(1, 1), (2, 2), (3, 3), (5, 5), (8, 8), (13, 13), (21, 21)], verbose_name='Poids')),
                ('description', martor.models.MartorField(blank=True, default='', verbose_name='Description')),
                ('closed', models.BooleanField(default=False, verbose_name='Clôturée')),
                ('assignees', models.ManyToManyField(blank=True, related_name='assigned', to=settings.AUTH_USER_MODEL, verbose_name='Assignés')),
                ('author', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='stories', related_query_name='story', to=settings.AUTH_USER_MODEL, verbose_name='Auteur')),
                ('epic', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='stories', to='main.Epic', verbose_name='Epic')),
                ('sprints', models.ManyToManyField(blank=True, related_name='stories', related_query_name='story', to='main.Sprint', verbose_name='Sprints')),
            ],
            options={
                'verbose_name': 'story',
                'verbose_name_plural': 'stories',
                'ordering': ('closed', '-updated'),
            },
        ),
        migrations.AddField(
            model_name='epic',
            name='project',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.PROTECT, to='main.Project', verbose_name='Projet'),
        ),
    ]
