# -*- coding: utf-8 -*-
# Generated by Django 1.9.11 on 2019-04-01 09:49
from __future__ import unicode_literals

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import libs.filefield


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='BizLog',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('type', models.PositiveSmallIntegerField(choices=[(1, '\u6dfb\u52a0'), (2, '\u4fee\u6539'), (3, '\u5220\u9664'), (4, '\u5bfc\u5165'), (5, '\u5bfc\u51fa'), (6, '\u6253\u5370'), (7, '\u5ba1\u6838')], verbose_name='\u7c7b\u522b')),
                ('description', models.CharField(max_length=100, verbose_name='\u5185\u5bb9')),
                ('data', models.TextField(blank=True, max_length=5000, null=True, verbose_name='\u6570\u636e')),
                ('create_time', models.DateTimeField(auto_now_add=True, verbose_name='\u6dfb\u52a0\u65f6\u95f4')),
                ('user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['-id'],
                'db_table': 'system_log',
                'verbose_name': '\u7cfb\u7edf',
                'permissions': (('view_visitor', '\u8bbf\u95ee\u7ec8\u7aef\u7edf\u8ba1'), ('manage_version', '\u7248\u672c\u7ba1\u7406'), ('view_feedback', '\u5efa\u8bae\u53cd\u9988'), ('view_log', '\u7cfb\u7edf\u65e5\u5fd7'), ('manage_vcode', '\u7cfb\u7edf\u9a8c\u8bc1\u7801\u7ba1\u7406')),
            },
        ),
        migrations.CreateModel(
            name='Feedback',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('type', models.PositiveSmallIntegerField(choices=[(1, '\u5efa\u8bae'), (2, '\u6570\u636e\u9519\u8bef'), (3, '\u7a0b\u5e8fbug')], verbose_name='\u7c7b\u522b')),
                ('content', models.CharField(max_length=1000, verbose_name='\u5185\u5bb9')),
                ('create_time', models.DateTimeField(auto_now_add=True, verbose_name='\u65f6\u95f4')),
                ('reply_content', models.CharField(blank=True, editable=False, max_length=1000, null=True, verbose_name='\u56de\u590d\u5185\u5bb9')),
                ('reply_time', models.DateTimeField(blank=True, editable=False, null=True, verbose_name='\u56de\u590d\u65f6\u95f4')),
                ('reply_read', models.BooleanField(default=False, editable=False, verbose_name='\u56de\u590d\u5df2\u88ab\u9605\u8bfb')),
                ('create_user', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='feedback_ref_user', to=settings.AUTH_USER_MODEL, verbose_name='\u5e10\u53f7')),
            ],
            options={
                'ordering': ['-id'],
                'db_table': 'system_feedback',
                'verbose_name': '\u7528\u6237\u53cd\u9988',
            },
        ),
        migrations.CreateModel(
            name='VCode',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('vcode', models.CharField(max_length=4, verbose_name=b'\xe9\xaa\x8c\xe8\xaf\x81\xe7\xa0\x81')),
                ('mobile', models.CharField(max_length=11, verbose_name=b'\xe6\x89\x8b\xe6\x9c\xba\xe5\x8f\xb7')),
                ('add_time', models.DateTimeField(auto_now_add=True, verbose_name=b'\xe6\x97\xb6\xe9\x97\xb4')),
                ('type', models.CharField(choices=[(b'SMS_116560769', '\u6ce8\u518c'), (b'SMS_112875079', '\u4fee\u6539\u5bc6\u7801')], default=b'SMS_116560769', editable=False, max_length=20, verbose_name='\u7528\u9014')),
                ('status', models.PositiveSmallIntegerField(choices=[(0, '\u53d1\u9001\u6210\u529f'), (1, '\u53d1\u9001\u5931\u8d25')], default=0, editable=False, verbose_name='\u72b6\u6001')),
            ],
            options={
                'ordering': ['-id'],
                'db_table': 'system_vcode',
            },
        ),
        migrations.CreateModel(
            name='Version',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('platform', models.IntegerField(choices=[(0, b'\xe4\xbc\x9a\xe5\x91\x98\xe7\xab\xaf')], default=0, verbose_name=b'\xe5\xb9\xb3\xe5\x8f\xb0')),
                ('version', models.CharField(max_length=5, verbose_name=b'\xe7\x89\x88\xe6\x9c\xac\xe5\x8f\xb7')),
                ('filename', models.FileField(blank=True, upload_to=libs.filefield.PathAndRename(b'upgrade'), verbose_name=b'\xe6\x96\x87\xe4\xbb\xb6')),
                ('title', models.CharField(max_length=100, verbose_name=b'\xe6\xa0\x87\xe9\xa2\x98')),
                ('content', models.CharField(max_length=200, verbose_name=b'\xe5\x86\x85\xe5\xae\xb9')),
                ('created', models.DateTimeField(auto_now=True, verbose_name=b'\xe5\x8f\x91\xe5\xb8\x83\xe6\x97\xb6\xe9\x97\xb4')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['-id'],
                'verbose_name': '\u7248\u672c\u4fe1\u606f',
            },
        ),
        migrations.CreateModel(
            name='Visitor',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('platform', models.CharField(blank=True, max_length=20, verbose_name=b'\xe8\xae\xbe\xe5\xa4\x87\xe7\xb1\xbb\xe5\x9e\x8b')),
                ('device_UID', models.CharField(blank=True, max_length=64, verbose_name=b'\xe8\xae\xbe\xe5\xa4\x87\xe7\xbc\x96\xe5\x8f\xb7')),
                ('device_machine', models.CharField(blank=True, max_length=20, verbose_name=b'\xe8\xae\xbe\xe5\xa4\x87\xe5\x9e\x8b\xe5\x8f\xb7')),
                ('os_version', models.CharField(blank=True, max_length=20, verbose_name=b'\xe7\xb3\xbb\xe7\xbb\x9f\xe7\x89\x88\xe6\x9c\xac')),
                ('app_version', models.CharField(blank=True, max_length=20, verbose_name=b'App\xe7\x89\x88\xe6\x9c\xac')),
                ('resolution', models.CharField(blank=True, max_length=20, verbose_name=b'\xe5\x88\x86\xe8\xbe\xa8\xe7\x8e\x87')),
                ('network_type', models.CharField(blank=True, max_length=20, verbose_name=b'\xe7\xbd\x91\xe7\xbb\x9c\xe7\xb1\xbb\xe5\x9e\x8b')),
                ('IP', models.CharField(blank=True, max_length=20, verbose_name=b'\xe5\xae\xa2\xe6\x88\xb7\xe7\xab\xafIP')),
                ('start_time', models.DateTimeField(verbose_name=b'\xe7\x99\xbb\xe5\xbd\x95\xe6\x97\xb6\xe9\x97\xb4')),
                ('end_time', models.DateTimeField(verbose_name=b'\xe7\x99\xbb\xe5\x87\xba\xe6\x97\xb6\xe9\x97\xb4')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['-id'],
                'db_table': 'system_visitor',
            },
        ),
        migrations.AlterUniqueTogether(
            name='version',
            unique_together=set([('platform', 'version')]),
        ),
    ]
