# Generated by Django 2.2.2 on 2019-07-29 16:57

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Broadcast',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('cast_content', models.CharField(max_length=300, verbose_name='播报内容')),
                ('is_used', models.BooleanField(default=True, verbose_name='是否启用')),
                ('add_time', models.DateTimeField(default=datetime.datetime.now, verbose_name='添加时间')),
            ],
            options={
                'verbose_name': '播报',
                'verbose_name_plural': '播报',
            },
        ),
        migrations.CreateModel(
            name='Proxy',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('proxy_ip', models.CharField(max_length=30, verbose_name='代理IP')),
                ('proxy_type1', models.CharField(default='HTTP', max_length=10, verbose_name='代理类型')),
                ('proxy_type2', models.CharField(default='未知', max_length=10, verbose_name='代理类型')),
                ('proxy_place', models.CharField(max_length=100, verbose_name='地区')),
                ('add_time', models.DateTimeField(default=datetime.datetime.now, verbose_name='添加时间')),
            ],
            options={
                'verbose_name': '代理',
                'verbose_name_plural': '代理',
            },
        ),
        migrations.CreateModel(
            name='Shuffling',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('img', models.ImageField(upload_to='shuffling_imgs/', verbose_name='轮播图')),
                ('is_used', models.BooleanField(default=True, verbose_name='是否启用')),
                ('add_time', models.DateTimeField(default=datetime.datetime.now, verbose_name='添加时间')),
            ],
            options={
                'verbose_name': '轮播图',
                'verbose_name_plural': '轮播图',
            },
        ),
        migrations.CreateModel(
            name='Spider',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=30, verbose_name='爬虫名称')),
                ('content', models.FileField(upload_to='spider_files/', verbose_name='爬虫详情')),
                ('function_introduce', models.CharField(default='', max_length=300, verbose_name='功能介绍')),
                ('author', models.CharField(max_length=30, verbose_name='爬虫作者')),
                ('website_address', models.CharField(max_length=100, verbose_name='爬虫执行网站')),
                ('website_name', models.CharField(max_length=100, verbose_name='网站名称')),
                ('website_img', models.ImageField(blank=True, null=True, upload_to='website_imgs/', verbose_name='网站首页截图')),
                ('author_email', models.CharField(max_length=30, verbose_name='作者邮箱')),
                ('allowed_email', models.BooleanField(default=True, verbose_name='是否允许发送邮件')),
                ('view_num', models.IntegerField(default=0, verbose_name='浏览次数')),
                ('like_num', models.IntegerField(default=0, verbose_name='点赞次数')),
                ('comments_num', models.IntegerField(default=0, verbose_name='评论数')),
                ('spider_status', models.CharField(choices=[('success', '审核通过'), ('running', '正在运行'), ('error', '出现问题'), ('stop', '停止运行')], default='stop', max_length=30, verbose_name='爬虫状态')),
                ('error_num', models.IntegerField(default=0, verbose_name='出错次数')),
                ('add_time', models.DateTimeField(default=datetime.datetime.now, verbose_name='添加时间')),
            ],
            options={
                'verbose_name': '爬虫',
                'verbose_name_plural': '爬虫',
            },
        ),
        migrations.CreateModel(
            name='Spider_type',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=30, verbose_name='类型名')),
                ('data_format', models.TextField(max_length=500, verbose_name='数据返回格式')),
                ('add_time', models.DateTimeField(default=datetime.datetime.now, verbose_name='添加时间')),
            ],
            options={
                'verbose_name': '爬虫类型',
                'verbose_name_plural': '爬虫类型',
            },
        ),
        migrations.CreateModel(
            name='Spider_Error',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('error_content', models.CharField(max_length=500, verbose_name='报错内容')),
                ('add_time', models.DateTimeField(default=datetime.datetime.now, verbose_name='添加时间')),
                ('spider', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='vei.Spider', verbose_name='出错爬虫')),
            ],
            options={
                'verbose_name': '脚本报错',
                'verbose_name_plural': '脚本报错',
            },
        ),
        migrations.AddField(
            model_name='spider',
            name='spider_type',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='vei.Spider_type', verbose_name='爬虫类型'),
        ),
        migrations.CreateModel(
            name='Search',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('user_ip', models.CharField(max_length=100, verbose_name='用户ip')),
                ('wd', models.CharField(max_length=100, verbose_name='搜索词条')),
                ('add_time', models.DateTimeField(default=datetime.datetime.now, verbose_name='添加时间')),
                ('search_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='vei.Spider_type', verbose_name='搜索类型')),
            ],
            options={
                'verbose_name': '用户搜索记录',
                'verbose_name_plural': '用户搜索记录',
            },
        ),
        migrations.CreateModel(
            name='Comments',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('content', models.TextField(max_length=200, verbose_name='评论内容')),
                ('comments_name', models.CharField(max_length=20, verbose_name='评论人')),
                ('comments_email', models.CharField(max_length=100, verbose_name='评论邮箱')),
                ('comments_img', models.ImageField(upload_to='comments_imgs/')),
                ('add_time', models.DateTimeField(default=datetime.datetime.now, verbose_name='添加时间')),
                ('spider', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='vei.Spider', verbose_name='评论对象')),
            ],
            options={
                'verbose_name': '评论',
                'verbose_name_plural': '评论',
            },
        ),
    ]
