# Generated by Django 3.0.3 on 2020-08-05 07:47

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='Destination',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=50)),
                ('latitude', models.CharField(max_length=50)),
                ('longitude', models.CharField(max_length=50)),
                ('latitudeDelta', models.CharField(max_length=50)),
                ('longitudeDelta', models.CharField(max_length=50)),
                ('is_active', models.BooleanField(default=False, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Position',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('bus_to_home', models.CharField(max_length=50, null=True)),
                ('bus_to_school', models.CharField(max_length=50, null=True)),
                ('home_to_bus', models.CharField(max_length=50, null=True)),
                ('school_to_bus', models.CharField(max_length=50, null=True)),
                ('status', models.CharField(max_length=50, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='School',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name_school', models.CharField(max_length=50)),
                ('mobile_school', models.CharField(max_length=11)),
                ('lat', models.CharField(max_length=50)),
                ('lng', models.CharField(max_length=50)),
            ],
        ),
        migrations.CreateModel(
            name='Trip',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
            ],
        ),
        migrations.CreateModel(
            name='UserProfile',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('mobile', models.CharField(max_length=11)),
                ('user_type', models.SmallIntegerField(choices=[(1, 'مدیر'), (3, 'راننده'), (4, 'والدین'), (5, 'ادمین')])),
                ('school', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='SPO_users_id', to='Base.School')),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='Up_users_id', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Student',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('image', models.ImageField(null=True, upload_to='')),
                ('className', models.CharField(max_length=100, null=True)),
                ('location', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='DSt_users_id', to='Base.Destination')),
                ('position', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='StP_users_id', to='Base.Position')),
                ('school', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='SSt_users_id', to='Base.School')),
            ],
        ),
        migrations.CreateModel(
            name='SchoolStudent',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('school', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='Ss_school_users_id', to='Base.School')),
                ('student', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='Ss_student_users_id', to='Base.Student')),
            ],
        ),
        migrations.CreateModel(
            name='SchoolHeadmaster',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('headmaster', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='Sh_headmaster_users_id', to=settings.AUTH_USER_MODEL)),
                ('school', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='Sh_school_users_id', to='Base.School')),
            ],
        ),
        migrations.CreateModel(
            name='SchoolDriver',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('driver', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='Sd_driver_users_id', to=settings.AUTH_USER_MODEL)),
                ('school', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='Ds_school_users_id', to='Base.School')),
            ],
        ),
        migrations.CreateModel(
            name='ParentsStudent',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('student_id', models.CharField(max_length=50)),
                ('parents_id', models.CharField(max_length=50)),
                ('user_student', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='PSS_users_id', to='Base.Student')),
            ],
        ),
        migrations.CreateModel(
            name='DriverStudent',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('driver', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='Ds_driver_users_id', to=settings.AUTH_USER_MODEL)),
                ('student', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='Ds_student_users_id', to='Base.Student')),
            ],
        ),
    ]
