# Generated by Django 3.2.19 on 2023-06-13 11:10

import django.core.validators
from django.db import migrations, models
import label.models


class Migration(migrations.Migration):

    dependencies = [
        ('label', '0009_auto_20230317_0816'),
    ]

    operations = [
        migrations.CreateModel(
            name='BuildLineLabel',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('metadata', models.JSONField(blank=True, help_text='JSON metadata field, for use by external plugins', null=True, verbose_name='Plugin Metadata')),
                ('name', models.CharField(help_text='Label name', max_length=100, verbose_name='Name')),
                ('description', models.CharField(blank=True, help_text='Label description', max_length=250, null=True, verbose_name='Description')),
                ('label', models.FileField(help_text='Label template file', unique=True, upload_to=label.models.rename_label, validators=[django.core.validators.FileExtensionValidator(allowed_extensions=['html'])], verbose_name='Label')),
                ('enabled', models.BooleanField(default=True, help_text='Label template is enabled', verbose_name='Enabled')),
                ('width', models.FloatField(default=50, help_text='Label width, specified in mm', validators=[django.core.validators.MinValueValidator(2)], verbose_name='Width [mm]')),
                ('height', models.FloatField(default=20, help_text='Label height, specified in mm', validators=[django.core.validators.MinValueValidator(2)], verbose_name='Height [mm]')),
                ('filename_pattern', models.CharField(default='label.pdf', help_text='Pattern for generating label filenames', max_length=100, verbose_name='Filename Pattern')),
                ('filters', models.CharField(blank=True, help_text='Query filters (comma-separated list of key=value pairs)', max_length=250, validators=[label.models.validate_build_line_filters], verbose_name='Filters')),
            ],
            options={
                'abstract': False,
            },
        ),
    ]
