# Generated by Django 5.2.8 on 2025-11-25 02:32

from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ('core', '0002_fieldcategory_customfield_fieldvalue'),
    ]

    operations = [
        migrations.CreateModel(
            name='DynamicFormData',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('content_type', models.CharField(help_text="Model name (e.g., 'Product', 'Customer', 'Sale')", max_length=50)),
                ('object_id', models.PositiveIntegerField(help_text='ID of the related object')),
                ('form_data', models.JSONField(default=dict, help_text='Complete form data as JSON')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
            ],
            options={
                'verbose_name': 'Dynamic Form Data',
                'verbose_name_plural': 'Dynamic Form Data',
                'unique_together': {('content_type', 'object_id')},
            },
        ),
        migrations.CreateModel(
            name='FormDataEntry',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('content_type', models.CharField(max_length=50)),
                ('object_id', models.PositiveIntegerField()),
                ('field_name', models.CharField(max_length=100)),
                ('field_value', models.TextField()),
                ('field_type', models.CharField(max_length=20)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
            ],
            options={
                'verbose_name': 'Form Data Entry',
                'verbose_name_plural': 'Form Data Entries',
                'unique_together': {('content_type', 'object_id', 'field_name')},
            },
        ),
    ]
