# -*- coding: utf-8 -*-
# Generated by Django 1.11.5 on 2017-09-08 14:02
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Instance',
            fields=[
                ('port', models.IntegerField(primary_key=True, serialize=False, verbose_name='port')),
                ('name', models.CharField(blank=True, default=None, max_length=64, null=True, verbose_name='name')),
                ('created', models.DateTimeField(auto_now_add=True, verbose_name='created')),
            ],
        ),
        migrations.CreateModel(
            name='Offer',
            fields=[
                ('port', models.IntegerField(unique=True, verbose_name='port')),
                ('name', models.CharField(max_length=64, verbose_name='name')),
                ('secret', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False, verbose_name='secret')),
                ('created', models.DateTimeField(auto_now_add=True, verbose_name='created')),
            ],
        ),
        migrations.CreateModel(
            name='Service',
            fields=[
                ('name', models.CharField(max_length=64, primary_key=True, serialize=False, verbose_name='name')),
                ('description', models.TextField(blank=True, default=None, null=True, verbose_name='description')),
                ('start', models.IntegerField(verbose_name='start')),
                ('end', models.IntegerField(verbose_name='end')),
            ],
        ),
        migrations.AddField(
            model_name='offer',
            name='service',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='django_portmaster.Service'),
        ),
        migrations.AddField(
            model_name='instance',
            name='service',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='django_portmaster.Service'),
        ),
        migrations.AlterUniqueTogether(
            name='offer',
            unique_together=set([('service', 'name')]),
        ),
        migrations.AlterUniqueTogether(
            name='instance',
            unique_together=set([('service', 'name')]),
        ),
    ]
