# -*- coding: utf-8 -*-
# Generated by Django 1.11.9 on 2018-01-23 17:41
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Stream',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True, help_text='creation date')),
                ('updated_at', models.DateTimeField(auto_now=True, help_text='edition date', null=True)),
                ('url', models.URLField(max_length=250, verbose_name='url')),
                ('is_active', models.BooleanField(default=False, verbose_name='is active')),
            ],
            options={
                'verbose_name': 'stream',
                'permissions': (('view_stream', 'Can view stream'),),
                'verbose_name_plural': 'streams',
            },
            bases=(parler.models.TranslatableModelMixin, models.Model),
        ),
        migrations.CreateModel(
            name='StreamEvent',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True, help_text='creation date')),
                ('updated_at', models.DateTimeField(auto_now=True, help_text='edition date', null=True)),
                ('date_time', models.DateTimeField(verbose_name='date time')),
                ('stream', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='events', to='streams.Stream', verbose_name='stream')),
            ],
            options={
                'verbose_name': 'stream event',
                'ordering': ('-date_time',),
                'verbose_name_plural': 'stream events',
            },
            bases=(parler.models.TranslatableModelMixin, models.Model),
        ),
        migrations.CreateModel(
            name='StreamEventTranslation',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('language_code', models.CharField(db_index=True, max_length=15, verbose_name='Language')),
                ('title', models.CharField(max_length=250, verbose_name='name')),
                ('description', models.TextField(verbose_name='description')),
                ('master', models.ForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='translations', to='streams.StreamEvent')),
            ],
            options={
                'managed': True,
                'db_table': 'streams_streamevent_translation',
                'db_tablespace': '',
                'default_permissions': (),
                'verbose_name': 'stream event Translation',
            },
        ),
        migrations.CreateModel(
            name='StreamTranslation',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('language_code', models.CharField(db_index=True, max_length=15, verbose_name='Language')),
                ('title', models.CharField(max_length=250, verbose_name='name')),
                ('description', models.TextField(verbose_name='description')),
                ('master', models.ForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='translations', to='streams.Stream')),
            ],
            options={
                'managed': True,
                'db_table': 'streams_stream_translation',
                'db_tablespace': '',
                'default_permissions': (),
                'verbose_name': 'stream Translation',
            },
        ),
        migrations.AlterUniqueTogether(
            name='streamtranslation',
            unique_together=set([('language_code', 'master')]),
        ),
        migrations.AlterUniqueTogether(
            name='streameventtranslation',
            unique_together=set([('language_code', 'master')]),
        ),
    ]
