# Generated by Django 4.2.19 on 2025-02-08 12:08

import django.core.validators
import django.utils.timezone
import django_pdf_actions.models
import model_utils.fields
from django.db import migrations, models


class Migration(migrations.Migration):
    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='ExportPDFSettings',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', model_utils.fields.AutoCreatedField(default=django.utils.timezone.now, editable=False,
                                                                verbose_name='created')),
                ('modified', model_utils.fields.AutoLastModifiedField(default=django.utils.timezone.now, editable=False,
                                                                      verbose_name='modified')),
                ('title', models.CharField(help_text='Name of this configuration', max_length=100)),
                ('active',
                 models.BooleanField(default=False, help_text='Only one configuration can be active at a time')),
                ('items_per_page',
                 models.PositiveIntegerField(default=10, help_text='Number of items to display per page',
                                             validators=[django.core.validators.MinValueValidator(1),
                                                         django.core.validators.MaxValueValidator(50)])),
                ('page_margin_mm', models.PositiveIntegerField(default=15, help_text='Page margin in millimeters',
                                                               validators=[django.core.validators.MinValueValidator(5),
                                                                           django.core.validators.MaxValueValidator(
                                                                               50)])),
                ('font_name', models.CharField(choices=[('DejaVuSans.ttf', 'DejaVuSans'), ('SIXTY.ttf', 'SIXTY')],
                                               default='DejaVuSans.ttf',
                                               help_text='Select font from available system fonts', max_length=100)),
                ('header_font_size', models.PositiveIntegerField(default=10, help_text='Font size for headers',
                                                                 validators=[
                                                                     django.core.validators.MinValueValidator(6),
                                                                     django.core.validators.MaxValueValidator(24)])),
                ('body_font_size', models.PositiveIntegerField(default=7, help_text='Font size for table content',
                                                               validators=[django.core.validators.MinValueValidator(6),
                                                                           django.core.validators.MaxValueValidator(
                                                                               18)])),
                ('logo', models.ImageField(blank=True, help_text='Logo to display on PDF', null=True,
                                           upload_to='export_pdf/logos/')),
                ('header_background_color', django_pdf_actions.models.ColorField(default='#F0F0F0',
                                                                                 help_text='Header background color (hex format, e.g. #F0F0F0)',
                                                                                 max_length=7, validators=[
                        django_pdf_actions.models.validate_hex_color])),
                ('grid_line_color', django_pdf_actions.models.ColorField(default='#000000',
                                                                         help_text='Grid line color (hex format, e.g. #000000)',
                                                                         max_length=7, validators=[
                        django_pdf_actions.models.validate_hex_color])),
                ('grid_line_width', models.FloatField(default=0.25, help_text='Grid line width in points',
                                                      validators=[django.core.validators.MinValueValidator(0.1),
                                                                  django.core.validators.MaxValueValidator(2.0)])),
                ('show_header', models.BooleanField(default=True, help_text='Display the header with model name')),
                ('show_logo', models.BooleanField(default=True, help_text='Display the logo in the PDF')),
                ('show_export_time', models.BooleanField(default=True, help_text='Display export timestamp')),
                ('show_page_numbers', models.BooleanField(default=True, help_text='Display page numbers')),
                ('table_spacing', models.FloatField(default=1.0, help_text='Spacing between table cells in millimeters',
                                                    validators=[django.core.validators.MinValueValidator(0.5),
                                                                django.core.validators.MaxValueValidator(5.0)])),
                ('max_chars_per_line',
                 models.PositiveIntegerField(default=45, help_text='Maximum characters per line before wrapping',
                                             validators=[django.core.validators.MinValueValidator(20),
                                                         django.core.validators.MaxValueValidator(100)])),
            ],
            options={
                'verbose_name': 'Export PDF Settings',
                'verbose_name_plural': 'Export PDF Settings',
                'ordering': ['-active', '-modified'],
            },
        ),
    ]
