# Generated by Django 3.1.14 on 2022-02-01 12:41

import django.db.models.deletion
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),
        ("apis_metainfo", "0001_initial"),
    ]

    operations = [
        migrations.CreateModel(
            name="VocabNames",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("name", models.CharField(max_length=255)),
            ],
        ),
        migrations.CreateModel(
            name="VocabsBaseClass",
            fields=[
                (
                    "rootobject_ptr",
                    models.OneToOneField(
                        auto_created=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        parent_link=True,
                        primary_key=True,
                        serialize=False,
                        to="apis_metainfo.rootobject",
                    ),
                ),
                (
                    "description",
                    models.TextField(
                        blank=True, help_text="Brief description of the used term."
                    ),
                ),
                (
                    "status",
                    models.CharField(
                        choices=[
                            ("rej", "rejected"),
                            ("ac", "accepted"),
                            ("can", "candidate"),
                            ("del", "deleted"),
                        ],
                        default="can",
                        max_length=4,
                    ),
                ),
                (
                    "parent_class",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="apis_vocabularies.vocabsbaseclass",
                    ),
                ),
                (
                    "userAdded",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        to=settings.AUTH_USER_MODEL,
                    ),
                ),
                (
                    "vocab_name",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.SET_NULL,
                        to="apis_vocabularies.vocabnames",
                    ),
                ),
            ],
            bases=("apis_metainfo.rootobject",),
        ),
        migrations.CreateModel(
            name="CollectionType",
            fields=[
                (
                    "vocabsbaseclass_ptr",
                    models.OneToOneField(
                        auto_created=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        parent_link=True,
                        primary_key=True,
                        serialize=False,
                        to="apis_vocabularies.vocabsbaseclass",
                    ),
                ),
            ],
            bases=("apis_vocabularies.vocabsbaseclass",),
        ),
        migrations.CreateModel(
            name="LabelType",
            fields=[
                (
                    "vocabsbaseclass_ptr",
                    models.OneToOneField(
                        auto_created=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        parent_link=True,
                        primary_key=True,
                        serialize=False,
                        to="apis_vocabularies.vocabsbaseclass",
                    ),
                ),
            ],
            bases=("apis_vocabularies.vocabsbaseclass",),
        ),
        migrations.CreateModel(
            name="VocabsUri",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("uri", models.URLField()),
                ("domain", models.CharField(blank=True, max_length=255)),
                ("rdf_link", models.URLField(blank=True)),
                ("loaded", models.BooleanField(default=False)),
                ("loaded_time", models.DateTimeField(blank=True, null=True)),
                (
                    "vocab",
                    models.ForeignKey(
                        blank=True,
                        null=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        to="apis_vocabularies.vocabsbaseclass",
                    ),
                ),
            ],
        ),
        migrations.CreateModel(
            name="TextType",
            fields=[
                (
                    "vocabsbaseclass_ptr",
                    models.OneToOneField(
                        auto_created=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        parent_link=True,
                        primary_key=True,
                        serialize=False,
                        to="apis_vocabularies.vocabsbaseclass",
                    ),
                ),
                ("entity", models.CharField(max_length=255)),
                (
                    "lang",
                    models.CharField(
                        blank=True,
                        default="deu",
                        help_text="The ISO 639-3 (or 2) code for the label's language.",
                        max_length=3,
                        null=True,
                        verbose_name="ISO Code",
                    ),
                ),
            ],
            bases=("apis_vocabularies.vocabsbaseclass",),
        ),
    ]
