# Generated by Django 3.1.4 on 2021-11-30 20:49

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


class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('product', '0029_auto_20211104_1105'),
        ('company', '0261_company_series_more'),
        ('sales', '0266_award_is_usein_banquet'),
    ]

    operations = [
        migrations.CreateModel(
            name='Market_ActCategory',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100, verbose_name='名称')),
                ('forms', models.TextField(blank=True, null=True, verbose_name='表单内容')),
                ('remark', models.CharField(blank=True, max_length=200, null=True, verbose_name='备注')),
                ('tm', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                ('company', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='market_category_company', to='company.company', verbose_name='公司名称')),
            ],
            options={
                'verbose_name': '市场活动类别',
                'verbose_name_plural': '市场活动类别',
            },
        ),
        migrations.CreateModel(
            name='Market_Activity',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100, verbose_name='活动名称')),
                ('status', models.SmallIntegerField(choices=[(0, '未审核'), (1, '通过'), (2, '未通过')], default=0, verbose_name='活动状态')),
                ('digest', models.CharField(blank=True, max_length=300, null=True, verbose_name='活动摘要')),
                ('budget', models.DecimalField(blank=True, decimal_places=2, max_digits=12, null=True, verbose_name='费用预算')),
                ('address', models.CharField(blank=True, max_length=300, null=True, verbose_name='活动地址')),
                ('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)),
                ('applyer_phone', models.CharField(blank=True, max_length=20, null=True, verbose_name='电话')),
                ('permit_tm', models.DateTimeField(blank=True, null=True, verbose_name='审核时间')),
                ('reason', models.CharField(blank=True, max_length=500, null=True, verbose_name='原因')),
                ('tm_start', models.DateTimeField(blank=True, null=True, verbose_name='开始时间')),
                ('tm_end', models.DateTimeField(blank=True, null=True, verbose_name='结束时间')),
                ('remark', models.CharField(blank=True, max_length=100, null=True, verbose_name='备注说明')),
                ('is_delete', models.BooleanField(default=False, verbose_name='是否删除')),
                ('tm', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                ('applyer', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='申请人')),
                ('category', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='sales.market_actcategory', verbose_name='类别')),
                ('company', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='company.company', verbose_name='公司名称')),
                ('permiter', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='market_activity_permiter', to=settings.AUTH_USER_MODEL, verbose_name='审核人')),
            ],
            options={
                'verbose_name': '市场活动',
                'verbose_name_plural': '市场活动',
            },
        ),
        migrations.CreateModel(
            name='Market_ActProducts',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('qty_x', models.IntegerField(blank=True, null=True, verbose_name='箱数量')),
                ('qty_p', models.IntegerField(blank=True, null=True, verbose_name='瓶数量')),
                ('tm', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                ('activity', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='sales.market_activity', verbose_name='活动')),
                ('product', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='product.product', verbose_name='产品')),
            ],
            options={
                'verbose_name': '市场活动产品',
                'verbose_name_plural': '市场活动产品',
            },
        ),
        migrations.CreateModel(
            name='Market_ActPics',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('photo', models.CharField(blank=True, max_length=300, null=True, verbose_name='照片')),
                ('remark', models.CharField(blank=True, max_length=200, null=True, verbose_name='备注')),
                ('tm', models.DateTimeField(auto_now_add=True, verbose_name='创建时间')),
                ('activity', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='sales.market_activity', verbose_name='活动')),
            ],
            options={
                'verbose_name': '市场活动照片',
                'verbose_name_plural': '市场活动照片',
            },
        ),
    ]
