# -*- coding: utf-8 -*-
# Generated by Django 1.10.1 on 2016-09-29 01:43
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=255, verbose_name='title')),
                ('slug', models.SlugField(unique=True, verbose_name='slug')),
                ('full', models.CharField(editable=False, max_length=255, verbose_name='full title')),
                ('json', models.TextField(editable=False, verbose_name='JSON')),
                ('parent', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='children', to='podcast.Category', verbose_name='parent')),
            ],
            options={
                'verbose_name': 'category',
                'verbose_name_plural': 'categories',
                'ordering': ['full'],
            },
        ),
        migrations.CreateModel(
            name='Enclosure',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('file', models.FileField(help_text='Supported formats: M4A, MP3, MOV, MP4, M4V, PDF, and EPUB', upload_to='podcast/enclosures/files/', verbose_name='file')),
                ('timedelta', models.DurationField(null=True, verbose_name='time delta')),
                ('type', models.CharField(choices=[('audio/mpeg', 'MP3 audio'), ('audio/x-m4a', 'M4A audio'), ('video/mp4', 'MP4 video'), ('video/x-m4v', 'M4V video'), ('video/quicktime', 'MOV video'), ('application/pdf', 'PDF file'), ('document/x-epub', 'ePub file')], default='audio/mpeg', max_length=255, verbose_name='type')),
                ('poster', models.ImageField(blank=True, help_text='For video files', upload_to='podcast/enclosures/posters/', verbose_name='poster')),
                ('cc', models.BooleanField(default=False, help_text='For video files with closed captions', verbose_name='closed captions?')),
            ],
            options={
                'verbose_name': 'enclosure',
                'verbose_name_plural': 'enclosures',
                'ordering': ['-episode__pub_date'],
            },
        ),
        migrations.CreateModel(
            name='Episode',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=255, verbose_name='title')),
                ('slug', models.SlugField(verbose_name='slug')),
                ('description', models.TextField(help_text='Accepts HTML', verbose_name='description')),
                ('pub_date', models.DateTimeField(verbose_name='pub date')),
                ('subtitle', models.CharField(blank=True, help_text='Accepts HTML', max_length=255, verbose_name='subtitle')),
                ('summary', models.TextField(blank=True, help_text='Max length of 4,000 characters; accepts HTML; if blank, uses description', max_length=4000, verbose_name='summary')),
                ('author_name', models.CharField(blank=True, help_text='Appears as the "artist" of the episode; if blank, uses show\'s author name', max_length=255, verbose_name='author name')),
                ('author_email', models.EmailField(blank=True, help_text="If blank, uses show's author email", max_length=254, verbose_name='author e-mail')),
                ('image', models.ImageField(blank=True, help_text="1400&times;1400&ndash;3000&times;3000px, 72DPI, JPG/PNG, RGB; if blank, uses show's image", upload_to='podcast/episodes/', verbose_name='image')),
                ('explicit', models.BooleanField(default=False, help_text='Indicates explicit language or adult content', verbose_name='explicit?')),
                ('block', models.BooleanField(default=False, help_text='Prevents episode from appearing on the iTunes Store', verbose_name='block?')),
                ('order', models.PositiveIntegerField(verbose_name='order')),
            ],
            options={
                'verbose_name': 'episode',
                'verbose_name_plural': 'episodes',
                'ordering': ['-pub_date'],
            },
        ),
        migrations.CreateModel(
            name='Show',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=255, verbose_name='title')),
                ('slug', models.SlugField(unique=True, verbose_name='slug')),
                ('image', models.ImageField(blank=True, help_text='1400&times;1400&ndash;3000&times;3000px; 72DPI; JPG, PNG; RGB; if blank, default <a href="/static/podcast/img/no_artwork.png">no artwork</a> is used', upload_to='podcast/shows/', verbose_name='image')),
                ('description', models.TextField(help_text='Accepts HTML', verbose_name='description')),
                ('ttl', models.CharField(choices=[('60', '1 hour'), ('1440', '1 day'), ('10080', '1 week')], default='1440', help_text='Time to live; how often the feed is refreshed', max_length=255, verbose_name='TTL')),
                ('subtitle', models.CharField(help_text='Accepts HTML', max_length=255, verbose_name='subtitle')),
                ('summary', models.TextField(blank=True, help_text="Max length of 4,000 characters; accepts HTML; if blank, uses show's description", max_length=4000, verbose_name='summary')),
                ('author_name', models.CharField(help_text='Appears as the "artist" of the podcast', max_length=255, verbose_name='author name')),
                ('author_email', models.EmailField(max_length=254, verbose_name='author e-mail')),
                ('owner_name', models.CharField(blank=True, help_text='Administrative contact of the podcast; if blank, uses author name', max_length=255, verbose_name='owner name')),
                ('owner_email', models.EmailField(blank=True, help_text='Administrative contact of the podcast; if blank, uses author email', max_length=255, verbose_name='owner e-mail')),
                ('copyright', models.CharField(blank=True, help_text="Organization name; &copy; and 2016 will be prepended automatically; if blank, uses show's title", max_length=255, verbose_name='copyright')),
                ('explicit', models.BooleanField(default=False, help_text='Indicates explicit language or adult content', verbose_name='explicit?')),
                ('block', models.BooleanField(default=False, help_text='Prevents entire podcast from appearing on the iTunes Store', verbose_name='block?')),
                ('complete', models.BooleanField(default=False, help_text='Indicates entire podcast is complete and no future episodes will be created', verbose_name='complete?')),
                ('itunes', models.URLField(blank=True, help_text='Paste iTunes URL here after <a href="https://podcastsconnect.apple.com/">submission of show feed URL</a> to Podcasts Connect', verbose_name='iTunes URL')),
                ('categories', models.ManyToManyField(help_text='Please select parent category if selecting a subcategory, e.g. <strong>Arts</strong> if <strong>Arts / Design</strong>', to='podcast.Category', verbose_name='categories')),
            ],
            options={
                'verbose_name': 'show',
                'verbose_name_plural': 'shows',
                'ordering': ['title'],
            },
        ),
        migrations.CreateModel(
            name='Speaker',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255, verbose_name='Name')),
                ('email', models.EmailField(max_length=254, unique=True, verbose_name='E-mail')),
                ('photo', models.ImageField(blank=True, upload_to='podcast/speakers/', verbose_name='Photo')),
                ('bio', models.TextField(blank=True, verbose_name='Bio')),
            ],
            options={
                'verbose_name': 'speaker',
                'verbose_name_plural': 'speakers',
                'ordering': ['name', 'email'],
            },
        ),
        migrations.AddField(
            model_name='show',
            name='hosts',
            field=models.ManyToManyField(blank=True, to='podcast.Speaker', verbose_name='hosts'),
        ),
        migrations.AddField(
            model_name='episode',
            name='guests',
            field=models.ManyToManyField(blank=True, related_name='guest', to='podcast.Speaker', verbose_name='guests'),
        ),
        migrations.AddField(
            model_name='episode',
            name='hosts',
            field=models.ManyToManyField(blank=True, help_text='If different from show hosts', related_name='host', to='podcast.Speaker', verbose_name='hosts'),
        ),
        migrations.AddField(
            model_name='episode',
            name='show',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='podcast.Show', verbose_name='show'),
        ),
        migrations.AddField(
            model_name='enclosure',
            name='episode',
            field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='podcast.Episode', verbose_name='episode'),
        ),
    ]
