# Generated by Django 2.0.6 on 2020-09-11 09:22

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='TAddress',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('order_user', models.CharField(blank=True, max_length=20, null=True)),
                ('address', models.CharField(blank=True, max_length=20, null=True)),
                ('clear_address', models.CharField(blank=True, max_length=100, null=True)),
                ('post_code', models.CharField(blank=True, max_length=6, null=True)),
                ('phone', models.CharField(blank=True, max_length=20, null=True)),
                ('telephone', models.CharField(blank=True, max_length=20, null=True)),
            ],
            options={
                'db_table': 't_address',
            },
        ),
        migrations.CreateModel(
            name='TBook',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('book_name', models.CharField(blank=True, max_length=20, null=True)),
                ('author', models.CharField(blank=True, max_length=20, null=True)),
                ('press', models.CharField(blank=True, max_length=20, null=True)),
                ('time', models.DateField(blank=True, null=True)),
                ('edition', models.SmallIntegerField(blank=True, null=True)),
                ('isbn', models.CharField(blank=True, db_column='ISBN', max_length=20, null=True)),
                ('numbers', models.IntegerField(blank=True, null=True)),
                ('pages', models.IntegerField(blank=True, null=True)),
                ('size', models.CharField(blank=True, max_length=10, null=True)),
                ('paper', models.CharField(blank=True, max_length=10, null=True)),
                ('pack', models.CharField(blank=True, max_length=10, null=True)),
                ('book_pic', models.CharField(blank=True, max_length=200, null=True)),
                ('book_price', models.IntegerField(blank=True, null=True)),
                ('new_price', models.IntegerField(blank=True, null=True)),
                ('bool_count', models.CharField(blank=True, max_length=20, null=True)),
                ('sell_count', models.CharField(blank=True, max_length=20, null=True)),
                ('author_inf', models.CharField(blank=True, max_length=1000, null=True)),
                ('synopsis', models.CharField(blank=True, max_length=1000, null=True)),
                ('ed_recom', models.CharField(blank=True, max_length=1000, null=True)),
                ('con_recom', models.CharField(blank=True, max_length=1000, null=True)),
                ('list', models.CharField(blank=True, max_length=1000, null=True)),
                ('m_review', models.CharField(blank=True, max_length=1000, null=True)),
                ('try_read', models.CharField(blank=True, max_length=1000, null=True)),
                ('make_time', models.DateField(blank=True, null=True)),
                ('impression', models.SmallIntegerField(blank=True, null=True)),
                ('flow', models.IntegerField(blank=True, null=True)),
                ('comment', models.CharField(blank=True, max_length=200, null=True)),
                ('suit', models.IntegerField(blank=True, null=True)),
            ],
            options={
                'db_table': 't_book',
            },
        ),
        migrations.CreateModel(
            name='TCar',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('count', models.CharField(blank=True, max_length=20, null=True)),
                ('book', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='index.TBook')),
            ],
            options={
                'db_table': 't_car',
            },
        ),
        migrations.CreateModel(
            name='TCategory',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('class_name', models.CharField(max_length=20)),
                ('level', models.IntegerField()),
                ('parent_id', models.IntegerField(blank=True, null=True)),
            ],
            options={
                'db_table': 't_category',
            },
        ),
        migrations.CreateModel(
            name='TOrder',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('order_item', models.CharField(blank=True, max_length=50, null=True)),
                ('price', models.IntegerField(blank=True, null=True)),
                ('create_time', models.DateField(blank=True, null=True)),
                ('address', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='index.TAddress')),
            ],
            options={
                'db_table': 't_order',
            },
        ),
        migrations.CreateModel(
            name='TOrderItem',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('count', models.CharField(blank=True, max_length=20, null=True)),
                ('book', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='index.TBook')),
                ('order', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='index.TOrder')),
            ],
            options={
                'db_table': 't_order_item',
            },
        ),
        migrations.CreateModel(
            name='TUser',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('user_name', models.CharField(blank=True, max_length=20, null=True)),
                ('password', models.CharField(blank=True, max_length=20, null=True)),
            ],
            options={
                'db_table': 't_user',
            },
        ),
        migrations.AddField(
            model_name='torder',
            name='user',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='index.TUser'),
        ),
        migrations.AddField(
            model_name='tcar',
            name='user',
            field=models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='index.TUser'),
        ),
        migrations.AddField(
            model_name='tbook',
            name='category',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='index.TCategory'),
        ),
        migrations.AddField(
            model_name='taddress',
            name='user',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='index.TUser'),
        ),
    ]
