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

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('case', '0007_auto_20180724_1655'),
    ]

    operations = [
        migrations.CreateModel(
            name='TaskExecuteInfo',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('state', models.CharField(choices=[('executing', '执行中'), ('block', '执行中断'), ('finish', '执行完成')], default='executing', max_length=30, verbose_name='状态')),
                ('result', models.CharField(blank=True, choices=[('success', '成功'), ('fail', '失败'), ('error', '错误')], max_length=30, null=True, verbose_name='结果')),
                ('failure', models.TextField(verbose_name='失败原因')),
                ('error', models.TextField(verbose_name='错误原因')),
                ('exec_time', models.IntegerField(verbose_name='执行时长')),
                ('analyse_result', models.CharField(choices=[('non_analyse', '未分析'), ('bug', '产品BUG'), ('script_error', '脚本错误')], default='non_analyse', max_length=30, verbose_name='分析结果')),
                ('analyse_comments', models.TextField(blank=True, null=True, verbose_name='分析说明')),
                ('add_time', models.DateTimeField(default=datetime.datetime.now, verbose_name='创建时间')),
                ('case', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='case.Case', verbose_name='测试用例')),
                ('task', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='task_execute_info', to='case.TestTask', verbose_name='测试任务')),
            ],
            options={
                'verbose_name': '任务执行信息',
                'verbose_name_plural': '任务执行信息',
            },
        ),
    ]
