# Generated by Django 2.2.7 on 2020-02-16 10:44

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Asset',
            fields=[
                ('asset_id', models.AutoField(primary_key=True, serialize=False)),
                ('title', models.CharField(max_length=50)),
                ('asset_type', models.PositiveSmallIntegerField(choices=[(1, 'Movie'), (2, 'Documentary'), (3, 'Season'), (4, 'Episode')])),
                ('video_url', models.TextField()),
                ('parent_asset_id', models.IntegerField()),
            ],
        ),
        migrations.CreateModel(
            name='User',
            fields=[
                ('uid', models.AutoField(primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=100)),
                ('status', models.PositiveSmallIntegerField(choices=[(0, 'Inactive'), (1, 'Active')])),
                ('type', models.PositiveSmallIntegerField(choices=[(1, 'Admin'), (2, 'User'), (3, 'Guest User')])),
            ],
        ),
        migrations.CreateModel(
            name='Like',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('adate', models.DateTimeField(auto_now_add=True)),
                ('asset_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='ott.Asset')),
                ('uid', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='ott.User')),
            ],
        ),
        migrations.CreateModel(
            name='Comment',
            fields=[
                ('comment_id', models.AutoField(primary_key=True, serialize=False)),
                ('comment', models.TextField()),
                ('asset_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='ott.Asset')),
                ('uid', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='ott.User')),
            ],
        ),
        migrations.AddField(
            model_name='asset',
            name='uid',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='ott.User'),
        ),
    ]
