# Generated by Django 3.1.4 on 2020-12-28 13:34

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


class Migration(migrations.Migration):

    dependencies = [
        ('bookseller', '0002_auto_20201227_2243'),
    ]

    operations = [
        migrations.AddField(
            model_name='book',
            name='Bnumber',
            field=models.PositiveIntegerField(default=0, verbose_name='数量'),
        ),
        migrations.CreateModel(
            name='Bookorder',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('Oid', models.PositiveIntegerField(verbose_name='订单号')),
                ('Onumber', models.PositiveIntegerField(verbose_name='销售数量')),
                ('Oprice', models.DecimalField(decimal_places=2, max_digits=7, verbose_name='单价')),
                ('Odate', models.DateTimeField(auto_now_add=True, verbose_name='购买时间')),
                ('Obook', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, related_name='Orderbook', to='bookseller.book')),
                ('Ovip', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, related_name='Ordervip', to='bookseller.vip')),
            ],
            options={
                'unique_together': {('Oid', 'Obook')},
            },
        ),
        migrations.AlterField(
            model_name='sellrecord',
            name='Sid',
            field=models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, related_name='Orderid', to='bookseller.bookorder'),
        ),
    ]
