# -*- coding: utf-8 -*-
# Generated by Django 1.11.7 on 2018-10-26 12:04
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='BlockModel',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=128, unique=True)),
                ('content', models.TextField()),
            ],
        ),
        migrations.CreateModel(
            name='CollectModel',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('click', models.IntegerField(default=0)),
                ('c_block', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='app.BlockModel')),
            ],
        ),
        migrations.CreateModel(
            name='UserModel',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=32)),
                ('password', models.CharField(max_length=256)),
                ('phone', models.CharField(max_length=16, unique=True)),
                ('mail', models.CharField(max_length=128, unique=True)),
                ('is_delete', models.BooleanField(default=False)),
                ('permission', models.IntegerField(default=2)),
            ],
        ),
        migrations.AddField(
            model_name='collectmodel',
            name='c_user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='app.UserModel'),
        ),
        migrations.AddField(
            model_name='blockmodel',
            name='b_user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='blocks', to='app.UserModel'),
        ),
    ]
