# Generated by Django 2.0 on 2018-07-10 08:45

import ckeditor_uploader.fields
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='Category_pro',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('Category_pro_tit', models.CharField(max_length=20, verbose_name='顶级分类标题')),
                ('Category_pro_seo', models.CharField(max_length=20, verbose_name='SEO标题')),
                ('Category_pro_key', models.CharField(max_length=200, verbose_name='关键词')),
                ('Category_pro_des', models.TextField(max_length=200, verbose_name='栏目描述')),
                ('index', models.IntegerField(default=999, verbose_name='分类的排序')),
            ],
            options={
                'verbose_name': '一级类',
                'verbose_name_plural': '一级类',
            },
        ),
        migrations.CreateModel(
            name='Category_pro_grandson',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('Category_pro_tit', models.CharField(max_length=20, verbose_name='三级分类标题')),
                ('Category_pro_seo', models.CharField(max_length=100, verbose_name='SEO标题')),
                ('Category_pro_key', models.CharField(max_length=200, verbose_name='关键词')),
                ('Category_pro_des', models.TextField(max_length=200, verbose_name='栏目描述')),
                ('index', models.IntegerField(default=999, verbose_name='分类的排序')),
            ],
            options={
                'verbose_name': '三级类',
                'verbose_name_plural': '三级类',
            },
        ),
        migrations.CreateModel(
            name='Category_pro_son',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('Category_pro_tit', models.CharField(max_length=20, verbose_name='二级分类标题')),
                ('Category_pro_seo', models.CharField(max_length=100, verbose_name='SEO标题')),
                ('Category_pro_key', models.CharField(max_length=200, verbose_name='关键词')),
                ('Category_pro_des', models.TextField(max_length=200, verbose_name='栏目描述')),
                ('index', models.IntegerField(default=999, verbose_name='分类的排序')),
                ('type', models.ManyToManyField(to='product.Category_pro', verbose_name='一级分类')),
            ],
            options={
                'verbose_name': '二级类',
                'verbose_name_plural': '二级类',
            },
        ),
        migrations.CreateModel(
            name='Pro_content',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=100, verbose_name='产品名称')),
                ('seo_title', models.CharField(max_length=100, verbose_name='SEO标题')),
                ('keywords', models.CharField(blank=True, max_length=200, verbose_name='关键词')),
                ('excerpt', models.TextField(blank=True, help_text='如未填写,则在内容中取60个字作为简介', max_length=200, verbose_name='摘要')),
                ('price', models.IntegerField(verbose_name='产品价格')),
                ('address', models.CharField(choices=[('全国', '全国')], default='全国', max_length=10, verbose_name='服务城市')),
                ('thumbnail', models.ImageField(blank=True, default='222bg.png', help_text='图片尺寸：390 * 344', upload_to='pro/%Y/%m/', verbose_name='缩略图')),
                ('body', ckeditor_uploader.fields.RichTextUploadingField(verbose_name='产品内容')),
                ('count', models.PositiveIntegerField(default=1, verbose_name='点击率')),
                ('created_time', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                ('modified_time', models.DateTimeField(auto_now=True, verbose_name='修改时间')),
                ('adviser', models.ManyToManyField(blank=True, to=settings.AUTH_USER_MODEL, verbose_name='顾问')),
                ('category', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='product.Category_pro', verbose_name='一级分类')),
                ('category_grandson', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='product.Category_pro_grandson', verbose_name='三级分类')),
                ('category_son', models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, to='product.Category_pro_son', verbose_name='二级分类')),
            ],
            options={
                'verbose_name': '产品详细',
                'verbose_name_plural': '产品详细',
            },
        ),
        migrations.CreateModel(
            name='Pro_question',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('ask', models.CharField(max_length=100, verbose_name='问')),
                ('answer', models.TextField(max_length=300, verbose_name='答')),
                ('category', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='product.Category_pro', verbose_name='一级分类')),
                ('category_grandson', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='product.Category_pro_grandson', verbose_name='三级分类')),
                ('category_son', models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, to='product.Category_pro_son', verbose_name='二级分类')),
            ],
            options={
                'verbose_name': '常见问答',
                'verbose_name_plural': '常见问答',
            },
        ),
        migrations.AddField(
            model_name='pro_content',
            name='question',
            field=models.ManyToManyField(blank=True, to='product.Pro_question', verbose_name='常见问答'),
        ),
        migrations.AddField(
            model_name='pro_content',
            name='relation',
            field=models.ManyToManyField(blank=True, related_name='_pro_content_relation_+', to='product.Pro_content', verbose_name='关联产品'),
        ),
        migrations.AddField(
            model_name='category_pro_grandson',
            name='type',
            field=models.ManyToManyField(to='product.Category_pro_son', verbose_name='二级分类'),
        ),
    ]
