# Generated by Django 3.0.6 on 2020-05-19 22:08

import uuid

import django.db.models.deletion
from django.db import migrations, models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ("passbook_policies", "0001_initial"),
        ("passbook_flows", "0001_initial"),
    ]

    operations = [
        migrations.CreateModel(
            name="Prompt",
            fields=[
                (
                    "prompt_uuid",
                    models.UUIDField(
                        default=uuid.uuid4,
                        editable=False,
                        primary_key=True,
                        serialize=False,
                    ),
                ),
                (
                    "field_key",
                    models.SlugField(
                        help_text="Name of the form field, also used to store the value"
                    ),
                ),
                ("label", models.TextField()),
                (
                    "type",
                    models.CharField(
                        choices=[
                            ("text", "Text"),
                            ("e-mail", "Email"),
                            ("password", "Password"),
                            ("number", "Number"),
                            ("hidden", "Hidden"),
                        ],
                        max_length=100,
                    ),
                ),
                ("required", models.BooleanField(default=True)),
                ("placeholder", models.TextField()),
            ],
            options={"verbose_name": "Prompt", "verbose_name_plural": "Prompts",},
        ),
        migrations.CreateModel(
            name="PromptStage",
            fields=[
                (
                    "stage_ptr",
                    models.OneToOneField(
                        auto_created=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        parent_link=True,
                        to="passbook_flows.Stage",
                    ),
                ),
                (
                    "policybindingmodel_ptr",
                    models.OneToOneField(
                        auto_created=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        parent_link=True,
                        primary_key=True,
                        serialize=False,
                        to="passbook_policies.PolicyBindingModel",
                    ),
                ),
                ("fields", models.ManyToManyField(to="passbook_stages_prompt.Prompt")),
            ],
            options={
                "verbose_name": "Prompt Stage",
                "verbose_name_plural": "Prompt Stages",
            },
            bases=("passbook_policies.policybindingmodel", "passbook_flows.stage"),
        ),
    ]
