# Generated by Django 3.2.9 on 2021-12-05 09:29

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('store', '0001_initial'),
        ('user', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Order',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('success', models.BooleanField(default=False, verbose_name='交易是否成功')),
                ('paid', models.BooleanField(default=False, verbose_name='是否已付款')),
                ('sumPrice', models.DecimalField(decimal_places=2, max_digits=10, verbose_name='订单总金额')),
                ('shippingAddress', models.TextField(default='', verbose_name='发货地址')),
                ('receivingAddress', models.TextField(default='', verbose_name='收货地址')),
                ('generateDate', models.DateTimeField(auto_now_add=True, verbose_name='订单生成时间')),
                ('paymentDate', models.DateTimeField(verbose_name='订单付款时间')),
                ('shippingDate', models.DateTimeField(verbose_name='订单发货时间')),
                ('completeDate', models.DateTimeField(verbose_name='订单完成时间')),
                ('store', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='store.store')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='user.user')),
            ],
            options={
                'db_table': 'order',
            },
        ),
        migrations.CreateModel(
            name='OrderBook',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=50, verbose_name='书名')),
                ('num', models.IntegerField(default=1, verbose_name='书本数量')),
                ('booksPrice', models.DecimalField(decimal_places=2, max_digits=10, verbose_name='书本总金额')),
                ('book', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='store.book')),
                ('order', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='order.order')),
            ],
            options={
                'db_table': 'orderbook',
            },
        ),
    ]
