# Generated by Django 2.1.3 on 2018-11-26 08:24

from django.conf import settings
import django.contrib.postgres.fields.jsonb
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='App',
            fields=[
                ('app_id', models.CharField(max_length=36, primary_key=True, serialize=False, verbose_name='AppID')),
                ('status', models.IntegerField(choices=[(0, '开发中'), (1, '审核中'), (2, '已上线')], default=0)),
                ('name', models.CharField(max_length=64, verbose_name='应用名称')),
                ('e_name', models.CharField(blank=True, max_length=64, null=True, verbose_name='英文名称')),
                ('description', models.CharField(max_length=1024, verbose_name='应用描述')),
                ('iot_key', models.CharField(max_length=64, verbose_name='阿里productKey')),
                ('is_delete', models.BooleanField(default=False, verbose_name='逻辑删除标志')),
                ('extra', django.contrib.postgres.fields.jsonb.JSONField(blank=True, default=dict, null=True, verbose_name='extra fields')),
                ('created_at', models.DateTimeField(auto_now_add=True, verbose_name='create time')),
                ('updated_at', models.DateTimeField(auto_now=True, verbose_name='update time')),
                ('owner', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='生产厂家')),
            ],
            options={
                'db_table': 'app',
                'ordering': ('-created_at',),
            },
        ),
    ]
