# Generated by Django 2.1.3 on 2018-11-13 13:01

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Admins',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('water', models.CharField(max_length=2)),
                ('detail', models.CharField(default='', max_length=62)),
                ('times', models.DateTimeField(default=django.utils.timezone.now)),
            ],
        ),
        migrations.CreateModel(
            name='Cart',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('goods_name', models.CharField(max_length=20)),
                ('goods_price', models.DecimalField(decimal_places=2, max_digits=60)),
                ('goods_x', models.IntegerField()),
                ('goods_id', models.CharField(max_length=21)),
                ('goods_img', models.CharField(default='user_head/2.jpg', max_length=200)),
            ],
        ),
        migrations.CreateModel(
            name='Deal_goods',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('goods_name', models.CharField(max_length=20)),
                ('goods_id', models.CharField(max_length=21)),
                ('goods_price', models.DecimalField(decimal_places=2, max_digits=60)),
                ('goods_stock', models.IntegerField()),
                ('goods_time', models.DateTimeField(default=django.utils.timezone.now)),
            ],
        ),
        migrations.CreateModel(
            name='Goods',
            fields=[
                ('goods_name', models.CharField(max_length=20)),
                ('goods_id', models.CharField(max_length=21, primary_key=True, serialize=False)),
                ('goods_price', models.DecimalField(decimal_places=2, max_digits=60)),
                ('goods_class', models.CharField(max_length=10)),
                ('goods_stock', models.IntegerField(default=99)),
                ('goods_time', models.DateTimeField(default=django.utils.timezone.now)),
                ('goods_update', models.DateField(default=django.utils.timezone.now, verbose_name='修改时间')),
                ('goods_state', models.CharField(default='未上架', max_length=3)),
                ('goods_delete', models.CharField(default='0', max_length=3)),
                ('goods_address', models.CharField(default='北京', max_length=40)),
                ('goods_img', models.CharField(max_length=200)),
            ],
        ),
        migrations.CreateModel(
            name='Logins',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('login_time', models.DateTimeField(default=django.utils.timezone.now)),
                ('logout', models.CharField(default='登录', max_length=2)),
            ],
        ),
        migrations.CreateModel(
            name='Order',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('goods_name', models.CharField(max_length=20)),
                ('goods_id', models.CharField(max_length=21)),
                ('goods_stock', models.CharField(max_length=99)),
                ('goods_address', models.CharField(max_length=40)),
                ('user_home', models.CharField(max_length=40)),
                ('address_time', models.DateTimeField(default=django.utils.timezone.now)),
                ('yes_goods', models.CharField(default='未收货', max_length=10)),
            ],
        ),
        migrations.CreateModel(
            name='Update',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('goods_id', models.CharField(max_length=21)),
                ('goods_update', models.DateTimeField(default=django.utils.timezone.now)),
                ('goods_text', models.CharField(max_length=200)),
            ],
        ),
        migrations.CreateModel(
            name='User_bill',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('water', models.CharField(max_length=2)),
                ('detail', models.DecimalField(decimal_places=2, default=0, max_digits=60)),
                ('times', models.DateTimeField(default=django.utils.timezone.now)),
            ],
        ),
        migrations.CreateModel(
            name='Users',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('user_name', models.CharField(max_length=10)),
                ('user_account', models.CharField(max_length=6)),
                ('user_password', models.CharField(max_length=200)),
                ('user_question', models.CharField(default='1+1=？', max_length=50)),
                ('user_answer', models.CharField(default='2', max_length=50)),
                ('user_RMB', models.DecimalField(decimal_places=2, default=0, max_digits=60)),
                ('user_time', models.DateTimeField(default=django.utils.timezone.now)),
                ('user_home', models.CharField(default='', max_length=40)),
                ('user_income', models.DecimalField(decimal_places=2, default=0, max_digits=60)),
                ('user_expend', models.DecimalField(decimal_places=2, default=0, max_digits=60)),
                ('user_img', models.CharField(max_length=200)),
            ],
        ),
        migrations.AddField(
            model_name='user_bill',
            name='user_name',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='sop.Users'),
        ),
        migrations.AddField(
            model_name='update',
            name='goods_user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='sop.Users'),
        ),
        migrations.AddField(
            model_name='order',
            name='order_user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='sop.Users'),
        ),
        migrations.AddField(
            model_name='logins',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='sop.Users'),
        ),
        migrations.AddField(
            model_name='goods',
            name='goods_user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='sop.Users'),
        ),
        migrations.AddField(
            model_name='deal_goods',
            name='goods_user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='sop.Users'),
        ),
        migrations.AddField(
            model_name='cart',
            name='goods_user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='sop.Users'),
        ),
    ]
