# -*- coding: utf-8 -*-
# Generated by Django 1.10.3 on 2017-02-23 17:28
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Case',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('status', models.BooleanField(default=True)),
                ('type', models.CharField(choices=[('write', 'write'), ('read', 'read')], default='read', max_length=10)),
                ('name', models.CharField(max_length=50, unique=True)),
                ('preVar', models.TextField(blank=True, default='', max_length=1000)),
                ('result', models.BooleanField(default=True)),
                ('msg', models.TextField(blank=True, default='', max_length=1000)),
                ('size', models.IntegerField(default=0)),
                ('remark', models.TextField(blank=True, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='CaseStep',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('status', models.BooleanField(default=True)),
                ('case', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='sign.Case')),
            ],
        ),
        migrations.CreateModel(
            name='Config',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('status', models.BooleanField(default=False, unique=True)),
                ('write_mode', models.BooleanField(default=False)),
                ('name', models.CharField(max_length=50)),
                ('base_url', models.URLField()),
                ('base_headers', models.TextField(blank=True, default='', max_length=1000)),
                ('dataBase_host', models.CharField(max_length=15)),
                ('dataBase_port', models.CharField(max_length=4)),
                ('dataBase_name', models.CharField(max_length=50)),
                ('dataBase_user', models.CharField(max_length=50)),
                ('dataBase_pwd', models.CharField(max_length=20)),
                ('dataBase_type', models.CharField(choices=[('mysql', 'mysql'), ('sqlServer', 'sqlServer'), ('oracle', 'oracle')], default='sqlServer', max_length=10)),
            ],
        ),
        migrations.CreateModel(
            name='EnvParam',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('status', models.BooleanField(default=True)),
                ('range', models.CharField(choices=[('env', 'env')], default='env', max_length=4)),
                ('type', models.CharField(choices=[('str', 'str'), ('sql', 'sql'), ('time', 'time')], default='string', max_length=4)),
                ('name', models.CharField(max_length=20, unique=True)),
                ('value', models.CharField(max_length=200)),
                ('mark', models.CharField(blank=True, max_length=50, null=True)),
                ('real_value', models.CharField(blank=True, max_length=50, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Group',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('status', models.BooleanField(default=True)),
                ('is_init', models.BooleanField(default=False)),
                ('name', models.CharField(max_length=50, unique=True)),
                ('preVar', models.TextField(blank=True, default='', max_length=1000)),
                ('result', models.BooleanField(default=True)),
                ('msg', models.TextField(blank=True, default='', max_length=1000)),
                ('size', models.IntegerField(default=0)),
                ('remark', models.TextField(blank=True, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='GroupCase',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('status', models.BooleanField(default=True)),
                ('case', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='sign.Case')),
                ('group', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='sign.Group')),
            ],
        ),
        migrations.CreateModel(
            name='Step',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('status', models.BooleanField(default=True)),
                ('pre_var', models.TextField(blank=True, max_length=1000, null=True)),
                ('name', models.CharField(max_length=50, unique=True)),
                ('request_type', models.CharField(choices=[('get', 'get'), ('post', 'post')], default='get', max_length=4)),
                ('request_url', models.CharField(blank=True, max_length=200, null=True)),
                ('request_headers', models.TextField(blank=True, max_length=1000, null=True)),
                ('request_query', models.TextField(blank=True, max_length=1000, null=True)),
                ('request_body', models.TextField(blank=True, max_length=1000, null=True)),
                ('response_source', models.CharField(choices=[('text', 'text'), ('headers["Set-Cookie"]', 'headers["Set-Cookie"]')], default='text', max_length=50)),
                ('response_type', models.CharField(choices=[('string', 'string'), ('json', 'json'), ('html', 'html')], default='html', max_length=20)),
                ('post_var', models.TextField(blank=True, max_length=1000, null=True)),
                ('assert_var', models.TextField(blank=True, max_length=1000, null=True)),
                ('sleep', models.FloatField(default=0)),
                ('num', models.IntegerField(default=0)),
                ('interval', models.FloatField(default=0)),
                ('result', models.BooleanField(default=True)),
                ('msg', models.TextField(blank=True, default='', max_length=1000)),
                ('remark', models.TextField(blank=True, null=True)),
            ],
        ),
        migrations.AddField(
            model_name='casestep',
            name='step',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='sign.Step'),
        ),
    ]
