# Generated by Django 2.2.12 on 2022-12-04 13:08

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='BussessModel',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(default='', max_length=56, verbose_name='商家名称')),
                ('img', models.CharField(default='', max_length=256, verbose_name='商家封面')),
                ('start_time', models.CharField(default='', max_length=56, verbose_name='营业时间')),
                ('address', models.CharField(default='', max_length=124, verbose_name='商家地址')),
                ('phone', models.CharField(max_length=16, verbose_name='商家电话')),
                ('fen', models.CharField(default='', max_length=56, verbose_name='商家评分')),
                ('state', models.CharField(default=0, max_length=16, verbose_name='营业状态 0 下线 1上线')),
            ],
            options={
                'db_table': 'bussess_model',
            },
        ),
        migrations.CreateModel(
            name='CategoryModel',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(default='', max_length=56, verbose_name='分类名')),
                ('num', models.CharField(default=0, max_length=16, verbose_name='排序，数字越小越靠前')),
            ],
            options={
                'db_table': 'category_model',
            },
        ),
        migrations.CreateModel(
            name='FoodModel',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(default='', max_length=56, verbose_name='菜品名')),
                ('food_img', models.CharField(max_length=256, verbose_name='菜品图')),
                ('price', models.CharField(max_length=16, verbose_name='商品价格')),
                ('verbose_name', models.CharField(max_length=124, verbose_name='菜品评价')),
                ('pay_count', models.CharField(max_length=16, verbose_name='菜品销量')),
                ('cun_count', models.CharField(max_length=16, verbose_name='菜品库存量')),
                ('b_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='myapp.BussessModel', verbose_name='所属商家')),
            ],
            options={
                'db_table': 'food_model',
            },
        ),
        migrations.CreateModel(
            name='OrderLobbyModel',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('status', models.CharField(default=0, max_length=16, verbose_name='0 待抢单，1 已抢单')),
            ],
            options={
                'db_table': 'order_lobby_model',
            },
        ),
        migrations.CreateModel(
            name='RiderModel',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('r_name', models.CharField(max_length=32, unique=True, verbose_name='用户名')),
                ('mobile', models.CharField(max_length=16, unique=True, verbose_name='手机号')),
                ('img', models.CharField(max_length=256, verbose_name='头像')),
                ('login_time', models.DateTimeField(default=datetime.datetime.now, verbose_name='登录时间')),
                ('reg_time', models.DateTimeField(default=datetime.datetime.now, verbose_name='注册时间')),
                ('intro', models.CharField(default='这个人懒，什么也没写', max_length=256, verbose_name='用户简介')),
                ('status', models.CharField(default=0, max_length=32, verbose_name='是否上线 0 下线 1上线')),
            ],
            options={
                'db_table': 'rider_model',
            },
        ),
        migrations.CreateModel(
            name='UserModel',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('username', models.CharField(max_length=32, unique=True, verbose_name='用户名')),
                ('mobile', models.CharField(max_length=16, unique=True, verbose_name='手机号')),
                ('img', models.CharField(max_length=256, verbose_name='头像')),
                ('login_time', models.DateTimeField(default=datetime.datetime.now, verbose_name='登录时间')),
                ('reg_time', models.DateTimeField(default=datetime.datetime.now, verbose_name='注册时间')),
                ('intro', models.CharField(default='这个人懒，什么也没写', max_length=256, verbose_name='用户简介')),
                ('vip_start_time', models.CharField(default='', max_length=56, verbose_name='vip开始时间')),
                ('vip_end_time', models.CharField(default='', max_length=56, verbose_name='vip结束时间')),
                ('status', models.CharField(default=0, max_length=32, verbose_name='是否冻结 0 不冻结 1 冻结')),
            ],
            options={
                'db_table': 'user_model',
            },
        ),
        migrations.CreateModel(
            name='VipListModel',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=56, verbose_name='VIP名字')),
                ('price', models.CharField(default=0, max_length=16, verbose_name='价格')),
                ('time_text', models.CharField(default='', max_length=124, verbose_name='有效期')),
                ('time', models.CharField(default=0, max_length=56, verbose_name='有效期（s）')),
            ],
            options={
                'db_table': 'vip_list_model',
            },
        ),
        migrations.CreateModel(
            name='RiderOrderModel',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('status', models.CharField(default=0, max_length=16, verbose_name='0 接单 1 完成订单 2 转让订单')),
                ('order_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='myapp.OrderLobbyModel', verbose_name='订单ID')),
            ],
            options={
                'db_table': 'rider_order_model',
            },
        ),
        migrations.CreateModel(
            name='PayVipModel',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('vip_order_num', models.CharField(default='', max_length=555, verbose_name='订单号')),
                ('amount', models.CharField(max_length=16, verbose_name='支付金额')),
                ('status', models.CharField(default=0, max_length=16, verbose_name='订单状态  0 待支付  1已支付  2 已取消')),
                ('uid', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='myapp.UserModel', verbose_name='用户id')),
                ('vid', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='myapp.VipListModel', verbose_name='vip类型id')),
            ],
            options={
                'db_table': 'pay_vip_model',
            },
        ),
        migrations.CreateModel(
            name='PayOrderModel',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('order_num', models.CharField(default='', max_length=56, verbose_name='订单号')),
                ('amount', models.CharField(default=0, max_length=16, verbose_name='支付金额')),
                ('status', models.CharField(default=0, max_length=16, verbose_name='订单状态  0 待支付  1已支付  2 已取消')),
                ('uid', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='myapp.UserModel', verbose_name='用户id')),
            ],
            options={
                'db_table': 'pay_order_model',
            },
        ),
        migrations.CreateModel(
            name='OrderModel',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('num', models.IntegerField(verbose_name='数量')),
                ('bid', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='myapp.BussessModel', verbose_name='订单商家id')),
                ('fid', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='myapp.FoodModel', verbose_name='菜品id')),
                ('oid', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='myapp.PayOrderModel', verbose_name='订单ID')),
            ],
            options={
                'db_table': 'order_model',
            },
        ),
        migrations.AddField(
            model_name='orderlobbymodel',
            name='o_id',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='myapp.PayOrderModel', verbose_name='订单ID'),
        ),
        migrations.CreateModel(
            name='CouponModel',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=56, verbose_name='优惠卷名')),
                ('price', models.CharField(max_length=16, verbose_name='优惠卷金额')),
                ('type', models.CharField(max_length=56, verbose_name='优惠卷类型')),
                ('start_time', models.DateTimeField(default=datetime.datetime.now, verbose_name='开始时间')),
                ('end_time', models.DateTimeField(default=datetime.datetime.now, verbose_name='结束时间')),
                ('time', models.CharField(default=0, max_length=56, verbose_name='有效期（s）')),
                ('uid', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='myapp.UserModel', verbose_name='优惠卷用户')),
            ],
            options={
                'db_table': 'coupon_model',
            },
        ),
        migrations.CreateModel(
            name='CommentModel',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('context', models.CharField(default='', max_length=256, verbose_name='评论内容')),
                ('parent_id', models.IntegerField(default=0, verbose_name='回复的评论ID')),
                ('root_id', models.IntegerField(default=0, verbose_name='回复的评论根ID')),
                ('buss_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='myapp.BussessModel', verbose_name='商家id')),
                ('user_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='myapp.UserModel', verbose_name='用户id')),
            ],
            options={
                'db_table': 'comment_model',
            },
        ),
        migrations.AddField(
            model_name='bussessmodel',
            name='cid',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='myapp.CategoryModel', verbose_name='商家所属分类'),
        ),
        migrations.CreateModel(
            name='AddressModel',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=24, verbose_name='收货人姓名')),
                ('phone', models.CharField(max_length=16, verbose_name='收货人电话')),
                ('address', models.CharField(max_length=256, verbose_name='收货地址')),
                ('is_mo', models.CharField(default=0, max_length=4, verbose_name='1为默认地址，0为不默认')),
                ('uid', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='myapp.UserModel', verbose_name='收货用户')),
            ],
            options={
                'db_table': 'address_model',
            },
        ),
    ]
