# -*- coding: utf-8 -*-
# Generated by Django 1.11.3 on 2017-07-25 10:30
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='AppointModel',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('price', models.IntegerField()),
                ('times', models.IntegerField()),
                ('state', models.IntegerField()),
                ('time', models.CharField(blank=True, max_length=100)),
                ('generate', models.CharField(max_length=100)),
                ('comment', models.CharField(max_length=100)),
                ('subject', models.CharField(max_length=10)),
                ('is_pay', models.IntegerField()),
            ],
        ),
        migrations.CreateModel(
            name='CategoryModel',
            fields=[
                ('cid', models.IntegerField(primary_key=True, serialize=False)),
                ('cname', models.CharField(max_length=20)),
            ],
        ),
        migrations.CreateModel(
            name='CategorySecondModel',
            fields=[
                ('csid', models.IntegerField(primary_key=True, serialize=False)),
                ('csname', models.CharField(max_length=20)),
                ('cid', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='api.CategoryModel')),
            ],
        ),
        migrations.CreateModel(
            name='MessageModel',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('send', models.CharField(max_length=11)),
                ('receive', models.CharField(max_length=11)),
                ('state', models.IntegerField()),
                ('message', models.CharField(max_length=100)),
                ('generate', models.CharField(max_length=100)),
            ],
        ),
        migrations.CreateModel(
            name='REStudentModel',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('price', models.IntegerField()),
                ('subject', models.CharField(max_length=10)),
                ('state', models.IntegerField()),
                ('time', models.CharField(max_length=100)),
                ('times', models.IntegerField()),
            ],
        ),
        migrations.CreateModel(
            name='RETeacherModel',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('price', models.IntegerField()),
                ('subject', models.CharField(max_length=10)),
                ('state', models.IntegerField()),
                ('time', models.CharField(max_length=100)),
            ],
        ),
        migrations.CreateModel(
            name='StudentModel',
            fields=[
                ('name', models.CharField(max_length=10)),
                ('grade', models.CharField(blank=True, max_length=100)),
                ('address', models.CharField(blank=True, max_length=100)),
                ('gender', models.IntegerField(default=0)),
                ('sphone', models.CharField(max_length=11, primary_key=True, serialize=False)),
                ('introduction', models.CharField(max_length=100)),
            ],
        ),
        migrations.CreateModel(
            name='TeacherModel',
            fields=[
                ('name', models.CharField(max_length=10)),
                ('grade', models.CharField(blank=True, max_length=100)),
                ('education', models.CharField(blank=True, max_length=100)),
                ('major', models.CharField(blank=True, max_length=100)),
                ('gender', models.IntegerField(default=0)),
                ('tphone', models.CharField(max_length=11, primary_key=True, serialize=False)),
                ('introduction', models.CharField(max_length=100)),
            ],
        ),
        migrations.CreateModel(
            name='UserModel',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('phone', models.CharField(max_length=11)),
                ('password', models.CharField(max_length=100)),
                ('state', models.IntegerField()),
            ],
        ),
        migrations.AddField(
            model_name='reteachermodel',
            name='tphone',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='api.TeacherModel'),
        ),
        migrations.AddField(
            model_name='restudentmodel',
            name='sphone',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='api.StudentModel'),
        ),
        migrations.AddField(
            model_name='appointmodel',
            name='sphone',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='api.StudentModel'),
        ),
        migrations.AddField(
            model_name='appointmodel',
            name='tphone',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='api.TeacherModel'),
        ),
    ]
