# Generated by Django 2.1.7 on 2020-07-21 15:41

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


class Migration(migrations.Migration):

    dependencies = [
        ('company', '0060_auto_20200721_1455'),
        ('sales', '0039_consumeraccount_age'),
    ]

    operations = [
        migrations.CreateModel(
            name='BugSales',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('label_code', models.CharField(max_length=20, verbose_name='标签号码')),
                ('package_id', models.SmallIntegerField(blank=True, null=True, verbose_name='标签类别')),
                ('province', models.CharField(max_length=50, verbose_name='省份')),
                ('city', models.CharField(max_length=50, verbose_name='城市')),
                ('address', models.CharField(max_length=150, verbose_name='详细地址')),
                ('distance', models.IntegerField(verbose_name='距离')),
                ('lng_lat', models.CharField(max_length=50, verbose_name='经纬度')),
                ('dt', models.DateField(auto_now_add=True, db_index=True, verbose_name='日期')),
                ('tm', models.DateTimeField(auto_now_add=True, verbose_name='生成时间')),
                ('remark', models.CharField(blank=True, max_length=100, null=True, verbose_name='备注说明')),
                ('agent', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='bugsales_agent', to='company.Company', verbose_name='经销商名称')),
                ('ancestor', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='bugsales_ancestor', to='company.Company', verbose_name='族系')),
                ('company', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='bugsales_company', to='company.Company', verbose_name='公司名称')),
                ('consumer', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='bugsales_consumer', to='sales.ConsumerAccount', verbose_name='消费者帐号')),
            ],
            options={
                'verbose_name': '窜货预警',
                'verbose_name_plural': '窜货预警',
            },
        ),
    ]
