# Generated by Django 3.1.4 on 2021-07-22 11:03

import django.contrib.postgres.fields
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    dependencies = [
        ('product', '0018_series_icon'),
        ('company', '0232_auto_20210721_1908'),
    ]

    operations = [
        migrations.CreateModel(
            name='Outlet',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('ancestor_id', models.IntegerField(verbose_name='所属企业')),
                ('name', models.CharField(max_length=100, verbose_name='分店名称')),
                ('province_gis_id', models.IntegerField(blank=True, null=True, verbose_name='GIS省份ID')),
                ('city_gis_id', models.IntegerField(blank=True, null=True, verbose_name='GIS城市ID')),
                ('county_gis_id', models.IntegerField(blank=True, null=True, verbose_name='GIS县区ID')),
                ('lng_lat', django.contrib.postgres.fields.ArrayField(base_field=models.DecimalField(decimal_places=8, max_digits=12, verbose_name='经纬度'), blank=True, null=True, size=None)),
                ('address', models.CharField(blank=True, max_length=100, null=True, verbose_name='详细地址')),
                ('remark', models.CharField(blank=True, max_length=100, null=True, verbose_name='备注说明')),
                ('company', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='outlet_company', to='company.company', verbose_name='所属加盟商')),
                ('level', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='outlet_level', to='company.level', verbose_name='营销层级')),
                ('prdduct', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='product.product', verbose_name='授权产品')),
                ('series', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='outlet_series', to='product.series', verbose_name='授权品牌')),
            ],
            options={
                'verbose_name': '加盟商分店信息',
                'verbose_name_plural': '加盟商分店信息',
            },
        ),
        migrations.CreateModel(
            name='OutletStatus',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=50, verbose_name='状态名称')),
                ('remark', models.CharField(blank=True, max_length=50, null=True, verbose_name='备注说明')),
                ('color', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='company.color', verbose_name='图例颜色')),
                ('company', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='outletstatus_company', to='company.company', verbose_name='所属企业')),
            ],
            options={
                'verbose_name': '加盟商门店状态',
                'verbose_name_plural': '加盟商门店状态',
            },
        ),
        migrations.AlterModelOptions(
            name='franchisestatus',
            options={'verbose_name': '加盟商状态', 'verbose_name_plural': '加盟商状态'},
        ),
        migrations.DeleteModel(
            name='Franchise',
        ),
    ]
