# Generated by Django 2.0.2 on 2019-07-29 15:40

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


class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='api_test_result',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('case_result', models.CharField(max_length=200)),
                ('error_info', models.CharField(max_length=200)),
                ('response_body', models.CharField(max_length=500)),
                ('case_start_time', models.DateTimeField()),
                ('case_end_time', models.DateTimeField()),
                ('case_run_time', models.DateTimeField()),
            ],
        ),
        migrations.CreateModel(
            name='CarryTask',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('task_name', models.CharField(max_length=200)),
                ('htmlreport', models.CharField(default='', max_length=200)),
                ('successlogname', models.CharField(default='', max_length=200)),
                ('errorlogname', models.CharField(default='', max_length=200)),
                ('stepcountall', models.IntegerField(default=0)),
                ('stepcountnow', models.IntegerField(default=0)),
                ('out_id', models.CharField(default='', max_length=200)),
                ('update_time', models.DateTimeField(auto_now=True)),
                ('create_time', models.DateTimeField(auto_now_add=True)),
            ],
        ),
        migrations.CreateModel(
            name='Case',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('case_name', models.CharField(max_length=100)),
                ('api', models.CharField(max_length=100)),
                ('stepCount', models.IntegerField(default=0)),
                ('status', models.BooleanField()),
                ('version', models.CharField(max_length=20)),
                ('case_weights', models.IntegerField(default=0)),
                ('update_time', models.DateTimeField(auto_now=True)),
                ('create_time', models.DateTimeField(auto_now_add=True)),
                ('case_desc', models.CharField(blank=True, max_length=100)),
            ],
        ),
        migrations.CreateModel(
            name='Database',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('db_type', models.CharField(max_length=4)),
                ('db_typename', models.CharField(default='', max_length=20)),
                ('db_name', models.CharField(max_length=100)),
                ('db_ip', models.CharField(max_length=20)),
                ('db_port', models.CharField(max_length=20)),
                ('db_user', models.CharField(max_length=20)),
                ('db_password', models.CharField(max_length=20)),
                ('db_remark', models.CharField(default='', max_length=100)),
            ],
        ),
        migrations.CreateModel(
            name='Email',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('sender', models.CharField(max_length=100)),
                ('receivers', models.CharField(max_length=100)),
                ('host_dir', models.CharField(max_length=100)),
                ('email_port', models.CharField(default='', max_length=20)),
                ('username', models.CharField(max_length=100)),
                ('passwd', models.CharField(max_length=100)),
                ('Headerfrom', models.CharField(max_length=100)),
                ('Headerto', models.CharField(max_length=100)),
                ('subject', models.CharField(default='', max_length=100)),
            ],
        ),
        migrations.CreateModel(
            name='Environment',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('protocol', models.CharField(default='http', max_length=20)),
                ('env_ip', models.CharField(max_length=20)),
                ('env_host', models.CharField(max_length=40)),
                ('env_port', models.CharField(max_length=10)),
                ('env_desc', models.CharField(max_length=100)),
            ],
        ),
        migrations.CreateModel(
            name='LogAndHtmlfeedback',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('test_step', models.CharField(max_length=100)),
                ('test_status', models.IntegerField()),
                ('test_response', models.CharField(max_length=500)),
                ('test_carryTaskid', models.CharField(default='', max_length=40)),
                ('update_time', models.DateTimeField(auto_now=True)),
                ('create_time', models.DateTimeField(auto_now_add=True)),
            ],
        ),
        migrations.CreateModel(
            name='Modules',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('Modules_name', models.CharField(max_length=20, verbose_name='模块名')),
                ('Developer', models.CharField(blank=True, max_length=100, verbose_name='开发人员')),
                ('Modules_desc', models.CharField(blank=True, max_length=200, verbose_name='模块描述')),
                ('status', models.BooleanField(verbose_name='状态')),
            ],
            options={
                'verbose_name': '模块',
                'verbose_name_plural': '模块',
            },
        ),
        migrations.CreateModel(
            name='NoSql',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('Nosql_dataType', models.IntegerField()),
                ('Nosql_condition', models.IntegerField()),
                ('is_select', models.BooleanField()),
                ('variable', models.CharField(max_length=200)),
                ('Nosql', models.CharField(max_length=4000)),
                ('remake', models.CharField(max_length=200)),
                ('status', models.BooleanField()),
                ('update_time', models.DateTimeField(auto_now=True)),
                ('create_time', models.DateTimeField(auto_now_add=True)),
            ],
        ),
        migrations.CreateModel(
            name='NosqlDb',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('host', models.CharField(max_length=40)),
                ('port', models.CharField(max_length=10)),
                ('password', models.CharField(max_length=200)),
                ('NosqlDb_desc', models.CharField(max_length=500)),
            ],
        ),
        migrations.CreateModel(
            name='Project',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('project_name', models.CharField(max_length=20, verbose_name='项目名')),
                ('project_desc', models.CharField(blank=True, max_length=200, verbose_name='项目描述')),
                ('status', models.BooleanField(verbose_name='状态')),
            ],
            options={
                'verbose_name': '项目',
                'verbose_name_plural': '项目',
            },
        ),
        migrations.CreateModel(
            name='Reference_step',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('step_name', models.CharField(default='', max_length=100)),
                ('path', models.CharField(default='', max_length=100)),
                ('reference_step_name', models.CharField(default='', max_length=100)),
                ('variable', models.CharField(max_length=200)),
                ('update_time', models.DateTimeField(auto_now=True)),
                ('create_time', models.DateTimeField(auto_now_add=True)),
            ],
        ),
        migrations.CreateModel(
            name='Sql',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('db', models.CharField(default='', max_length=40)),
                ('db_remark', models.CharField(default='', max_length=100)),
                ('sql_condition', models.IntegerField()),
                ('is_select', models.BooleanField()),
                ('variable', models.CharField(max_length=200)),
                ('sql', models.CharField(max_length=4000)),
                ('remake', models.CharField(max_length=200)),
                ('status', models.BooleanField()),
                ('update_time', models.DateTimeField(auto_now=True)),
                ('create_time', models.DateTimeField(auto_now_add=True)),
            ],
        ),
        migrations.CreateModel(
            name='StatisticsData',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('casenumber', models.IntegerField()),
                ('stepnumber', models.IntegerField()),
                ('tasknumber', models.IntegerField()),
                ('carrynumber', models.IntegerField()),
                ('passnumber', models.IntegerField()),
                ('asserterrornumber', models.IntegerField()),
                ('failnumber', models.IntegerField()),
                ('errorratio', models.IntegerField()),
            ],
        ),
        migrations.CreateModel(
            name='Step',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('step_name', models.CharField(max_length=100)),
                ('step_desc', models.CharField(max_length=100)),
                ('steplevel', models.CharField(max_length=10)),
                ('method', models.CharField(max_length=10)),
                ('params', models.CharField(max_length=500)),
                ('headers', models.CharField(max_length=500)),
                ('files', models.CharField(max_length=500)),
                ('assert_response', models.CharField(max_length=4000)),
                ('api_dependency', models.CharField(default='', max_length=500)),
                ('sqlCount', models.IntegerField(default=0)),
                ('nosqlCount', models.IntegerField(default=0)),
                ('step_weights', models.IntegerField(default=0)),
                ('status', models.BooleanField()),
                ('update_time', models.DateTimeField(auto_now=True)),
                ('create_time', models.DateTimeField(auto_now_add=True)),
                ('case', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='request.Case')),
            ],
        ),
        migrations.CreateModel(
            name='Task',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('task_name', models.CharField(max_length=200)),
                ('uuid', models.CharField(default='', max_length=200)),
                ('out_id', models.CharField(default='', max_length=200)),
                ('carryId', models.IntegerField(default=0)),
                ('task_run_time_regular', models.CharField(max_length=100)),
                ('ip', models.CharField(default='', max_length=40)),
                ('Nosqldb', models.CharField(default='', max_length=40)),
                ('db', models.CharField(default='', max_length=40)),
                ('email', models.CharField(default='', max_length=40)),
                ('failcount', models.CharField(default='', max_length=40)),
                ('remark', models.CharField(max_length=200)),
                ('Nosqldb_desc', models.CharField(default='', max_length=400)),
                ('db_remark', models.CharField(default='', max_length=100)),
                ('env_desc', models.CharField(default='', max_length=100)),
                ('subject', models.CharField(default='', max_length=100)),
                ('status', models.BooleanField()),
                ('carrystatus', models.IntegerField(default=2)),
                ('update_time', models.DateTimeField(auto_now=True)),
                ('create_time', models.DateTimeField(auto_now_add=True)),
                ('case', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='request.Case')),
            ],
        ),
        migrations.AddField(
            model_name='sql',
            name='step',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='request.Step'),
        ),
        migrations.AddField(
            model_name='reference_step',
            name='step',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='request.Step'),
        ),
        migrations.AddField(
            model_name='nosql',
            name='step',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='request.Step'),
        ),
        migrations.AddField(
            model_name='modules',
            name='Project',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='request.Project', verbose_name='项目名'),
        ),
        migrations.AddField(
            model_name='modules',
            name='Testers',
            field=models.ManyToManyField(blank=True, to=settings.AUTH_USER_MODEL, verbose_name='测试人员'),
        ),
        migrations.AddField(
            model_name='case',
            name='Modules',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='request.Modules'),
        ),
        migrations.AddField(
            model_name='api_test_result',
            name='case',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='request.Case'),
        ),
        migrations.AddField(
            model_name='api_test_result',
            name='step',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='request.Step'),
        ),
        migrations.AddField(
            model_name='api_test_result',
            name='task',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='request.Task'),
        ),
    ]
