# Generated by Django 2.2.2 on 2022-03-29 07:11

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='Host',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=55, verbose_name='名称')),
                ('host', models.CharField(max_length=1024, verbose_name='Host地址')),
                ('description', models.CharField(blank=True, max_length=1024, null=True, verbose_name='描述')),
            ],
        ),
        migrations.CreateModel(
            name='Project',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=50, verbose_name='项目名称')),
                ('type', models.CharField(choices=[('web', 'web'), ('app', 'app')], max_length=50, verbose_name='项目类型')),
                ('description', models.CharField(blank=True, max_length=1024, null=True, verbose_name='描述')),
                ('last_update_time', models.DateTimeField(auto_now=True, verbose_name='最近修改时间')),
                ('create_time', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                ('user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL, verbose_name='创建人')),
            ],
        ),
        migrations.CreateModel(
            name='Api',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=50, verbose_name='接口名称')),
                ('http_method', models.CharField(choices=[('POST', 'POST'), ('GET', 'GET'), ('PUT', 'PUT'), ('DELETE', 'DELETE')], max_length=50, verbose_name='请求方式')),
                ('path', models.CharField(max_length=1024, verbose_name='接口地址')),
                ('headers', models.TextField(blank=True, null=True, verbose_name='请求头')),
                ('data', models.TextField(blank=True, null=True, verbose_name='提交的数据')),
                ('description', models.CharField(blank=True, max_length=1024, null=True, verbose_name='描述')),
                ('expect_code', models.CharField(choices=[('200', '200'), ('201', '201'), ('202', '202'), ('203', '203'), ('204', '204'), ('301', '301'), ('302', '302'), ('400', '400'), ('401', '401'), ('403', '403'), ('404', '404'), ('405', '405'), ('406', '406'), ('407', '407'), ('408', '408'), ('500', '500'), ('502', '502')], default=200, max_length=10, verbose_name='期望返回的code')),
                ('expect_content', models.CharField(blank=True, max_length=200, null=True, verbose_name='期望返回的内容')),
                ('host', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='project_management.Host', verbose_name='host')),
            ],
        ),
    ]
