<reponame>MirzaBaig715/learn-online
# Generated by Django 2.0 on 2017-12-28 13:05

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('course', '0001_initial'),
        ('location', '0001_initial'),
        ('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')),
                ('email', models.EmailField(max_length=254, unique=True, verbose_name='email address')),
                ('first_name', models.CharField(blank=True, max_length=30, verbose_name='first name')),
                ('last_name', models.CharField(blank=True, max_length=30, verbose_name='last name')),
                ('created_at', models.DateTimeField(default=django.utils.timezone.now, help_text='Designates when the user joined the system.', verbose_name='date joined')),
                ('is_staff', models.BooleanField(default=False, help_text='Designates whether the user can log into admin site.', verbose_name='staff status')),
                ('is_active', models.BooleanField(default=True, verbose_name='active')),
                ('gender', models.IntegerField(choices=[(3, 'Unknown'), (2, 'Female'), (1, 'Male')], default=3, verbose_name='gender')),
                ('address', models.CharField(blank=True, max_length=255, null=True, verbose_name='address')),
                ('phone', models.CharField(blank=True, max_length=255, null=True, verbose_name='phone')),
                ('dob', models.DateField(blank=True, null=True, verbose_name='date of birth')),
                ('role', models.PositiveSmallIntegerField(choices=[(1, 'tutor'), (2, 'student'), (3, 'Admin')], default=2)),
                ('city', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='user_city', to='location.City')),
                ('country', models.ForeignKey(null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='user_country', to='location.Country')),
                ('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',
            },
        ),
        migrations.CreateModel(
            name='Student',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('course', models.ManyToManyField(blank=True, related_name='student_courses', to='course.Course')),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='student_user', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'student',
                'verbose_name_plural': 'students',
            },
        ),
        migrations.CreateModel(
            name='Tutor',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('description', models.CharField(blank=True, max_length=255, null=True)),
                ('specialization', models.CharField(blank=True, max_length=255, null=True)),
                ('degree', models.CharField(blank=True, max_length=50, null=True, verbose_name='degree')),
                ('salary', models.FloatField(max_length=5)),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='tutor_user', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'tutor',
                'verbose_name_plural': 'tutors',
            },
        ),
    ]
