# Generated by Django 3.1.4 on 2023-03-23 14:49

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('product', '0040_series_banner'),
        ('sales', '0318_auto_20230321_1038'),
        ('company', '0323_auto_20230304_1014'),
    ]

    operations = [
        migrations.CreateModel(
            name='Collector',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(blank=True, max_length=20, null=True, verbose_name='姓名')),
                ('gender', models.SmallIntegerField(blank=True, choices=[(1, '男'), (2, '女'), (0, '未知')], null=True, verbose_name='性别')),
                ('address', models.CharField(blank=True, max_length=100, null=True, 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='备注说明')),
                ('company', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='CollectorCompany', to='company.company', verbose_name='所属企业')),
                ('member', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='sales.member', verbose_name='消费者帐号')),
            ],
            options={
                'verbose_name': '收藏人信息',
                'verbose_name_plural': '收藏人信息',
            },
        ),
        migrations.CreateModel(
            name='Artical',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('code', models.CharField(blank=True, max_length=20, null=True, unique=True, verbose_name='编号或标签')),
                ('qty', models.IntegerField(blank=True, null=True, verbose_name='数量')),
                ('unit', models.CharField(blank=True, max_length=20, null=True, 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='备注说明')),
                ('collector', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='ArticalCollector', to='collection.collector', verbose_name='收藏人')),
                ('company', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='ArticalCompany', to='company.company', verbose_name='所属企业')),
                ('product', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='Articalproduct', to='product.product', verbose_name='产品名称')),
            ],
            options={
                'verbose_name': '藏品信息',
                'verbose_name_plural': '藏品信息',
                'unique_together': {('company', 'product', 'code')},
            },
        ),
    ]
