# Generated by Django 3.2.5 on 2021-08-24 15:29

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


class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Ques',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('ques_title', models.CharField(max_length=264, verbose_name='Enter question title')),
                ('slug', models.SlugField(max_length=264)),
                ('ques_content', models.TextField(verbose_name='What is on your mind?')),
                ('ques_image', models.ImageField(blank=True, upload_to='ques_images')),
                ('publish_date', models.DateTimeField(auto_now_add=True)),
                ('update_date', models.DateTimeField(auto_now=True)),
                ('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='student_question', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['-update_date'],
            },
        ),
        migrations.CreateModel(
            name='Ans',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('ans', models.TextField(verbose_name='Enter answer')),
                ('ans_date', models.DateTimeField(auto_now_add=True)),
                ('ques', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='ques_name', to='question.ques')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='user_answer', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['-ans_date'],
            },
        ),
    ]
