# Generated by Django 5.0.8 on 2024-11-21 10:43

import c3nav.mapdata.fields
import django.core.serializers.json
import django.db.models.deletion
import django_pydantic_field.compat.django
import django_pydantic_field.fields
import types
import typing
from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ('mapdata', '0110_theme_icon_path_theme_leaflet_marker_config'),
    ]

    operations = [
        migrations.CreateModel(
            name='DataOverlay',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', c3nav.mapdata.fields.I18nField(blank=True, fallback_any=True, fallback_value='{model} {pk}', plural_name='titles', verbose_name='Title')),
                ('description', models.TextField(blank=True, verbose_name='Description')),
                ('stroke_color', models.TextField(blank=True, null=True, verbose_name='default stroke color')),
                ('stroke_width', models.FloatField(blank=True, null=True, verbose_name='default stroke width')),
                ('fill_color', models.TextField(blank=True, null=True, verbose_name='default fill color')),
                ('pull_url', models.URLField(blank=True, null=True, verbose_name='pull URL')),
                ('pull_headers', django_pydantic_field.fields.PydanticSchemaField(config=None, encoder=django.core.serializers.json.DjangoJSONEncoder, null=True, schema=django_pydantic_field.compat.django.GenericContainer(typing.Union, (django_pydantic_field.compat.django.GenericContainer(dict, (str, str)), types.NoneType)), verbose_name='headers for pull http request (JSON object)')),
                ('pull_interval', models.DurationField(blank=True, null=True, verbose_name='pull interval')),
            ],
            options={
                'verbose_name': 'Data Overlay',
                'verbose_name_plural': 'Data Overlays',
                'default_related_name': 'data_overlays',
            },
        ),
        migrations.CreateModel(
            name='DataOverlayFeature',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', c3nav.mapdata.fields.I18nField(blank=True, fallback_any=True, fallback_value='{model} {pk}', plural_name='titles', verbose_name='Title')),
                ('import_tag', models.CharField(blank=True, max_length=64, null=True, verbose_name='import tag')),
                ('geometry', c3nav.mapdata.fields.GeometryField(default=None, help_text=None)),
                ('external_url', models.URLField(blank=True, null=True, verbose_name='external URL')),
                ('stroke_color', models.CharField(blank=True, max_length=255, null=True, verbose_name='stroke color')),
                ('stroke_width', models.FloatField(blank=True, null=True, verbose_name='stroke width')),
                ('fill_color', models.CharField(blank=True, max_length=255, null=True, verbose_name='fill color')),
                ('show_label', models.BooleanField(default=False, verbose_name='show label')),
                ('show_geometry', models.BooleanField(default=True, verbose_name='show geometry')),
                ('interactive', models.BooleanField(default=True, help_text='disable to make this feature click-through', verbose_name='interactive')),
                ('point_icon', models.CharField(blank=True, help_text='use this material icon to display points, instead of drawing a small circle (only makes sense if the geometry is a point)', max_length=255, null=True, verbose_name='point icon')),
                ('extra_data', django_pydantic_field.fields.PydanticSchemaField(blank=True, config=None, default=None, encoder=django.core.serializers.json.DjangoJSONEncoder, null=True, schema=django_pydantic_field.compat.django.GenericContainer(typing.Union, (django_pydantic_field.compat.django.GenericContainer(dict, (str, str)), types.NoneType)), verbose_name='extra data (JSON object)')),
                ('level', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='data_overlay_features', to='mapdata.level', verbose_name='level')),
                ('overlay', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='features', to='mapdata.dataoverlay', verbose_name='Overlay')),
            ],
            options={
                'abstract': False,
            },
        ),
    ]
