# Generated by Django 3.2.23 on 2024-04-20 12:10

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


class Migration(migrations.Migration):

    dependencies = [
        ('products', '0085_codebatch_scan_redirect_url'),
    ]

    operations = [
        migrations.AddField(
            model_name='product',
            name='template_asset',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='template_of', to='products.assetfile', verbose_name='产品信息页面模板文件'),
        ),
        migrations.CreateModel(
            name='ProductProperty',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=128, verbose_name='属性名称')),
                ('data_type', models.CharField(max_length=64, verbose_name='属性类型')),
                ('value', models.TextField(verbose_name='属性数据')),
                ('memo', models.TextField(blank=True, null=True, verbose_name='备注')),
                ('product', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='properties', to='products.product', verbose_name='产品')),
            ],
            options={
                'unique_together': {('product', 'name')},
            },
        ),
    ]
