# Generated by Django 3.1.4 on 2021-08-26 15:25

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


class Migration(migrations.Migration):

    dependencies = [
        ('company', '0241_auto_20210807_1335'),
        ('thirdparty', '0003_ordersync_tm_modify'),
    ]

    operations = [
        migrations.CreateModel(
            name='Vendor',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100, verbose_name='第三方单位名称')),
                ('code', models.CharField(max_length=10, unique=True, 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, 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='备注说明')),
                ('company', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='vendor3rd_company', to='company.company', verbose_name='企业ID')),
            ],
            options={
                'verbose_name': '第三方信息',
                'verbose_name_plural': '第三方信息',
            },
        ),
        migrations.AddField(
            model_name='ordersync',
            name='vendor',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='ordersync_vendor', to='thirdparty.vendor', verbose_name='第三方ID'),
        ),
    ]
