# -*- coding: utf-8 -*-
# Generated by Django 1.11.8 on 2018-07-06 03:24
from __future__ import unicode_literals

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='Car',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('car_name', models.CharField(max_length=100, verbose_name='车辆名称')),
                ('car_price', models.DecimalField(decimal_places=2, max_digits=7, verbose_name='车辆价格')),
                ('car_body_work', models.CharField(max_length=40, verbose_name='车身结构')),
                ('car_l_w_h', models.CharField(max_length=40, verbose_name='长/宽/高')),
                ('car_engine', models.CharField(max_length=40, verbose_name='发动机')),
                ('car_gear_box', models.CharField(max_length=40, verbose_name='变速箱')),
                ('car_drive_way', models.CharField(max_length=40, verbose_name='驱动方式')),
                ('car_fuel_type', models.CharField(max_length=20, verbose_name='燃料类型')),
                ('car_oil_cons', models.CharField(max_length=20, verbose_name='综合油耗')),
                ('car_color', models.CharField(max_length=220, verbose_name='车辆配色')),
                ('car_href_pic', models.ImageField(upload_to='static/cars/hrefs/', verbose_name='车辆图片')),
                ('car_ld_pic', models.ImageField(upload_to='static/cars/liangdian', verbose_name='车型亮点')),
                ('car_is_active', models.BooleanField(default=True, verbose_name='在售')),
            ],
            options={
                'verbose_name': '车辆信息',
                'verbose_name_plural': '车辆信息',
            },
        ),
        migrations.CreateModel(
            name='CarBrand',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('barnd_name', models.CharField(max_length=50, verbose_name='品牌名称')),
                ('barnd_desc', models.CharField(max_length=50, null=True, verbose_name='品牌描述')),
            ],
            options={
                'verbose_name': '车辆品牌',
                'verbose_name_plural': '车辆品牌',
            },
        ),
        migrations.CreateModel(
            name='CarImage',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('car_img', models.ImageField(upload_to='static/cars/car_images/', verbose_name='车辆图片')),
                ('car', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='car.Car', verbose_name='所属车辆')),
            ],
            options={
                'verbose_name': '车辆图片',
                'verbose_name_plural': '车辆图片',
            },
        ),
        migrations.CreateModel(
            name='CarSpecialArea',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('spec_area_name', models.CharField(max_length=50, verbose_name='专区名称')),
                ('spec_area_desc', models.CharField(max_length=100, null=True, verbose_name='专区描述')),
            ],
            options={
                'verbose_name': '车辆专区',
                'verbose_name_plural': '车辆专区',
            },
        ),
        migrations.CreateModel(
            name='CarType',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('type_name', models.CharField(max_length=50, verbose_name='类型名称')),
                ('type_desc', models.CharField(max_length=50, null=True, verbose_name='类型描述')),
            ],
            options={
                'verbose_name': '车辆类型',
                'verbose_name_plural': '车辆类型',
            },
        ),
        migrations.CreateModel(
            name='Favorite',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('favorite_car', models.ManyToManyField(to='car.Car', verbose_name='收藏的车辆')),
                ('favorite_user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='所属用户')),
            ],
            options={
                'verbose_name': '收藏夹',
                'verbose_name_plural': '收藏夹',
            },
        ),
        migrations.CreateModel(
            name='ImportData',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('file', models.FileField(upload_to='File', verbose_name='车辆信息')),
            ],
            options={
                'ordering': ['file'],
                'verbose_name': '导入车辆数据',
                'verbose_name_plural': '导入车辆数据',
            },
        ),
        migrations.CreateModel(
            name='ImportDataFro',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('file', models.FileField(upload_to='File', verbose_name='车辆类型')),
            ],
            options={
                'ordering': ['file'],
                'verbose_name': '导入车辆类型品牌专区',
                'verbose_name_plural': '导入车辆类型品牌专区',
            },
        ),
        migrations.CreateModel(
            name='ResevationList',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('resevation_list_name', models.CharField(max_length=50, verbose_name='预约单名称')),
                ('user_id', models.CharField(max_length=20, verbose_name='客户编号')),
                ('a_user_name', models.CharField(max_length=50, verbose_name='预约用户名')),
                ('a_user_telephone', models.CharField(max_length=20, verbose_name='预约用户联系方式')),
                ('sale_id', models.CharField(max_length=20, verbose_name='销售员编号')),
                ('sale_name', models.CharField(max_length=50, verbose_name='销售员姓名')),
                ('sale_telephone', models.CharField(max_length=20, verbose_name='销售员联系方式')),
                ('meet_place', models.CharField(max_length=100, verbose_name='预约地点')),
                ('meet_time', models.DateTimeField(auto_now=True, verbose_name='预约时间')),
                ('resevation_car', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='car.Car', verbose_name='预约的车辆')),
            ],
            options={
                'verbose_name': '预约单',
                'verbose_name_plural': '预约单',
            },
        ),
        migrations.AddField(
            model_name='car',
            name='car_brand',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='car.CarBrand', verbose_name='品牌'),
        ),
        migrations.AddField(
            model_name='car',
            name='car_spec_area',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='car.CarSpecialArea', verbose_name='所属专区'),
        ),
        migrations.AddField(
            model_name='car',
            name='car_type',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='car.CarType', verbose_name='车型'),
        ),
    ]
