# Generated by Django 2.2.3 on 2019-07-25 18:33

import audiofield.fields
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import markdownx.models
import video_encoding.fields


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Blogger',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('bio', markdownx.models.MarkdownxField(blank=True, max_length=500)),
                ('profile_image', models.ImageField(blank=True, help_text='User Headshot', null=True, upload_to='blogimg/profiles/')),
                ('image_height', models.PositiveIntegerField(blank=True, default='100', null=True)),
                ('image_width', models.PositiveIntegerField(blank=True, default='100', null=True)),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='blogger', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'db_table': 'blog_blogger',
            },
        ),
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=100)),
                ('slug', models.SlugField(max_length=100)),
                ('description', models.TextField(max_length=280)),
            ],
            options={
                'verbose_name_plural': 'categories',
            },
        ),
        migrations.CreateModel(
            name='Pic',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=99)),
                ('desc', models.TextField(max_length=300)),
                ('posted', models.DateField(auto_now_add=True, db_index=True)),
                ('pic', models.ImageField(upload_to='blogimg/%Y/%m/%d')),
                ('thumbnail', models.ImageField(editable=False, upload_to='thumbs/%Y/%m/')),
                ('displaypic', models.ImageField(editable=False, null=True, upload_to='blogimg/display/%Y/%m/%d')),
            ],
            options={
                'db_table': 'blog_pic',
            },
        ),
        migrations.CreateModel(
            name='Video',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=100, unique=True)),
                ('slug', models.SlugField(max_length=100, unique=True)),
                ('description', models.TextField(max_length=1000)),
                ('posted', models.DateField(auto_now_add=True, db_index=True)),
                ('width', models.PositiveIntegerField(editable=False, null=True)),
                ('height', models.PositiveIntegerField(editable=False, null=True)),
                ('duration', models.FloatField(editable=False, null=True)),
                ('file', video_encoding.fields.VideoField(height_field='height', upload_to='', width_field='width')),
                ('category', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='mmeeblog.Category')),
                ('creator', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='mmeeblog.Blogger')),
            ],
            options={
                'db_table': 'blog_video',
            },
        ),
        migrations.CreateModel(
            name='Promo',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=100)),
                ('body', markdownx.models.MarkdownxField()),
                ('link_to', models.CharField(blank=True, max_length=270, null=True)),
                ('adimg', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='mmeeblog.Pic')),
            ],
            options={
                'db_table': 'blog_promo',
            },
        ),
        migrations.CreateModel(
            name='Podcast',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=100, unique=True)),
                ('slug', models.SlugField(max_length=100, unique=True)),
                ('description', models.TextField(max_length=1000)),
                ('itunes_explicit', models.BooleanField(default=True)),
                ('pubdate', models.DateField(auto_now_add=True, db_index=True)),
                ('audio_file', audiofield.fields.AudioField(blank=True, help_text='Allowed type - .mp3, .wav, .ogg', upload_to='audio/%Y/%m/%d')),
                ('creator', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='mmeeblog.Blogger')),
            ],
            options={
                'db_table': 'blog_podcast',
            },
        ),
        migrations.CreateModel(
            name='Blog',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=100, unique=True)),
                ('slug', models.SlugField(max_length=100, unique=True)),
                ('body', markdownx.models.MarkdownxField()),
                ('posted', models.DateTimeField(auto_now_add=True, db_index=True)),
                ('blogaudio', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to='mmeeblog.Podcast')),
                ('blogimg', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='mmeeblog.Pic')),
                ('blogvid', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to='mmeeblog.Video')),
                ('category', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='mmeeblog.Category')),
                ('creator', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='mmeeblog.Blogger')),
                ('promos', models.ManyToManyField(blank=True, to='mmeeblog.Promo')),
            ],
            options={
                'ordering': ['-posted'],
                'db_table': 'blog_blog',
            },
        ),
    ]

