# Generated by Django 5.1.2 on 2024-11-04 15:46

import django.core.serializers.json
import django.db.models.deletion
import wcd_settings.utils.dynamic_choices_field
from django.conf import settings
from django.db import migrations, models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='AppSettings',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('config', models.JSONField(blank=True, default=dict, encoder=django.core.serializers.json.DjangoJSONEncoder, verbose_name='Config')),
                ('created_at', models.DateTimeField(auto_now_add=True, db_index=True, verbose_name='Created at')),
                ('updated_at', models.DateTimeField(auto_now=True, db_index=True, verbose_name='Updated at')),
                ('key', wcd_settings.utils.dynamic_choices_field.DynamicChoicesField(choices=[], max_length=1024, unique=True, verbose_name='Key')),
            ],
            options={
                'verbose_name': 'App settings',
                'verbose_name_plural': 'Apps settings',
            },
        ),
        migrations.CreateModel(
            name='UserSettings',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('config', models.JSONField(blank=True, default=dict, encoder=django.core.serializers.json.DjangoJSONEncoder, verbose_name='Config')),
                ('created_at', models.DateTimeField(auto_now_add=True, db_index=True, verbose_name='Created at')),
                ('updated_at', models.DateTimeField(auto_now=True, db_index=True, verbose_name='Updated at')),
                ('key', wcd_settings.utils.dynamic_choices_field.DynamicChoicesField(choices=[], max_length=1024, verbose_name='Key')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='wcd_user_settings', to=settings.AUTH_USER_MODEL, verbose_name='User')),
            ],
            options={
                'verbose_name': 'User settings',
                'verbose_name_plural': 'Users settings',
                'unique_together': {('key', 'user')},
            },
        ),
    ]
