# Generated by Django 2.1.5 on 2019-04-17 23:46

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('teams', '0005_auto_20190418_0746'),
        ('orgs', '0005_auto_20190418_0728'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Requirement',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('title', models.CharField(max_length=128)),
                ('description', models.TextField(null=True)),
                ('start_date', models.DateTimeField()),
                ('end_date', models.DateTimeField()),
                ('important', models.IntegerField(verbose_name='重要性')),
                ('priority', models.IntegerField(verbose_name='优先级')),
                ('status', models.CharField(choices=[('0', '0'), ('1', '1'), ('2', '2'), ('3', '3'), ('4', '4'), ('5', '5')], max_length=2)),
                ('link_id', models.CharField(max_length=128, verbose_name='关联redmine')),
                ('link_url', models.CharField(max_length=128, verbose_name='关联redmine url')),
                ('assignee_teams', models.ManyToManyField(related_name='assignee_reqs', to='teams.Team', verbose_name='指派小组')),
                ('created_by', models.ForeignKey(on_delete=models.SET(-999), to=settings.AUTH_USER_MODEL)),
                ('org', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='orgs.Organization')),
                ('owner', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='own_reqs', to=settings.AUTH_USER_MODEL, verbose_name='责任人')),
                ('parent', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='child_req', to='requirements.Requirement', verbose_name='上级需求')),
                ('relate', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='relate_req', to='requirements.Requirement', verbose_name='关联需求')),
            ],
            options={
                'verbose_name': '业务需求表',
                'db_table': 'requirements',
            },
        ),
    ]
