# Generated by Django 2.1.4 on 2019-01-16 01:48

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='AuditProcess',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100, verbose_name='流程名称')),
                ('auditorder', models.IntegerField(default=1, verbose_name='审核顺序')),
            ],
            options={
                'verbose_name': '审核流程',
                'verbose_name_plural': '审核流程',
            },
        ),
        migrations.CreateModel(
            name='AuditRecodr',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('caseid', models.IntegerField(verbose_name='工单ID')),
                ('currentaudituser', models.CharField(max_length=32, verbose_name='当前审批人')),
                ('historaudituser', models.CharField(max_length=32, verbose_name='历史审批人')),
                ('status', models.IntegerField(default=0, verbose_name='审批节点')),
            ],
            options={
                'verbose_name': '审批记录',
                'verbose_name_plural': '审批记录',
            },
        ),
        migrations.CreateModel(
            name='CaseType',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=32, verbose_name='工单名称')),
            ],
            options={
                'verbose_name': '工单类型',
                'verbose_name_plural': '工单类型',
            },
        ),
        migrations.CreateModel(
            name='User',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('username', models.CharField(max_length=32, verbose_name='姓名')),
            ],
            options={
                'verbose_name': '用户',
                'verbose_name_plural': '用户',
            },
        ),
        migrations.CreateModel(
            name='WorkFlow',
            fields=[
                ('id', models.IntegerField(default=1, primary_key=True, serialize=False, verbose_name='工作流ID')),
                ('title', models.CharField(max_length=32, verbose_name='工作流名称')),
            ],
            options={
                'verbose_name': '工作流',
                'verbose_name_plural': '工作流',
            },
        ),
        migrations.AddField(
            model_name='casetype',
            name='auditmodle',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='gongdantest.WorkFlow', verbose_name='审核流程'),
        ),
        migrations.AddField(
            model_name='auditprocess',
            name='audituser',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='gongdantest.User', verbose_name='审批用户'),
        ),
        migrations.AddField(
            model_name='auditprocess',
            name='workflow',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='gongdantest.WorkFlow', verbose_name='所属工作流'),
        ),
        migrations.AlterUniqueTogether(
            name='auditprocess',
            unique_together={('auditorder', 'workflow')},
        ),
    ]
