# Generated by Django 3.0.5 on 2020-04-14 16:30

import datetime
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='Group',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=50)),
                ('description', models.TextField(blank=True, null=True)),
                ('image', models.ImageField(blank=True, null=True, upload_to='Group/')),
                ('date_updated', models.DateTimeField(blank=True, default=datetime.datetime(2020, 4, 14, 21, 59, 59, 176753))),
            ],
        ),
        migrations.CreateModel(
            name='Profile',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(default='', max_length=150, null=True)),
                ('phone', models.CharField(default='', max_length=20, null=True)),
                ('address', models.CharField(blank=True, max_length=150, null=True)),
                ('status', models.CharField(blank=True, max_length=10, null=True)),
                ('verified', models.CharField(blank=True, max_length=10, null=True)),
                ('image', models.ImageField(blank=True, null=True, upload_to='Profile/')),
                ('date_updated', models.DateTimeField(blank=True, default=datetime.datetime(2020, 4, 14, 21, 59, 59, 175726))),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='GroupRole',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('role', models.TextField(default='Student')),
                ('date_updated', models.DateTimeField(blank=True, default=datetime.datetime(2020, 4, 14, 21, 59, 59, 177747))),
                ('group', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='users.Group')),
                ('profile', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='users.Profile')),
            ],
        ),
        migrations.AddField(
            model_name='group',
            name='createdBy',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='users.Profile'),
        ),
        migrations.AddField(
            model_name='group',
            name='students',
            field=models.ManyToManyField(related_name='GroupStudents', to='users.Profile'),
        ),
    ]
