# Generated by Django 3.2.7 on 2021-09-18 06:09

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('jwtauth', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Assignment',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('description', models.CharField(max_length=100)),
                ('title', models.CharField(max_length=50)),
                ('publish_at', models.DateTimeField()),
                ('deadline', models.DateTimeField()),
                ('assigned_to', models.ManyToManyField(related_name='students', to='jwtauth.Profile')),
                ('created_by', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='jwtauth.profile')),
            ],
        ),
        migrations.CreateModel(
            name='Submission',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('remark', models.CharField(max_length=250)),
                ('submission_date', models.DateTimeField(default=django.utils.timezone.now)),
                ('assignment', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='classroom.assignment')),
                ('submitted_by', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='jwtauth.profile')),
            ],
            options={
                'unique_together': {('assignment', 'submitted_by')},
            },
        ),
    ]
