# -*- coding: utf-8 -*-
# Generated by Django 1.10.2 on 2016-10-05 18:43
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='AssocPlaylistFile',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('sort', models.PositiveIntegerField()),
            ],
        ),
        migrations.CreateModel(
            name='File',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, primary_key=True, serialize=False)),
                ('mime_type', models.CharField(max_length=255)),
                ('size', models.PositiveIntegerField(default=0)),
                ('mtime', models.FloatField()),
                ('md5sum', maio_core.maiofields.FixedCharField(max_length=32)),
                ('tn_path', models.CharField(max_length=1024)),
                ('file_path', models.CharField(max_length=1024)),
                ('file_path_hash', maio_core.maiofields.FixedCharField(max_length=32, unique=True)),
                ('rating', models.SmallIntegerField(null=True)),
                ('views', models.PositiveIntegerField(default=0)),
                ('media_length', models.PositiveIntegerField(null=True)),
                ('date_added', models.DateTimeField(auto_now_add=True)),
                ('is_active', models.BooleanField(default=True)),
            ],
            options={
                'ordering': ['file_path'],
            },
        ),
        migrations.CreateModel(
            name='Playlist',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=255)),
                ('date_added', models.DateTimeField(auto_now_add=True)),
                ('date_modified', models.DateTimeField(null=True)),
                ('views', models.PositiveIntegerField(default=0)),
                ('default_order', models.PositiveSmallIntegerField(default=0)),
                ('time_between', models.PositiveIntegerField(default=5)),
                ('media_class', models.PositiveSmallIntegerField(default=0)),
            ],
        ),
        migrations.CreateModel(
            name='Tag',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=255, unique=True)),
                ('count', models.PositiveIntegerField(default=0)),
                ('date_added', models.DateTimeField(auto_now_add=True)),
                ('date_modified', models.DateTimeField(auto_now=True)),
                ('left_node', models.PositiveIntegerField(blank=True, null=True)),
                ('right_node', models.PositiveIntegerField(blank=True, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='FileCaption',
            fields=[
                ('file', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, primary_key=True, serialize=False, to='maio_core.File')),
                ('caption', models.TextField()),
            ],
        ),
        migrations.AddField(
            model_name='assocplaylistfile',
            name='file',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='maio_core.File'),
        ),
        migrations.AddField(
            model_name='assocplaylistfile',
            name='playlist',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='maio_core.Playlist'),
        ),
    ]
