# Generated by Django 2.0.6 on 2018-09-05 11:52

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


class Migration(migrations.Migration):

    dependencies = [
        ('repository', '0007_auto_20180904_1918'),
    ]

    operations = [
        migrations.CreateModel(
            name='Envlists',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('env', models.CharField(max_length=32, unique=True)),
            ],
            options={
                'verbose_name_plural': '环境列表',
            },
        ),
        migrations.CreateModel(
            name='Projects',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('project_name', models.CharField(max_length=32, unique=True)),
            ],
            options={
                'verbose_name_plural': '项目列表',
            },
        ),
        migrations.CreateModel(
            name='Workorders',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=32)),
                ('detail', models.TextField()),
                ('create_time', models.DateTimeField()),
                ('handler_role', models.CharField(blank=True, max_length=32, null=True)),
                ('finish_time', models.DateTimeField()),
                ('status', models.IntegerField(choices=[(1, '未处理'), (2, '处理中'), (3, '已处理')], default=1)),
                ('solution', models.TextField(null=True)),
                ('creator', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='repository.User')),
                ('env_label', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='repository.Envlists')),
                ('handler', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='h', to='repository.User')),
                ('project_name', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='repository.Projects')),
            ],
            options={
                'verbose_name_plural': '工单列表',
            },
        ),
    ]
