# -*- coding: utf-8 -*-
# Generated by Django 1.11.7 on 2018-07-16 16:54
from __future__ import unicode_literals

import datetime
from django.db import migrations, models


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')),
                ('title', models.CharField(max_length=30, verbose_name='用例标题')),
                ('case_type', models.CharField(choices=[('functional', '功能测试'), ('performance', '性能测试'), ('api', '接口测试'), ('safe', '安全测试'), ('other', '其他')], default='functional', max_length=20, verbose_name='用例类型')),
                ('test_type', models.CharField(blank=True, help_text='如：冒烟测试，场景测试等类型', max_length=20, verbose_name='测试类型')),
                ('test_precondition', models.TextField(blank=True, null=True, verbose_name='前置条件')),
                ('test_step', models.TextField(blank=True, null=True, verbose_name='测试步骤')),
                ('enclosure_title', models.CharField(blank=True, max_length=100, null=True, verbose_name='附件标题')),
                ('enclosure', models.FileField(blank=True, null=True, upload_to='case/enclosure', verbose_name='用例附件')),
                ('add_time', models.DateTimeField(default=datetime.datetime.now, verbose_name='添加时间')),
                ('update_time', models.DateTimeField(default=datetime.datetime(2018, 7, 16, 16, 54, 15, 881162), verbose_name='修改时间')),
            ],
            options={
                'verbose_name': '测试用例',
                'verbose_name_plural': '测试用例',
            },
        ),
        migrations.CreateModel(
            name='CaseReleteCaseSet',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('sort', models.IntegerField(default=0, verbose_name='序号')),
                ('add_time', models.DateTimeField(default=datetime.datetime.now, verbose_name='添加时间')),
            ],
            options={
                'verbose_name': '用例与测试集关联',
                'verbose_name_plural': '用例与测试集关联',
            },
        ),
        migrations.CreateModel(
            name='CaseReleteTestTask',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('sort', models.IntegerField(default=0, verbose_name='序号')),
                ('add_time', models.DateTimeField(default=datetime.datetime.now, verbose_name='添加时间')),
            ],
            options={
                'verbose_name': '用例与测试任务关联',
                'verbose_name_plural': '用例与测试任务关联',
            },
        ),
        migrations.CreateModel(
            name='CaseScript',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=50, verbose_name='脚本名称')),
                ('prefix_path', models.CharField(blank=True, max_length=200, null=True, verbose_name='脚本执行前缀路径')),
                ('script_file', models.FileField(blank=True, null=True, upload_to='case/script', verbose_name='脚本文件')),
                ('upload_file', models.BooleanField(default=False, verbose_name='是否上传文件')),
                ('execute_env', models.CharField(blank=True, help_text='产品型号如:android_mobile,android_pos,computer...', max_length=200, null=True, verbose_name='执行环境')),
                ('desc', models.TextField(blank=True, null=True, verbose_name='描述')),
                ('add_time', models.DateTimeField(default=datetime.datetime.now, verbose_name='添加时间')),
                ('update_time', models.DateTimeField(default=datetime.datetime(2018, 7, 16, 16, 54, 15, 882670), verbose_name='修改时间')),
            ],
            options={
                'verbose_name': '用例脚本',
                'verbose_name_plural': '用例脚本',
            },
        ),
        migrations.CreateModel(
            name='CaseSet',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(default='', help_text='用例集名', max_length=30, verbose_name='用例集名')),
                ('desc', models.TextField(default='', help_text='用例集描述', verbose_name='用例集描述')),
                ('add_time', models.DateTimeField(default=datetime.datetime.now, verbose_name='添加时间')),
            ],
            options={
                'verbose_name': '用例集',
                'verbose_name_plural': '用例集',
            },
        ),
        migrations.CreateModel(
            name='ModuleCategory',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(default='', help_text='模块名', max_length=30, verbose_name='模块名')),
                ('code', models.CharField(default='', help_text='模块code', max_length=30, verbose_name='模块code')),
                ('desc', models.TextField(default='', help_text='模块描述', verbose_name='模块描述')),
                ('add_time', models.DateTimeField(default=datetime.datetime.now, verbose_name='添加时间')),
            ],
            options={
                'verbose_name': '模块',
                'verbose_name_plural': '模块',
            },
        ),
        migrations.CreateModel(
            name='Product',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(default='', help_text='产品名', max_length=30, verbose_name='产品名')),
                ('code', models.CharField(default='', help_text='产品code', max_length=30, verbose_name='产品code')),
                ('desc', models.TextField(default='', help_text='产品描述', verbose_name='产品描述')),
                ('product_type', models.CharField(choices=[('mobile', '手机端应用'), ('web', '网页'), ('network', '网络设备'), ('other', '其他')], default='mobile', max_length=20, verbose_name='产品类型')),
                ('package_name', models.CharField(blank=True, help_text='如:apk包名', max_length=200, null=True, verbose_name='包名')),
                ('add_time', models.DateTimeField(default=datetime.datetime.now, verbose_name='添加时间')),
            ],
            options={
                'verbose_name': '产品',
                'verbose_name_plural': '产品',
            },
        ),
        migrations.CreateModel(
            name='TestTask',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=50, verbose_name='任务名称')),
                ('task_state', models.CharField(choices=[('not_start', '未开始'), ('executing', '执行中'), ('block', '执行中断'), ('finish', '执行完成')], default='not_start', max_length=20, verbose_name='任务状态')),
                ('total_case_num', models.IntegerField(blank=True, null=True, verbose_name='总用例数')),
                ('success_case_num', models.IntegerField(blank=True, null=True, verbose_name='成功用例数')),
                ('fail_case_num', models.IntegerField(blank=True, null=True, verbose_name='失败用例数')),
                ('block_case_num', models.IntegerField(blank=True, null=True, verbose_name='阻塞用例数')),
                ('re_execut_num', models.IntegerField(blank=True, null=True, verbose_name='失败重跑次数')),
                ('desc', models.TextField(default='', help_text='描述', verbose_name='描述')),
                ('add_time', models.DateTimeField(default=datetime.datetime.now, verbose_name='添加时间')),
                ('execut_start_time', models.DateTimeField(blank=True, null=True, verbose_name='执行开始时间')),
                ('execut_end_time', models.DateTimeField(blank=True, null=True, verbose_name='执行结束时间')),
            ],
            options={
                'verbose_name': '测试任务',
                'verbose_name_plural': '测试任务',
            },
        ),
    ]
