# Generated by Django 4.2.6 on 2023-11-05 16:15

import ckeditor_uploader.fields
import colorfield.fields
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
import ndr_core.models


class Migration(migrations.Migration):
    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name="NdrCoreApiImplementation",
            fields=[
                (
                    "name",
                    models.CharField(max_length=100, primary_key=True, serialize=False),
                ),
                ("label", models.CharField(max_length=100, unique=True)),
                ("url", models.URLField(blank="True", null=True)),
                ("description", models.TextField(default="blank")),
                (
                    "connection_string_example",
                    models.CharField(default="<connection-string>", max_length=512),
                ),
                ("supports_simple", models.BooleanField(default=True)),
                ("supports_simple_and_or", models.BooleanField(default=True)),
                ("supports_advanced", models.BooleanField(default=True)),
                ("supports_single_result", models.BooleanField(default=False)),
            ],
        ),
        migrations.CreateModel(
            name="NdrCoreColorScheme",
            fields=[
                (
                    "scheme_name",
                    models.CharField(
                        help_text="This name is used for export reference and as css file name. No spaces and no special characters but underscores.",
                        max_length=50,
                        primary_key=True,
                        serialize=False,
                    ),
                ),
                (
                    "scheme_label",
                    models.CharField(
                        help_text="Human readable label of the scheme. Make it descriptive.",
                        max_length=100,
                    ),
                ),
                (
                    "background_color",
                    colorfield.fields.ColorField(
                        default="#FFFFFF",
                        help_text="Basic background color of the whole page.",
                        image_field=None,
                        max_length=25,
                        samples=None,
                    ),
                ),
                (
                    "container_bg_color",
                    colorfield.fields.ColorField(
                        default="#FFFFFF",
                        help_text="Basic container (cards, tables, etc.) color of the whole page.",
                        image_field=None,
                        max_length=25,
                        samples=None,
                    ),
                ),
                (
                    "text_color",
                    colorfield.fields.ColorField(
                        default="#FFFFFF",
                        help_text="Basic text color for the whole page.",
                        image_field=None,
                        max_length=25,
                        samples=None,
                    ),
                ),
                (
                    "title_color",
                    colorfield.fields.ColorField(
                        default="#FFFFFF",
                        help_text="Title text color for the whole page.",
                        image_field=None,
                        max_length=25,
                        samples=None,
                    ),
                ),
                (
                    "button_color",
                    colorfield.fields.ColorField(
                        default="#FFFFFF",
                        help_text="Background color of primary buttons.",
                        image_field=None,
                        max_length=25,
                        samples=None,
                    ),
                ),
                (
                    "button_hover_color",
                    colorfield.fields.ColorField(
                        default="#FFFFFF",
                        help_text="Hover color of primary buttons.",
                        image_field=None,
                        max_length=25,
                        samples=None,
                    ),
                ),
                (
                    "button_text_color",
                    colorfield.fields.ColorField(
                        default="#FFFFFF",
                        help_text="Text color of primary buttons.",
                        image_field=None,
                        max_length=25,
                        samples=None,
                    ),
                ),
                (
                    "button_border_color",
                    colorfield.fields.ColorField(
                        default="#FFFFFF",
                        help_text="Border color of primary buttons.",
                        image_field=None,
                        max_length=25,
                        samples=None,
                    ),
                ),
                (
                    "second_button_color",
                    colorfield.fields.ColorField(
                        default="#FFFFFF",
                        help_text="Background color of secondary buttons.",
                        image_field=None,
                        max_length=25,
                        samples=None,
                    ),
                ),
                (
                    "second_button_hover_color",
                    colorfield.fields.ColorField(
                        default="#FFFFFF",
                        help_text="Hover color of secondary buttons.",
                        image_field=None,
                        max_length=25,
                        samples=None,
                    ),
                ),
                (
                    "second_button_text_color",
                    colorfield.fields.ColorField(
                        default="#FFFFFF",
                        help_text="Text color of secondary buttons.",
                        image_field=None,
                        max_length=25,
                        samples=None,
                    ),
                ),
                (
                    "second_button_border_color",
                    colorfield.fields.ColorField(
                        default="#FFFFFF",
                        help_text="Border color of secondary buttons.",
                        image_field=None,
                        max_length=25,
                        samples=None,
                    ),
                ),
                (
                    "link_color",
                    colorfield.fields.ColorField(
                        default="#FFFFFF",
                        help_text="Color for links.",
                        image_field=None,
                        max_length=25,
                        samples=None,
                    ),
                ),
                (
                    "form_field_bg",
                    colorfield.fields.ColorField(
                        default="#FFFFFF", image_field=None, max_length=25, samples=None
                    ),
                ),
                (
                    "form_field_fg",
                    colorfield.fields.ColorField(
                        default="#FFFFFF", image_field=None, max_length=25, samples=None
                    ),
                ),
                (
                    "footer_bg",
                    colorfield.fields.ColorField(
                        default="#FFFFFF", image_field=None, max_length=25, samples=None
                    ),
                ),
                (
                    "accent_color_1",
                    colorfield.fields.ColorField(
                        default="#FFFFFF",
                        help_text="Accent color 1. Used as navigation background and the like.",
                        image_field=None,
                        max_length=25,
                        samples=None,
                    ),
                ),
                (
                    "accent_color_2",
                    colorfield.fields.ColorField(
                        default="#FFFFFF",
                        help_text="Accent color 2. Used as element background and the like.",
                        image_field=None,
                        max_length=25,
                        samples=None,
                    ),
                ),
                (
                    "info_color",
                    colorfield.fields.ColorField(
                        default="#FFFFFF",
                        help_text="Info color for alerts.",
                        image_field=None,
                        max_length=25,
                        samples=None,
                    ),
                ),
                (
                    "success_color",
                    colorfield.fields.ColorField(
                        default="#FFFFFF",
                        help_text="Success color for alerts.",
                        image_field=None,
                        max_length=25,
                        samples=None,
                    ),
                ),
                (
                    "error_color",
                    colorfield.fields.ColorField(
                        default="#FFFFFF",
                        help_text="Error color for alerts.",
                        image_field=None,
                        max_length=25,
                        samples=None,
                    ),
                ),
            ],
        ),
        migrations.CreateModel(
            name="NdrCoreImage",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "title",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="Title of the image.",
                        max_length=200,
                    ),
                ),
                (
                    "caption",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="Caption of the image.",
                        max_length=200,
                    ),
                ),
                (
                    "citation",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="Citation text of the image.",
                        max_length=200,
                    ),
                ),
                (
                    "url",
                    models.URLField(
                        blank=True,
                        default=None,
                        help_text="URL to image or source",
                        null=True,
                    ),
                ),
                (
                    "image",
                    models.ImageField(
                        help_text="Upload an image file", upload_to="images"
                    ),
                ),
                (
                    "image_group",
                    models.CharField(
                        choices=[
                            ("page_logos", "Page Logos"),
                            ("backgrounds", "Background Images"),
                            ("elements", "Slideshow Images"),
                            ("figures", "Figures"),
                            ("logos", "Partner Images"),
                            ("people", "People"),
                        ],
                        help_text="Group the image belongs to.",
                        max_length=100,
                    ),
                ),
                ("index_in_group", models.IntegerField(default=0)),
                ("image_active", models.BooleanField(default=True)),
                (
                    "language",
                    models.CharField(
                        blank=True,
                        default=None,
                        help_text="Language of the image.",
                        max_length=10,
                        null=True,
                    ),
                ),
            ],
        ),
        migrations.CreateModel(
            name="NdrCoreManifestGroup",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "title",
                    models.CharField(
                        help_text="Title of the manifest group.", max_length=200
                    ),
                ),
                (
                    "order_value_1_title",
                    models.CharField(
                        blank=True,
                        default=None,
                        help_text="Order value 1 title",
                        max_length=200,
                        null=True,
                    ),
                ),
                (
                    "order_value_2_title",
                    models.CharField(
                        blank=True,
                        default=None,
                        help_text="Order value 2 title",
                        max_length=200,
                        null=True,
                    ),
                ),
                (
                    "order_value_3_title",
                    models.CharField(
                        blank=True,
                        default=None,
                        help_text="Order value 3 title",
                        max_length=200,
                        null=True,
                    ),
                ),
            ],
        ),
        migrations.CreateModel(
            name="NdrCoreResultField",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("expression", models.TextField(blank=True, default="")),
                (
                    "rich_expression",
                    ckeditor_uploader.fields.RichTextUploadingField(
                        blank=True, help_text="Rich text for your expression", null=True
                    ),
                ),
                (
                    "field_type",
                    models.PositiveSmallIntegerField(
                        choices=[
                            (1, "String"),
                            (2, "Rich Text String"),
                            (3, "Image"),
                            (4, "IIIF Image"),
                            (5, "Table"),
                            (6, "Map"),
                        ],
                        default=1,
                        help_text="Type of the display field",
                    ),
                ),
                (
                    "field_filter",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="A filter to apply to the expression.",
                        max_length=100,
                    ),
                ),
                (
                    "display_border",
                    models.BooleanField(
                        default=False, help_text="Should the display have a border?"
                    ),
                ),
                (
                    "html_display",
                    models.BooleanField(
                        default=False, help_text="Is the expression HTML code?"
                    ),
                ),
                (
                    "md_display",
                    models.BooleanField(
                        default=False, help_text="Is this expression markdown?"
                    ),
                ),
            ],
        ),
        migrations.CreateModel(
            name="NdrCoreResultFieldCardConfiguration",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "field_row",
                    models.IntegerField(
                        help_text="The row in the card. Starts with 1.",
                        validators=[
                            django.core.validators.MinValueValidator(1),
                            django.core.validators.MaxValueValidator(10),
                        ],
                    ),
                ),
                (
                    "field_column",
                    models.IntegerField(
                        help_text="The column in the card. Is a value between 1 and 12.",
                        validators=[
                            django.core.validators.MinValueValidator(1),
                            django.core.validators.MaxValueValidator(12),
                        ],
                    ),
                ),
                (
                    "field_size",
                    models.IntegerField(
                        help_text="The size of the field. Is a value between 1 and 12.",
                        validators=[
                            django.core.validators.MinValueValidator(1),
                            django.core.validators.MaxValueValidator(12),
                        ],
                    ),
                ),
                (
                    "result_card_group",
                    models.CharField(
                        choices=[("normal", "Normal"), ("compact", "Compact")],
                        default="normal",
                        help_text="The group of the result card. Normal is the default group.",
                        max_length=100,
                    ),
                ),
                (
                    "result_field",
                    models.ForeignKey(
                        help_text="The result field to place in a card",
                        on_delete=django.db.models.deletion.CASCADE,
                        to="ndr_core.ndrcoreresultfield",
                    ),
                ),
            ],
        ),
        migrations.CreateModel(
            name="NdrCoreRichTextTranslation",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("language", models.CharField(max_length=10)),
                (
                    "table_name",
                    models.CharField(
                        choices=[
                            ("NdrCoreSearchField", "Search Field Table"),
                            ("NdrCoreResultField", "Result Field Table"),
                            ("NdrCorePage", "Page Table"),
                            ("NdrCoreValue", "Settings Table"),
                            (
                                "NdrCoreSearchConfiguration",
                                "Search Configuration Table",
                            ),
                        ],
                        max_length=100,
                    ),
                ),
                ("object_id", models.CharField(max_length=100)),
                ("field_name", models.CharField(max_length=100)),
                (
                    "translation",
                    ckeditor_uploader.fields.RichTextUploadingField(
                        blank=True, help_text="Text for your template page", null=True
                    ),
                ),
            ],
        ),
        migrations.CreateModel(
            name="NdrCoreSearchConfiguration",
            fields=[
                (
                    "conf_name",
                    models.CharField(
                        help_text="Name of this search configuration. Can't contain spaces or special characters.",
                        max_length=100,
                        primary_key=True,
                        serialize=False,
                        verbose_name="Configuration Name",
                    ),
                ),
                (
                    "conf_label",
                    models.CharField(
                        help_text="Label of this search configuration",
                        max_length=100,
                        unique=True,
                        verbose_name="Configuration Label",
                    ),
                ),
                (
                    "api_connection_url",
                    models.CharField(
                        help_text="Connection URL for the API endpoint.",
                        max_length=512,
                        verbose_name="Connection URL",
                    ),
                ),
                (
                    "api_user_name",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="If the API needs user authentication, you can provide your username",
                        max_length=50,
                    ),
                ),
                (
                    "api_password",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="If the API needs user authentication, you can provide the password",
                        max_length=50,
                    ),
                ),
                (
                    "api_auth_key",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="If the API needs user authentication, you can provide an authentication key",
                        max_length=512,
                    ),
                ),
                (
                    "search_id_field",
                    models.CharField(
                        default="id",
                        help_text="The ID field to identify an entry.",
                        max_length=100,
                    ),
                ),
                (
                    "sort_field",
                    models.CharField(
                        default="id",
                        help_text="The field to sort the result by.",
                        max_length=100,
                    ),
                ),
                (
                    "sort_order",
                    models.CharField(
                        choices=[("asc", "Ascending"), ("desc", "Descending")],
                        default="asc",
                        help_text="The order to sort the result by.",
                        max_length=100,
                    ),
                ),
                (
                    "has_simple_search",
                    models.BooleanField(
                        default=True,
                        help_text="Should this configuration feature a simple search?",
                    ),
                ),
                (
                    "simple_search_first",
                    models.BooleanField(
                        default=True,
                        help_text="Should the simple search be displayed first?",
                    ),
                ),
                (
                    "simple_query_main_field",
                    models.CharField(
                        default="transcription.original",
                        help_text="The main field to query for a simple search.",
                        max_length=100,
                    ),
                ),
                (
                    "simple_search_tab_title",
                    models.CharField(
                        default="Simple Search",
                        help_text="The title for the simple search tab.",
                        max_length=100,
                    ),
                ),
                (
                    "simple_query_label",
                    models.CharField(
                        default="Search",
                        help_text="The label for the simple search field.",
                        max_length=100,
                    ),
                ),
                (
                    "simple_query_help_text",
                    models.CharField(
                        default="Search the database",
                        help_text="The help text for the simple search field.",
                        max_length=100,
                    ),
                ),
                (
                    "result_card_template",
                    models.CharField(
                        default="default_template.html",
                        help_text="The template to use for the result cards.",
                        max_length=200,
                    ),
                ),
                (
                    "search_has_compact_result",
                    models.BooleanField(
                        default=False,
                        help_text="If the result has a normal and a compact view, check this box.",
                    ),
                ),
                (
                    "page_size",
                    models.IntegerField(
                        default=10,
                        help_text="Size of the result page (e.g. 'How many results at once')",
                        verbose_name="Page Size",
                    ),
                ),
                (
                    "compact_page_size",
                    models.IntegerField(
                        default=10,
                        help_text="Size of the compact result page (e.g. 'How many results at once')",
                        verbose_name="Compact Page Size",
                    ),
                ),
                (
                    "repository_url",
                    models.URLField(
                        blank=True,
                        default=None,
                        help_text="URL to the data repository where this data is stored.",
                        null=True,
                        verbose_name="Repository URL",
                    ),
                ),
                (
                    "api_type",
                    models.ForeignKey(
                        help_text="Choose the API implementation of your configuration.",
                        on_delete=django.db.models.deletion.CASCADE,
                        to="ndr_core.ndrcoreapiimplementation",
                        verbose_name="API Type",
                    ),
                ),
                (
                    "result_card_fields",
                    models.ManyToManyField(
                        help_text="Result fields associated with this configuration",
                        to="ndr_core.ndrcoreresultfieldcardconfiguration",
                    ),
                ),
            ],
            bases=(ndr_core.models.TranslatableMixin, models.Model),
        ),
        migrations.CreateModel(
            name="NdrCoreSearchField",
            fields=[
                (
                    "field_name",
                    models.CharField(
                        help_text="Choose a name for the field. Can't contain spaces or special charactersand must be unique",
                        max_length=100,
                        primary_key=True,
                        serialize=False,
                    ),
                ),
                (
                    "field_label",
                    models.CharField(
                        help_text="This is the form field's label", max_length=100
                    ),
                ),
                (
                    "field_type",
                    models.PositiveSmallIntegerField(
                        choices=[
                            (1, "String"),
                            (2, "Number"),
                            (3, "Dropdown List"),
                            (4, "Multi Select List"),
                            (5, "Boolean"),
                            (6, "Date"),
                            (7, "Date Range"),
                            (8, "Number Range"),
                            (9, "Hidden"),
                            (10, "Info Text"),
                        ],
                        default=1,
                        help_text="Type of the form field. String produces a text field, Number a number field and dictionary a dropdown.",
                    ),
                ),
                (
                    "field_required",
                    models.BooleanField(
                        default=False,
                        help_text="Does this field need to be filled out?",
                    ),
                ),
                (
                    "help_text",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="The help text which will be displayed in the form",
                        max_length=250,
                    ),
                ),
                (
                    "api_parameter",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="The name of the API parameter which is used to generate a query",
                        max_length=100,
                    ),
                ),
                (
                    "schema_name",
                    models.CharField(
                        help_text="Name of the schema this search_field is created from",
                        max_length=100,
                        null=True,
                    ),
                ),
                (
                    "list_choices",
                    models.TextField(
                        blank=True,
                        default="",
                        help_text="Comma separated list of choices for dropdowns",
                    ),
                ),
                (
                    "lower_value",
                    models.CharField(
                        blank=True,
                        help_text="The lower value of a range field",
                        max_length=100,
                        null=True,
                    ),
                ),
                (
                    "upper_value",
                    models.CharField(
                        blank=True,
                        help_text="The upper value of a range field",
                        max_length=100,
                        null=True,
                    ),
                ),
                (
                    "use_in_csv_export",
                    models.BooleanField(
                        default=False,
                        help_text="Should this field be included in the CSV export?",
                    ),
                ),
                (
                    "initial_value",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="Initial value of the field",
                        max_length=100,
                    ),
                ),
                (
                    "data_field_type",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="Type of the field in the data source. This may change the way data is queried.",
                        max_length=100,
                    ),
                ),
                (
                    "input_transformation_regex",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="Regex to transform the input value before sending it to the API.",
                        max_length=100,
                    ),
                ),
            ],
            bases=(ndr_core.models.TranslatableMixin, models.Model),
        ),
        migrations.CreateModel(
            name="NdrCoreTranslation",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("language", models.CharField(max_length=10)),
                (
                    "table_name",
                    models.CharField(
                        choices=[
                            ("NdrCoreSearchField", "Search Field Table"),
                            ("NdrCoreResultField", "Result Field Table"),
                            ("NdrCorePage", "Page Table"),
                            ("NdrCoreValue", "Settings Table"),
                            (
                                "NdrCoreSearchConfiguration",
                                "Search Configuration Table",
                            ),
                        ],
                        max_length=100,
                    ),
                ),
                ("object_id", models.CharField(max_length=100)),
                ("field_name", models.CharField(max_length=100)),
                ("translation", models.CharField(max_length=255)),
            ],
        ),
        migrations.CreateModel(
            name="NdrCoreUIElement",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "type",
                    models.CharField(
                        choices=[
                            ("card", "Card"),
                            ("slides", "Slideshow"),
                            ("carousel", "Carousel"),
                            ("jumbotron", "Jumbotron"),
                            ("iframe", "IFrame"),
                            ("banner", "Banner"),
                        ],
                        max_length=100,
                    ),
                ),
                (
                    "title",
                    models.CharField(
                        help_text="Title of the element for your reference.",
                        max_length=100,
                    ),
                ),
                (
                    "use_image_conf",
                    models.BooleanField(
                        default=True,
                        help_text="Use the image's title, caption and URL?",
                    ),
                ),
                (
                    "show_indicators",
                    models.BooleanField(
                        default=True,
                        help_text="Show the indicators for slideshows and carousels?",
                    ),
                ),
                (
                    "show_title",
                    models.BooleanField(default=True, help_text="Show the title?"),
                ),
                (
                    "show_text",
                    models.BooleanField(
                        default=True, help_text="Show the element's text?"
                    ),
                ),
                (
                    "show_image",
                    models.BooleanField(default=True, help_text="Show the images?"),
                ),
                (
                    "link_element",
                    models.BooleanField(
                        default=True, help_text="Link the elements to the supplied url?"
                    ),
                ),
                (
                    "autoplay",
                    models.BooleanField(
                        default=False, help_text="Autoplay carousels and slideshows?"
                    ),
                ),
            ],
        ),
        migrations.CreateModel(
            name="NdrCoreUiStyle",
            fields=[
                (
                    "name",
                    models.CharField(max_length=100, primary_key=True, serialize=False),
                ),
                ("label", models.CharField(max_length=100)),
                ("filename", models.CharField(max_length=50)),
                ("description", models.TextField()),
            ],
        ),
        migrations.CreateModel(
            name="NdrCoreUpload",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "title",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="Title of the upload.",
                        max_length=200,
                    ),
                ),
                ("file", models.FileField(upload_to="uploads/files/")),
            ],
        ),
        migrations.CreateModel(
            name="NdrCoreUserMessage",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("message_subject", models.CharField(max_length=200)),
                ("message_text", models.TextField()),
                ("message_time", models.DateTimeField(auto_now_add=True)),
                ("message_ret_email", models.EmailField(max_length=254)),
                ("message_archived", models.BooleanField(default=False)),
                ("message_forwarded", models.BooleanField(default=False)),
            ],
        ),
        migrations.CreateModel(
            name="NdrCoreValue",
            fields=[
                (
                    "value_name",
                    models.CharField(
                        help_text="This is the identifier of a NdrCoreValue. Can't contain special characters.",
                        max_length=100,
                        primary_key=True,
                        serialize=False,
                    ),
                ),
                (
                    "value_type",
                    models.CharField(
                        choices=[
                            ("string", "String"),
                            ("rich", "Rich Text"),
                            ("integer", "Integer"),
                            ("boolean", "Boolean"),
                            ("list", "List"),
                            ("url", "URL"),
                            ("multi_list", "Multi List"),
                        ],
                        default="string",
                        help_text="The type of your value",
                        max_length=10,
                    ),
                ),
                (
                    "value_label",
                    models.CharField(
                        help_text="This is a human readable label for the value. It is used in the admin view forms.",
                        max_length=100,
                    ),
                ),
                (
                    "value_help_text",
                    models.CharField(
                        help_text="This is the help text of the form field.",
                        max_length=250,
                    ),
                ),
                (
                    "value_value",
                    models.CharField(
                        help_text="This is the actual value which can be updated",
                        max_length=100,
                    ),
                ),
                (
                    "value_options",
                    models.CharField(
                        default="",
                        help_text="Used for value_type LIST and MULTI_LIST: comma-separated list",
                        max_length=200,
                    ),
                ),
                ("is_user_value", models.BooleanField(default=False)),
                ("is_translatable", models.BooleanField(default=False)),
            ],
        ),
        migrations.CreateModel(
            name="NdrCoreUiElementItem",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("order_idx", models.IntegerField()),
                ("title", models.CharField(blank=True, max_length=100)),
                ("text", models.TextField(blank=True)),
                ("url", models.URLField(blank=True)),
                (
                    "belongs_to",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        to="ndr_core.ndrcoreuielement",
                    ),
                ),
                (
                    "ndr_image",
                    models.ForeignKey(
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="ndr_core.ndrcoreimage",
                    ),
                ),
            ],
        ),
        migrations.CreateModel(
            name="NdrCoreSearchStatisticEntry",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("search_term", models.CharField(default="", max_length=100)),
                ("search_query", models.CharField(default="", max_length=255)),
                ("search_no_results", models.IntegerField(default=0)),
                ("search_time", models.DateTimeField(auto_now_add=True)),
                ("search_location", models.CharField(max_length=20, null=True)),
                (
                    "language",
                    models.CharField(
                        blank=True,
                        default=None,
                        help_text="Language of the search.",
                        max_length=10,
                        null=True,
                    ),
                ),
                (
                    "search_config",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        to="ndr_core.ndrcoresearchconfiguration",
                    ),
                ),
            ],
        ),
        migrations.CreateModel(
            name="NdrCoreSearchFieldFormConfiguration",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "field_row",
                    models.IntegerField(
                        help_text="The row in the form. Starts with 1.",
                        validators=[
                            django.core.validators.MinValueValidator(1),
                            django.core.validators.MaxValueValidator(20),
                        ],
                    ),
                ),
                (
                    "field_column",
                    models.IntegerField(
                        help_text="The column in the form. Is a value between 1 and 12.",
                        validators=[
                            django.core.validators.MinValueValidator(1),
                            django.core.validators.MaxValueValidator(12),
                        ],
                    ),
                ),
                (
                    "field_size",
                    models.IntegerField(
                        help_text="The size of the field. Is a value between 1 and 12.",
                        validators=[
                            django.core.validators.MinValueValidator(1),
                            django.core.validators.MaxValueValidator(12),
                        ],
                    ),
                ),
                (
                    "search_field",
                    models.ForeignKey(
                        help_text="The search field to place in a form",
                        on_delete=django.db.models.deletion.CASCADE,
                        to="ndr_core.ndrcoresearchfield",
                    ),
                ),
            ],
        ),
        migrations.AddField(
            model_name="ndrcoresearchconfiguration",
            name="search_form_fields",
            field=models.ManyToManyField(
                help_text="Fields associated with this configuration",
                to="ndr_core.ndrcoresearchfieldformconfiguration",
            ),
        ),
        migrations.CreateModel(
            name="NdrCorePage",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "view_name",
                    models.CharField(
                        help_text="The url part of your page (e.g. https://yourdomain.org/p/view_name)",
                        max_length=200,
                        unique=True,
                    ),
                ),
                (
                    "page_type",
                    models.IntegerField(
                        choices=[
                            (1, "Template Page"),
                            (3, "Search Page"),
                            (5, "Contact Form"),
                            (7, "Flip Book"),
                            (8, "About Us Page"),
                            (9, "Viewer Page"),
                        ],
                        default=1,
                        help_text="Choose a type for your page.",
                    ),
                ),
                (
                    "name",
                    models.CharField(
                        help_text="The name of the page, e.g. the page's title",
                        max_length=200,
                        verbose_name="Page Title",
                    ),
                ),
                (
                    "show_page_title",
                    models.BooleanField(
                        default=True, help_text="Should the page title be displayed?"
                    ),
                ),
                (
                    "label",
                    models.CharField(
                        help_text="The label of the page, e.g. the page's navigation label",
                        max_length=200,
                    ),
                ),
                (
                    "show_in_navigation",
                    models.BooleanField(
                        default=True,
                        help_text="Should the page be displayed in the navigation?",
                    ),
                ),
                (
                    "nav_icon",
                    models.CharField(
                        blank=True,
                        help_text="The fontawesome nav icon (leave blank if none)",
                        max_length=200,
                    ),
                ),
                ("index", models.IntegerField(default=0, help_text="Page order")),
                (
                    "template_text",
                    ckeditor_uploader.fields.RichTextUploadingField(
                        blank=True, help_text="Text for your template page", null=True
                    ),
                ),
                (
                    "parent_page",
                    models.ForeignKey(
                        blank=True,
                        default=None,
                        help_text="If you want this page to be a sub-page of another one, you canchoose the parent page here",
                        null=True,
                        on_delete=django.db.models.deletion.DO_NOTHING,
                        to="ndr_core.ndrcorepage",
                    ),
                ),
                (
                    "search_configs",
                    models.ManyToManyField(to="ndr_core.ndrcoresearchconfiguration"),
                ),
            ],
            bases=(ndr_core.models.TranslatableMixin, models.Model),
        ),
        migrations.CreateModel(
            name="NdrCoreManifest",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                (
                    "title",
                    models.CharField(
                        blank=True,
                        default="",
                        help_text="Title of the manifest. Is shown in the dropdown of the page.",
                        max_length=200,
                    ),
                ),
                ("file", models.FileField(upload_to="uploads/manifests/")),
                (
                    "order_value_1",
                    models.CharField(
                        blank=True, default=None, max_length=200, null=True
                    ),
                ),
                (
                    "order_value_2",
                    models.CharField(
                        blank=True, default=None, max_length=200, null=True
                    ),
                ),
                (
                    "order_value_3",
                    models.CharField(
                        blank=True, default=None, max_length=200, null=True
                    ),
                ),
                (
                    "manifest_group",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        to="ndr_core.ndrcoremanifestgroup",
                    ),
                ),
            ],
        ),
        migrations.CreateModel(
            name="NdrCoreCorrection",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("corrected_record_id", models.CharField(max_length=255)),
                ("corrector_orcid", models.CharField(max_length=50)),
                (
                    "corrected_dataset",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        to="ndr_core.ndrcoresearchconfiguration",
                    ),
                ),
            ],
        ),
        migrations.CreateModel(
            name="NdrCoreCorrectedField",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("field_name", models.CharField(max_length=100)),
                ("old_value", models.TextField()),
                ("new_value", models.TextField()),
                (
                    "ndr_correction",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        to="ndr_core.ndrcorecorrection",
                    ),
                ),
            ],
        ),
    ]
