# Generated by Django 3.1.4 on 2022-03-08 07:54

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


class Migration(migrations.Migration):

    dependencies = [
        ('company', '0277_remove_cgroup_privileges'),
        ('thirdparty', '0022_inkjetbatch_dn_number'),
    ]

    operations = [
        migrations.CreateModel(
            name='Redirect',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('code', models.CharField(max_length=10, verbose_name='前端跳转代码')),
                ('is_active', models.BooleanField(default=True, verbose_name='是否已上线')),
                ('synclogistics', models.BooleanField(default=False, verbose_name='同步物流数据')),
                ('redirect', models.CharField(blank=True, max_length=200, null=True, verbose_name='消费者扫码跳转链接')),
                ('parameter', models.CharField(blank=True, max_length=20, null=True, verbose_name='跳转参数名')),
                ('products', models.JSONField(blank=True, default=list, null=True, verbose_name='指定产品')),
                ('agents', models.JSONField(blank=True, default=list, null=True, verbose_name='指定经销商')),
                ('remark', models.CharField(blank=True, max_length=100, 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='redirect_company', to='company.company', verbose_name='企业ID')),
                ('vendor', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='redirect_vendor', to='thirdparty.vendor', verbose_name='第三方ID')),
            ],
            options={
                'verbose_name': '第三方跳转',
                'verbose_name_plural': '第三方跳转',
            },
        ),
    ]
