# -*- coding: utf-8 -*-
# Generated by Django 1.10.6 on 2018-05-28 02:44
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='Article',
            fields=[
                ('nid', models.AutoField(primary_key=True, serialize=False)),
                ('content', models.TextField(max_length=1000, verbose_name='内容')),
                ('create_time', models.DateTimeField(auto_now=True, verbose_name='创建时间')),
            ],
        ),
        migrations.CreateModel(
            name='Chat',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('content', models.TextField(max_length=255, verbose_name='聊天内容')),
                ('time', models.DateTimeField(auto_now_add=True, null=True, verbose_name='发送时间')),
            ],
        ),
        migrations.CreateModel(
            name='Comment',
            fields=[
                ('nid', models.BigAutoField(primary_key=True, serialize=False)),
                ('content', models.TextField(max_length=255, verbose_name='评论内容')),
                ('create_time', models.DateTimeField(auto_now=True, verbose_name='创建时间')),
                ('article', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='article_comments', to='app01.Article', verbose_name='评论文章')),
            ],
        ),
        migrations.CreateModel(
            name='UserInfo',
            fields=[
                ('nid', models.BigAutoField(primary_key=True, serialize=False)),
                ('username', models.CharField(max_length=12, unique=True, verbose_name='用户名')),
                ('nickname', models.CharField(max_length=12, verbose_name='昵称')),
                ('password', models.CharField(max_length=32, verbose_name='密码')),
                ('friend', models.ManyToManyField(related_name='_userinfo_friend_+', to='app01.UserInfo', verbose_name='好友')),
                ('pre_friend', models.ManyToManyField(default='0', related_name='_userinfo_pre_friend_+', to='app01.UserInfo', verbose_name='好友请求')),
            ],
        ),
        migrations.AddField(
            model_name='comment',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='user_comments', to='app01.UserInfo', verbose_name='评论者'),
        ),
        migrations.AddField(
            model_name='chat',
            name='receiver',
            field=models.ForeignKey(default='', on_delete=django.db.models.deletion.CASCADE, related_name='receiver_chats', to='app01.UserInfo', verbose_name='接收者'),
        ),
        migrations.AddField(
            model_name='chat',
            name='sender',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='sender_chats', to='app01.UserInfo', verbose_name='发送者'),
        ),
        migrations.AddField(
            model_name='article',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='user_articles', to='app01.UserInfo', verbose_name='用户名'),
        ),
    ]
