# Generated by Django 2.1.5 on 2019-04-19 04:02

import core.models.user
from django.conf import settings
import django.contrib.auth.validators
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0009_alter_user_last_name_max_length'),
    ]

    operations = [
        migrations.CreateModel(
            name='User',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('password', models.CharField(max_length=128, verbose_name='password')),
                ('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')),
                ('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')),
                ('username', models.CharField(db_index=True, error_messages={'unique': 'A user with that username already exists.'}, help_text='Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.', max_length=150, unique=True, validators=[django.contrib.auth.validators.UnicodeUsernameValidator()], verbose_name='username')),
                ('email', models.EmailField(db_index=True, error_messages={'unique': 'A user that email id already exists.'}, max_length=254, unique=True, verbose_name='user email')),
                ('is_staff', models.BooleanField(default=False, help_text='Designates whether the user can log into this admin site.', verbose_name='staff status')),
                ('is_active', models.BooleanField(default=True, help_text='Designates whether this user should be treated as active. Unselect this instead of deleting accounts.', verbose_name='active')),
                ('date_joined', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date joined')),
                ('groups', models.ManyToManyField(blank=True, help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_name='user_set', related_query_name='user', to='auth.Group', verbose_name='groups')),
                ('user_permissions', models.ManyToManyField(blank=True, help_text='Specific permissions for this user.', related_name='user_set', related_query_name='user', to='auth.Permission', verbose_name='user permissions')),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
                'abstract': False,
            },
            managers=[
                ('objects', core.models.user.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Achievement',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=255, verbose_name='Achievement name')),
                ('credits_award', models.IntegerField(blank=True, default=5, verbose_name='credits awarded')),
                ('description', models.TextField(blank=True, null=True, verbose_name='award description')),
                ('Signatories', models.ManyToManyField(blank=True, related_name='signed_on', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Assignment',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=255, verbose_name='Title')),
                ('instruction', models.TextField(blank=True, default='Test Course', null=True, verbose_name='assignment instruction')),
                ('credit_points', models.IntegerField(blank=True, default=0, verbose_name='credits points to be gained')),
                ('reference', models.TextField(blank=True, max_length=1000, null=True, verbose_name='Reference Material')),
                ('author', models.ForeignKey(help_text='Refers to the creator account of the course', on_delete=django.db.models.deletion.CASCADE, related_name='assignments_contributed', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Badge',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=255, verbose_name='badge name')),
                ('credits_award', models.IntegerField(blank=True, default=5, verbose_name='credits awarded')),
                ('description', models.TextField(blank=True, null=True, verbose_name='badge description')),
            ],
        ),
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=255, verbose_name='category name')),
                ('wiki', models.URLField(blank=True, null=True, verbose_name='wiki_link')),
            ],
        ),
        migrations.CreateModel(
            name='Course',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=255, verbose_name='Title')),
                ('subject', models.CharField(blank=True, max_length=255, null=True, verbose_name='Title')),
                ('is_published', models.BooleanField(blank=True, default=False, verbose_name='is published')),
                ('rating', models.FloatField(blank=True, default=0, verbose_name='overall rating')),
                ('is_accepting_contrib', models.BooleanField(blank=True, default=False, verbose_name='is accepting contribution')),
                ('credit_points', models.IntegerField(blank=True, default=0, verbose_name='credits points to be gained')),
                ('students_count', models.IntegerField(blank=True, default=0, verbose_name='total enrollment')),
                ('description', models.TextField(blank=True, default='New Course', null=True, verbose_name="Course's Description")),
                ('intro', models.URLField(verbose_name='Intro video')),
                ('is_approved', models.BooleanField(blank=True, default=False, verbose_name='is approved to publish')),
                ('reviewer_rating', models.FloatField(blank=True, default=0, verbose_name='overall rating')),
                ('achievement', models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='course', to='core.Achievement', verbose_name='course completion award')),
                ('author', models.ForeignKey(help_text='Refers to the creator account of the course', on_delete=django.db.models.deletion.CASCADE, related_name='courses', to=settings.AUTH_USER_MODEL)),
                ('category', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='courses', to='core.Category', verbose_name='related category')),
                ('reviewers', models.ManyToManyField(blank=True, related_name='courses_reviewed', to=settings.AUTH_USER_MODEL)),
                ('students', models.ManyToManyField(blank=True, related_name='enrolled_in', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Lesson',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=255, verbose_name='Title')),
                ('description', models.TextField(blank=True, default='New Lesson', null=True, verbose_name="Lesson's Description")),
                ('lecture', models.URLField(blank=True, null=True, verbose_name='Video URL')),
                ('author', models.ForeignKey(help_text='Refers to the creator account of the lessons', on_delete=django.db.models.deletion.CASCADE, related_name='lessons', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Module',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=255, verbose_name='Title')),
                ('description', models.TextField(blank=True, default='New Module', null=True, verbose_name="Module's Description")),
                ('reference', models.TextField(blank=True, max_length=1000, null=True, verbose_name='Reference Material')),
                ('author', models.ForeignKey(help_text='Refers to the creator account of the modules', on_delete=django.db.models.deletion.CASCADE, related_name='modules', to=settings.AUTH_USER_MODEL)),
                ('course', models.ForeignKey(help_text='Refers to the course this unit belongs to', on_delete=django.db.models.deletion.CASCADE, related_name='modules', to='core.Course')),
            ],
        ),
        migrations.CreateModel(
            name='Profile',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('first_name', models.CharField(blank=True, max_length=30, verbose_name='first name')),
                ('last_name', models.CharField(blank=True, max_length=150, verbose_name='last name')),
                ('profile_dp', models.ImageField(blank=True, upload_to='', verbose_name='profile picture')),
                ('bio', models.TextField(blank=True, max_length=255, verbose_name='bio')),
                ('credit_points', models.IntegerField(blank=True, default=25, verbose_name='credits remaining')),
                ('total_credits_spent', models.IntegerField(blank=True, default=0, verbose_name='credits spent in total')),
                ('company_name', models.CharField(blank=True, help_text='Collects Company name for which user might be working', max_length=255, null=True, verbose_name='Company Name')),
                ('date_of_birth', models.DateField(blank=True, help_text='Field describes the date of birth which will help us find the age of the user', null=True, verbose_name='Date of Birth')),
                ('last_updated', models.DateTimeField(blank=True, help_text='This field reflects the date and time when the user information was last updated', null=True, verbose_name='Info updated on')),
            ],
        ),
        migrations.CreateModel(
            name='Social',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('facebook', models.URLField(blank=True, null=True, verbose_name='facebook')),
                ('linked_in', models.URLField(blank=True, null=True, verbose_name='linked in')),
                ('twitter', models.URLField(blank=True, null=True, verbose_name='twitter')),
                ('github', models.URLField(blank=True, null=True, verbose_name='github')),
                ('website', models.URLField(blank=True, null=True, verbose_name='website')),
                ('blog', models.URLField(blank=True, null=True, verbose_name='blog')),
            ],
        ),
        migrations.CreateModel(
            name='Tag',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=255, verbose_name='tag name')),
                ('wiki', models.URLField(blank=True, null=True, verbose_name='wiki_link')),
            ],
        ),
        migrations.AddField(
            model_name='profile',
            name='expertise',
            field=models.ManyToManyField(blank=True, related_name='experts', to='core.Tag', verbose_name='tags expert in'),
        ),
        migrations.AddField(
            model_name='profile',
            name='interests',
            field=models.ManyToManyField(blank=True, related_name='favored_by', to='core.Tag', verbose_name='tags interested in'),
        ),
        migrations.AddField(
            model_name='profile',
            name='social',
            field=models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to='core.Social', verbose_name='social links'),
        ),
        migrations.AddField(
            model_name='profile',
            name='user',
            field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='profile', to=settings.AUTH_USER_MODEL, verbose_name='actual user account'),
        ),
        migrations.AddField(
            model_name='lesson',
            name='module',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='lessons', to='core.Module'),
        ),
        migrations.AddField(
            model_name='course',
            name='tagged_to',
            field=models.ManyToManyField(blank=True, related_name='courses', to='core.Tag', verbose_name='related tags'),
        ),
        migrations.AddField(
            model_name='category',
            name='tags',
            field=models.ManyToManyField(blank=True, related_name='categories', to='core.Tag', verbose_name='related tags'),
        ),
        migrations.AddField(
            model_name='assignment',
            name='course',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='assignments', to='core.Course'),
        ),
        migrations.AddField(
            model_name='assignment',
            name='lesson',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='assignments', to='core.Lesson'),
        ),
        migrations.AddField(
            model_name='assignment',
            name='module',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='assignments', to='core.Module'),
        ),
    ]
