# Generated by Django 3.1.7 on 2021-04-01 20:55

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


class Migration(migrations.Migration):

    dependencies = [
        ("tusdfileshare", "0002_auto_20210401_2055"),
        ("workspaces", "0009_auto_20210320_1931"),
    ]

    operations = [
        migrations.CreateModel(
            name="WorkspaceApp",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("unique_id", models.UUIDField(default=uuid.uuid4, editable=False)),
                ("name", models.CharField(max_length=255)),
            ],
        ),
        migrations.CreateModel(
            name="WorkspaceFileShareApp",
            fields=[
                (
                    "workspaceapp_ptr",
                    models.OneToOneField(
                        auto_created=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        parent_link=True,
                        to="workspaces.workspaceapp",
                    ),
                ),
                (
                    "tusd_file_share",
                    models.OneToOneField(
                        on_delete=django.db.models.deletion.CASCADE,
                        primary_key=True,
                        serialize=False,
                        to="tusdfileshare.tusdfileshare",
                    ),
                ),
            ],
            bases=("workspaces.workspaceapp",),
        ),
        migrations.CreateModel(
            name="WorkspacePadApp",
            fields=[
                (
                    "workspaceapp_ptr",
                    models.OneToOneField(
                        auto_created=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        parent_link=True,
                        primary_key=True,
                        serialize=False,
                        to="workspaces.workspaceapp",
                    ),
                ),
                ("iframe_url", models.URLField()),
            ],
            bases=("workspaces.workspaceapp",),
        ),
        migrations.CreateModel(
            name="WorkspaceTab",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("created_at", models.DateTimeField(auto_now_add=True)),
                ("unique_id", models.UUIDField(default=uuid.uuid4, editable=False)),
                ("name", models.CharField(max_length=255)),
                (
                    "workspace",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        to="workspaces.workspace",
                    ),
                ),
            ],
            options={
                "ordering": ["created_at"],
            },
        ),
        migrations.AddField(
            model_name="workspaceapp",
            name="tab",
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to="workspaces.workspacetab",
            ),
        ),
    ]
