<reponame>ckjh/shopping
# Generated by Django 2.2.2 on 2019-09-03 16:22

import admin01.models
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Orders',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('order_sn', models.CharField(max_length=100, unique=True)),
                ('money', models.DecimalField(decimal_places=2, max_digits=10)),
                ('address', models.CharField(default='', max_length=255)),
                ('status', models.IntegerField(default=0)),
                ('pay_type', models.IntegerField(default=0)),
                ('code', models.CharField(default='', max_length=250)),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'db_table': 'orders',
            },
            bases=(admin01.models.Base, models.Model),
        ),
        migrations.CreateModel(
            name='OrderDetails',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('price', models.DecimalField(decimal_places=2, max_digits=7)),
                ('count', models.IntegerField(default=0)),
                ('pic', models.CharField(max_length=255)),
                ('order_sn', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='order.Orders', to_field='order_sn')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'db_table': 'order_detail',
            },
        ),
    ]

# Generated by Django 2.2.2 on 2019-09-03 16:22

import admin01.models
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Orders',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('order_sn', models.CharField(max_length=100, unique=True)),
                ('money', models.DecimalField(decimal_places=2, max_digits=10)),
                ('address', models.CharField(default='', max_length=255)),
                ('status', models.IntegerField(default=0)),
                ('pay_type', models.IntegerField(default=0)),
                ('code', models.CharField(default='', max_length=250)),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'db_table': 'orders',
            },
            bases=(admin01.models.Base, models.Model),
        ),
        migrations.CreateModel(
            name='OrderDetails',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('price', models.DecimalField(decimal_places=2, max_digits=7)),
                ('count', models.IntegerField(default=0)),
                ('pic', models.CharField(max_length=255)),
                ('order_sn', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='order.Orders', to_field='order_sn')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'db_table': 'order_detail',
            },
        ),
    ]
# Generated by Django 2.2.2 on 2019-09-03 16:22