# Generated by Django 2.2.6 on 2019-10-09 16:00

import datetime
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import uuid


class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('backend', '0004_credentials_namedcredentials_personalnamedcredentials_staticcredentials'),
    ]

    operations = [
        migrations.CreateModel(
            name='Ticket',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('sessionid', models.UUIDField(blank=True, null=True)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('validityperiod', models.DurationField(default=datetime.timedelta(days=1))),
                ('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='author_of_tickets', to=settings.AUTH_USER_MODEL)),
                ('connection', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='backend.Connection')),
                ('parent', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='shared', to='backend.Ticket')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='user_of_tickets', to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
