# Generated by Django 2.1.1 on 2020-08-03 23:27

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import forum.models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('courses', '0003_academiccharge_teacherdictate'),
    ]

    operations = [
        migrations.CreateModel(
            name='Feed',
            fields=[
                ('code_feed', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title_feed', models.CharField(max_length=255)),
                ('date_feed', models.DateField(auto_now_add=True)),
                ('description_feed', models.CharField(max_length=10000)),
                ('academic_charge', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='forum', to='courses.AcademicCharge')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='feeds', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='File_forum',
            fields=[
                ('code_file', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('resource', models.FileField(blank=True, upload_to=forum.models.get_upload_path)),
                ('feed_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='files', to='forum.Feed')),
            ],
        ),
        migrations.CreateModel(
            name='Replay_feed_forum',
            fields=[
                ('code_replay_feed', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('comment', models.CharField(max_length=5000)),
                ('dateComment', models.DateTimeField(auto_now_add=True)),
                ('replay_feed', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='forum.Feed')),
                ('user_id', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
