<filename>Django_project/axf/migrations/0001_initial.py
# -*- coding: utf-8 -*-
# Generated by Django 1.11.4 on 2018-06-06 11:54
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='Addresses',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=20)),
                ('sex', models.BooleanField()),
                ('phoneNum', models.CharField(max_length=20)),
                ('province', models.CharField(max_length=20)),
                ('city', models.CharField(max_length=20)),
                ('county', models.CharField(max_length=20)),
                ('street', models.CharField(max_length=40)),
                ('detail_address', models.CharField(max_length=100)),
            ],
            options={
                'db_table': 'addresses',
            },
        ),
        migrations.CreateModel(
            name='Cart',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('num', models.IntegerField()),
                ('isChose', models.BooleanField(default=True)),
                ('isOrder', models.BooleanField(default=False)),
            ],
            options={
                'db_table': 'carts',
            },
        ),
        migrations.CreateModel(
            name='Categorie',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('category_id', models.CharField(max_length=20)),
                ('category_name', models.CharField(max_length=40)),
                ('sort', models.IntegerField()),
                ('isDelete', models.BooleanField(default=False)),
            ],
            options={
                'db_table': 'categories',
                'ordering': ['sort'],
            },
        ),
        migrations.CreateModel(
            name='ChildCategorie',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('child_id', models.CharField(max_length=20)),
                ('child_name', models.CharField(max_length=40)),
                ('sort', models.IntegerField()),
                ('isDelete', models.BooleanField(default=False)),
                ('categorie', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='axf.Categorie')),
            ],
            options={
                'db_table': 'childcategories',
                'ordering': ['sort'],
            },
        ),
        migrations.CreateModel(
            name='MainDescription',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('category_id', models.CharField(max_length=20)),
                ('category_name', models.CharField(max_length=40)),
                ('img', models.CharField(max_length=200)),
                ('product1', models.CharField(max_length=20)),
                ('product2', models.CharField(max_length=20)),
                ('product3', models.CharField(max_length=20)),
                ('sort', models.IntegerField()),
            ],
            options={
                'db_table': 'maindescriptions',
                'ordering': ['sort'],
            },
        ),
        migrations.CreateModel(
            name='Order',
            fields=[
                ('order_id', models.CharField(max_length=100, primary_key=True, serialize=False)),
                ('price', models.FloatField()),
                ('flag', models.IntegerField(default=0)),
                ('idDelete', models.BooleanField(default=False)),
                ('createTime', models.DateTimeField(auto_now_add=True)),
                ('lastTime', models.DateTimeField(auto_now=True)),
            ],
            options={
                'db_table': 'orders',
            },
        ),
        migrations.CreateModel(
            name='Product',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('long_name', models.CharField(max_length=150)),
                ('product_id', models.CharField(max_length=20)),
                ('store_nums', models.IntegerField()),
                ('specifics', models.CharField(max_length=20)),
                ('sort', models.IntegerField()),
                ('market_price', models.FloatField()),
                ('price', models.FloatField()),
                ('category_id', models.CharField(max_length=20)),
                ('child_cid', models.CharField(max_length=20)),
                ('img', models.CharField(max_length=200)),
                ('keywords', models.CharField(max_length=200)),
                ('brand_id', models.CharField(max_length=40)),
                ('brand_name', models.CharField(max_length=200)),
                ('safe_day', models.CharField(max_length=20)),
                ('safe_unit', models.CharField(max_length=20)),
                ('safe_unit_desc', models.CharField(max_length=20)),
                ('isDelete', models.BooleanField(default=False)),
            ],
            options={
                'db_table': 'products',
            },
        ),
        migrations.CreateModel(
            name='SliderShow',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=40)),
                ('img', models.CharField(max_length=200)),
                ('sort', models.IntegerField()),
                ('trackid', models.CharField(max_length=20)),
            ],
            options={
                'db_table': 'slidershows',
            },
        ),
        migrations.CreateModel(
            name='User',
            fields=[
                ('phoneNum', models.CharField(max_length=20, primary_key=True, serialize=False)),
                ('tokenValue', models.CharField(max_length=100)),
                ('createTime', models.DateTimeField(auto_now_add=True)),
                ('lastTime', models.DateTimeField(auto_now=True)),
                ('isDelete', models.BooleanField(default=False)),
            ],
            options={
                'db_table': 'users',
            },
        ),
        migrations.AddField(
            model_name='order',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='axf.User'),
        ),
        migrations.AddField(
            model_name='cart',
            name='order',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='axf.Order'),
        ),
        migrations.AddField(
            model_name='cart',
            name='product',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='axf.Product'),
        ),
        migrations.AddField(
            model_name='cart',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='axf.User'),
        ),
        migrations.AddField(
            model_name='addresses',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='axf.User'),
        ),
    ]

