# Generated by Django 3.2.5 on 2021-11-07 07:51

from django.conf import settings
from django.db import migrations, models
import django.utils.timezone


class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='MediaGroup',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(default='', max_length=255, verbose_name='name')),
                ('caption', models.CharField(default='', max_length=255, verbose_name='caption')),
                ('description', models.CharField(default='', max_length=255, verbose_name='description')),
                ('created_at', models.DateTimeField(default=django.utils.timezone.now, verbose_name='created at')),
                ('updated_at', models.DateTimeField(default=django.utils.timezone.now, verbose_name='updated at')),
                ('creator', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='creator')),
            ],
            options={
                'verbose_name': 'Media Group',
                'verbose_name_plural': 'Media Group',
            },
        ),
        migrations.CreateModel(
            name='Media',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(default='', max_length=255, verbose_name='title')),
                ('caption', models.CharField(default='', max_length=255, verbose_name='caption')),
                ('file', models.FileField(default='', upload_to='', verbose_name='file')),
                ('description', models.CharField(default='', max_length=255, verbose_name='description')),
                ('format', models.CharField(default='', max_length=255, verbose_name='file format')),
                ('filetype', models.IntegerField(choices=[(0, 'image'), (1, 'video'), (2, 'audio'), (3, 'doc'), (4, 'pdf'), (5, 'archive'), (6, 'other')], default=0, verbose_name='file type')),
                ('created_at', models.DateTimeField(default=django.utils.timezone.now, verbose_name='created at')),
                ('updated_at', models.DateTimeField(default=django.utils.timezone.now, verbose_name='updated at')),
                ('media_group', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cloudmedia.mediagroup', verbose_name='media group')),
                ('uploader', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='uploader')),
            ],
            options={
                'verbose_name': 'Media',
                'verbose_name_plural': 'Media',
                'ordering': ['created_at'],
            },
        ),
    ]
