# -*- coding: utf-8 -*-
# Generated by Django 1.9.2 on 2016-02-19 15:37
from __future__ import unicode_literals

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import edit.models
import oxdjango.fields


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('annotation', '0002_annotation_clip'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Clip',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('modified', models.DateTimeField(auto_now=True)),
                ('index', models.IntegerField(default=0)),
                ('start', models.FloatField(default=0)),
                ('end', models.FloatField(default=0)),
                ('duration', models.FloatField(default=0)),
                ('hue', models.FloatField(default=0)),
                ('saturation', models.FloatField(default=0)),
                ('lightness', models.FloatField(default=0)),
                ('volume', models.FloatField(default=0)),
                ('sortvalue', models.CharField(db_index=True, max_length=1000, null=True)),
                ('annotation', models.ForeignKey(default=None, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='editclip', to='annotation.Annotation')),
            ],
        ),
        migrations.CreateModel(
            name='Edit',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('modified', models.DateTimeField(auto_now=True)),
                ('name', models.CharField(max_length=255)),
                ('status', models.CharField(default='private', max_length=20)),
                ('description', models.TextField(default='')),
                ('rightslevel', models.IntegerField(db_index=True, default=0)),
                ('query', oxdjango.fields.DictField(default={'static': True})),
                ('type', models.CharField(default='static', max_length=255)),
                ('icon', models.ImageField(blank=True, default=None, null=True, upload_to=edit.models.get_icon_path)),
                ('poster_frames', oxdjango.fields.TupleField(default=[], editable=False)),
                ('subscribed_users', models.ManyToManyField(related_name='subscribed_edits', to=settings.AUTH_USER_MODEL)),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='edits', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Position',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('section', models.CharField(max_length=255)),
                ('position', models.IntegerField(default=0)),
                ('edit', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='position', to='edit.Edit')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='edit_position', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AddField(
            model_name='clip',
            name='edit',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='clips', to='edit.Edit'),
        ),
    ]