<filename>Django_project/axf/migrations/0001_initial.py
# -*- coding: utf-8 -*-
# Generated by Django 1.11.4 on 2018-06-06 11:54
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='Addresses',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=20)),
                ('sex', models.BooleanField()),
                ('phoneNum', models.CharField(max_length=20)),
                ('province', models.CharField(max_length=20)),
                ('city', models.CharField(max_length=20)),
                ('county', models.CharField(max_length=20)),
                ('street', models.CharField(max_length=40)),
                ('detail_address', models.CharField(max_length=100)),
            ],
            options={
                'db_table': 'addresses',
            },
        ),
        migrations.CreateModel(
            name='Cart',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('num', models.IntegerField()),
                ('isChose', models.BooleanField(default=True)),
                ('isOrder', models.BooleanField(default=False)),
            ],
            options={
                'db_table': 'carts',
            },
        ),
        migrations.CreateModel(
            name='Categorie',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('category_id', models.CharField(max_length=20)),
                ('category_name', models.CharField(max_length=40)),
                ('sort', models.IntegerField()),
                ('isDelete', models.BooleanField(default=False)),
            ],
            options={
                'db_table': 'categories',
                'ordering': ['sort'],
            },
        ),
        migrations.CreateModel(
            name='ChildCategorie',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('child_id', models.CharField(max_length=20)),
                ('child_name', models.CharField(max_length=40)),
                ('sort', models.IntegerField()),
                ('isDelete', models.BooleanField(default=False)),
                ('categorie', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='axf.Categorie')),
            ],
            options={
                'db_table': 'childcategories',
                'ordering': ['sort'],
            },
        ),
        migrations.CreateModel(
            name='MainDescription',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('category_id', models.CharField(max_length=20)),
                ('category_name', models.CharField(max_length=40)),
                ('img', models.CharField(max_length=200)),
                ('product1', models.CharField(max_length=20)),
                ('product2', models.CharField(max_length=20)),
                ('product3', models.CharField(max_length=20)),
                ('sort', models.IntegerField()),
            ],
            options={
                'db_table': 'maindescriptions',
                'ordering': ['sort'],
            },
        ),
        migrations.CreateModel(
            name='Order',
            fields=[
                ('order_id', models.CharField(max_length=100, primary_key=True, serialize=False)),
                ('price', models.FloatField()),
                ('flag', models.IntegerField(default=0)),
                ('idDelete', models.BooleanField(default=False)),
                ('createTime', models.DateTimeField(auto_now_add=True)),
                ('lastTime', models.DateTimeField(auto_now=True)),
            ],
            options={
                'db_table': 'orders',
            },
        ),
        migrations.CreateModel(
            name='Product',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('long_name', models.CharField(max_length=150)),
                ('product_id', models.CharField(max_length=20)),
                ('store_nums', models.IntegerField()),
                ('specifics', models.CharField(max_length=20)),
                ('sort', models.IntegerField()),
                ('market_price', models.FloatField()),
                ('price', models.FloatField()),
                ('category_id', models.CharField(max_length=20)),
                ('child_cid', models.CharField(max_length=20)),
                ('img', models.CharField(max_length=200)),
                ('keywords', models.CharField(max_length=200)),
                ('brand_id', models.CharField(max_length=40)),
                ('brand_name', models.CharField(max_length=200)),
                ('safe_day', models.CharField(max_length=20)),
                ('safe_unit', models.CharField(max_length=20)),
                ('safe_unit_desc', models.CharField(max_length=20)),
                ('isDelete', models.BooleanField(default=False)),
            ],
            options={
                'db_table': 'products',
            },
        ),
        migrations.CreateModel(
            name='SliderShow',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=40)),
                ('img', models.CharField(max_length=200)),
                ('sort', models.IntegerField()),
                ('trackid', models.CharField(max_length=20)),
            ],
            options={
                'db_table': 'slidershows',
            },
        ),
        migrations.CreateModel(
            name='User',
            fields=[
                ('phoneNum', models.CharField(max_length=20, primary_key=True, serialize=False)),
                ('tokenValue', models.CharField(max_length=100)),
                ('createTime', models.DateTimeField(auto_now_add=True)),
                ('lastTime', models.DateTimeField(auto_now=True)),
                ('isDelete', models.BooleanField(default=False)),
            ],
            options={
                'db_table': 'users',
            },
        ),
        migrations.AddField(
            model_name='order',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='axf.User'),
        ),
        migrations.AddField(
            model_name='cart',
            name='order',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='axf.Order'),
        ),
        migrations.AddField(
            model_name='cart',
            name='product',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='axf.Product'),
        ),
        migrations.AddField(
            model_name='cart',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='axf.User'),
        ),
        migrations.AddField(
            model_name='addresses',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='axf.User'),
        ),
    ]

# -*- coding: utf-8 -*- # Generated by Django 1.11.4 on 2018-06-06 11:54