# Generated by Django 2.1.7 on 2019-03-15 19:05

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='Classes',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=30)),
                ('qrCodeOpen', models.IntegerField(default=0)),
                ('teacher', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='classes', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='QrCodes',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('qrCode', models.FileField(upload_to='')),
                ('attendance_date', models.DateField(default='2018-01-01')),
                ('open', models.DateTimeField(default=None)),
                ('close', models.DateTimeField(blank=True, null=True)),
                ('classRef', models.ForeignKey(default=1, on_delete=django.db.models.deletion.CASCADE, related_name='qrCodes', to='backend.Classes')),
            ],
        ),
        migrations.CreateModel(
            name='Students',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('ra', models.CharField(max_length=10)),
                ('name', models.CharField(max_length=70)),
                ('class_student', models.ManyToManyField(blank=True, related_name='students', to='backend.Classes')),
                ('qrCodes', models.ManyToManyField(blank=True, related_name='students_qrCode', to='backend.QrCodes')),
            ],
        ),
    ]
