# -*- 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
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('device', '0001_initial'),
        ('case', '0001_initial'),
        ('dataconfig', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='DeviceRelateEnv',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('add_time', models.DateTimeField(default=datetime.datetime.now, verbose_name='创建时间')),
                ('device', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='device.Device', verbose_name='设备')),
            ],
            options={
                'verbose_name': '设备关联',
                'verbose_name_plural': '设备关联',
            },
        ),
        migrations.CreateModel(
            name='EnvConfig',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('app', models.FileField(blank=True, null=True, upload_to='app/', verbose_name='被测应用')),
                ('test_app', models.FileField(blank=True, null=True, upload_to='app/', verbose_name='测试应用')),
                ('app_script_type', models.CharField(choices=[('appium', 'Appimu'), ('robotium', 'robotium')], max_length=30, verbose_name='类型')),
                ('is_scene_test', models.BooleanField(default=False, verbose_name='是否场景测试')),
                ('add_time', models.DateTimeField(default=datetime.datetime.now, verbose_name='创建时间')),
                ('data_config', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='dataconfig.TestDataConfig', verbose_name='测试数据配置')),
                ('task', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='env', to='case.TestTask', verbose_name='测试任务')),
            ],
            options={
                'verbose_name': '执行环境配置',
                'verbose_name_plural': '执行环境配置',
            },
        ),
        migrations.AddField(
            model_name='devicerelateenv',
            name='env',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='relate_device', to='uitest.EnvConfig', verbose_name='环境'),
        ),
    ]
