# -*- coding: utf-8 -*-
# Generated by Django 1.10.6 on 2017-05-13 14:34
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='SearchFilelist',
            fields=[
                ('info_hash', models.CharField(max_length=40, primary_key=True, serialize=False)),
                ('file_list', models.TextField()),
            ],
            options={
                'db_table': 'search_filelist',
                'managed': False,
            },
        ),
        migrations.CreateModel(
            name='SearchHash',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('info_hash', models.CharField(max_length=40, unique=True)),
                ('category', models.CharField(max_length=20)),
                ('data_hash', models.CharField(max_length=32)),
                ('name', models.CharField(max_length=255)),
                ('extension', models.CharField(max_length=20)),
                ('classified', models.IntegerField()),
                ('source_ip', models.CharField(blank=True, max_length=20, null=True)),
                ('tagged', models.IntegerField()),
                ('length', models.BigIntegerField()),
                ('create_time', models.DateTimeField()),
                ('last_seen', models.DateTimeField()),
                ('requests', models.IntegerField()),
                ('comment', models.CharField(blank=True, max_length=255, null=True)),
                ('creator', models.CharField(blank=True, max_length=20, null=True)),
                ('type', models.CharField(blank=True, max_length=20, null=True)),
                ('level', models.CharField(blank=True, max_length=20, null=True)),
            ],
            options={
                'db_table': 'search_hash',
                'managed': False,
            },
        ),
        migrations.CreateModel(
            name='Keyword',
            fields=[
                ('key_word_id', models.IntegerField(auto_created=True, primary_key=True, serialize=False)),
                ('word', models.CharField(max_length=20)),
                ('word_type', models.CharField(choices=[('1', 'normal'), ('2', 'porn')], default='1', max_length=20)),
            ],
        ),
        migrations.CreateModel(
            name='Node',
            fields=[
                ('ip', models.CharField(max_length=20, primary_key=True, serialize=False)),
                ('heading', models.CharField(max_length=20)),
                ('img_src', models.CharField(max_length=255)),
                ('resource_num', models.IntegerField(auto_created=0)),
                ('anti_num', models.IntegerField(auto_created=0)),
                ('porn_num', models.IntegerField(auto_created=0)),
                ('vio_num', models.IntegerField(auto_created=0)),
                ('capture_time', models.DateTimeField(auto_now_add=True)),
                ('belonging', models.CharField(max_length=255)),
                ('feature', models.CharField(max_length=255)),
            ],
        ),
        migrations.CreateModel(
            name='Node_shield',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('node_ip', models.CharField(max_length=20, null=True)),
                ('time', models.DateTimeField(auto_now_add=True)),
            ],
        ),
        migrations.CreateModel(
            name='Request',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('info_hash', models.CharField(max_length=40)),
                ('request_ip', models.CharField(max_length=20)),
                ('time', models.DateTimeField(auto_now_add=True)),
            ],
        ),
        migrations.CreateModel(
            name='Resource_media',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('info_hash', models.CharField(max_length=40)),
                ('frame_address', models.CharField(max_length=255)),
                ('frame_type', models.CharField(choices=[('1', 'normal'), ('2', 'porn')], default='1', max_length=20)),
            ],
        ),
        migrations.CreateModel(
            name='Resource_shield',
            fields=[
                ('info_hash', models.CharField(max_length=40, primary_key=True, serialize=False)),
                ('time', models.DateTimeField(auto_now_add=True)),
            ],
        ),
        migrations.CreateModel(
            name='Resource_text',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('info_hash', models.CharField(max_length=40)),
                ('key_word', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='labeled_resource', to='dht.Keyword')),
            ],
        ),
    ]
