# Generated by Django 2.1.3 on 2019-09-24 03:42

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


class Migration(migrations.Migration):

    dependencies = [
        ('api_basebone', '0010_filter_layer'),
    ]

    operations = [
        migrations.CreateModel(
            name='DisplayField',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100, verbose_name='字段名')),
            ],
            options={
                'verbose_name': 'API的查询字段',
                'verbose_name_plural': 'API的查询字段',
                'ordering': ['name'],
            },
        ),
        migrations.CreateModel(
            name='SetField',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100, verbose_name='字段名')),
                ('value', models.CharField(max_length=200, verbose_name='赋值')),
            ],
            options={
                'verbose_name': 'API的赋值字段',
                'verbose_name_plural': 'API的赋值字段',
                'ordering': ['name'],
            },
        ),
        migrations.RemoveField(
            model_name='field',
            name='api',
        ),
        migrations.AlterField(
            model_name='api',
            name='operation',
            field=models.CharField(choices=[('list', '查看'), ('retrieve', '详情'), ('create', '新建'), ('update', '全部更新'), ('replace', '部分更新'), ('delete', '删除'), ('update_by_condition', '批量更新'), ('delete_by_condition', '批量删除'), ('func', '云函数')], max_length=20, verbose_name='操作'),
        ),
        migrations.AlterField(
            model_name='filter',
            name='operator',
            field=models.CharField(max_length=20, verbose_name='条件判断符'),
        ),
        migrations.AlterField(
            model_name='filter',
            name='parent',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='children', to='api_basebone.Filter', verbose_name='parent'),
        ),
        migrations.AlterField(
            model_name='parameter',
            name='api',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='api_basebone.Api', verbose_name='api'),
        ),
        migrations.AlterField(
            model_name='parameter',
            name='type',
            field=models.CharField(choices=[('string', '字符串'), ('int', '整数'), ('decimal', '浮点数'), ('boolean', '布尔值'), ('PAGE_SIZE', '页长'), ('PAGE_IDX', '页码'), ('pk', '主键')], max_length=20, verbose_name='参数类型'),
        ),
        migrations.DeleteModel(
            name='Field',
        ),
        migrations.AddField(
            model_name='setfield',
            name='api',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='api_basebone.Api', verbose_name='api'),
        ),
        migrations.AddField(
            model_name='displayfield',
            name='api',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='api_basebone.Api', verbose_name='api'),
        ),
    ]
