# -*- coding: utf-8 -*-
# Generated by Django 1.11.7 on 2017-12-07 11:46
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0008_alter_user_username_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')),
                ('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')),
                ('email', models.EmailField(max_length=254, unique=True, verbose_name='email address')),
            ],
            options={
                'verbose_name': 'کاربر',
                'verbose_name_plural': 'کاربران',
            },
            managers=[
                ('objects', main.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Activity',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('description', models.TextField()),
                ('date', models.DateTimeField(auto_now_add=True)),
            ],
            options={
                'verbose_name': 'فعالیت',
                'verbose_name_plural': 'فعالیت\u200cها',
            },
        ),
        migrations.CreateModel(
            name='Letter',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('text', models.TextField()),
                ('receiver', models.CharField(choices=[('V', 'Volunteer'), ('D', 'Donor')], max_length=1)),
                ('verified', models.BooleanField(default=False)),
                ('date', models.DateTimeField(auto_now_add=True)),
            ],
            options={
                'verbose_name': 'نامه',
                'verbose_name_plural': 'نامه\u200cها',
            },
        ),
        migrations.CreateModel(
            name='Need',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=200)),
                ('description', models.TextField()),
                ('cost', models.IntegerField()),
                ('resolved', models.BooleanField(default=False)),
                ('urgent', models.BooleanField(default=False)),
            ],
            options={
                'verbose_name': 'نیاز',
                'verbose_name_plural': 'نیازها',
            },
        ),
        migrations.CreateModel(
            name='OngoingUserInfo',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('first_name', models.CharField(max_length=30)),
                ('last_name', models.CharField(max_length=30)),
                ('gender', models.CharField(choices=[('M', 'مرد'), ('F', 'زن')], max_length=1)),
                ('date_of_birth', models.DateTimeField()),
                ('submit_date', models.DateTimeField(auto_now_add=True)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='PurchaseForInstitute',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('amount', models.IntegerField()),
                ('time', models.DateTimeField(auto_now_add=True)),
            ],
            options={
                'verbose_name': 'پرداخت به مؤسسه',
                'verbose_name_plural': 'پرداخت\u200cها به مؤسسه',
            },
        ),
        migrations.CreateModel(
            name='PurchaseForNeed',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('amount', models.IntegerField()),
                ('time', models.DateTimeField(auto_now_add=True)),
                ('need', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='main.Need')),
            ],
            options={
                'verbose_name': 'پرداخت برای نیاز',
                'verbose_name_plural': 'پرداخت\u200cها برای نیاز',
            },
        ),
        migrations.CreateModel(
            name='Sponsorship',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('institute_sponsored', models.BooleanField(default=False)),
            ],
            options={
                'verbose_name': 'کفالت',
                'verbose_name_plural': 'کفالت\u200cها',
            },
        ),
        migrations.CreateModel(
            name='Support',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
            ],
            options={
                'verbose_name': 'حمایت',
                'verbose_name_plural': 'حمایت\u200cها',
            },
        ),
        migrations.CreateModel(
            name='UserInfo',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('first_name', models.CharField(max_length=30)),
                ('last_name', models.CharField(max_length=30)),
                ('gender', models.CharField(choices=[('M', 'مرد'), ('F', 'زن')], max_length=1)),
                ('date_of_birth', models.DateTimeField()),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Child',
            fields=[
                ('user_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to=settings.AUTH_USER_MODEL)),
                ('province', models.CharField(choices=[('AZS', 'آذربایجان شرقی'), ('AZG', 'آذربایجان غربی'), ('ISF', 'اصفهان'), ('ARD', 'اردبیل'), ('ILA', 'ایلام'), ('BUS', 'بوشهر'), ('TEH', 'تهران'), ('CHB', 'چهارمحال و بختیاری'), ('KHJ', 'خراسان جنوبی'), ('KHR', 'خراسان رضوی'), ('KHS', 'خراسان شمالی'), ('KHU', 'خوزستان'), ('ZAN', 'زنجان'), ('SOB', 'سیستان و بلوچستان'), ('SEM', 'سمنان'), ('FAR', 'فارس'), ('QOM', 'قم'), ('QAZ', 'قزوین'), ('KOB', 'کهکیلویه و بویراحمد'), ('KOR', 'کردستان'), ('KER', 'کرمان'), ('KSH', 'کرمانشاه'), ('GIL', 'گیلان'), ('GOL', 'گلستان'), ('LOR', 'لرستان'), ('MAZ', 'مازندران'), ('MAR', 'مرکزی'), ('HOR', 'هرمزگان'), ('HAM', 'همدان'), ('YAZ', 'یزد')], max_length=3)),
                ('verified', models.BooleanField(default=False)),
                ('accomplishments', models.TextField(blank=True, null=True)),
            ],
            options={
                'verbose_name': 'نیازمند',
                'verbose_name_plural': 'نیازمندان',
            },
            bases=('main.user',),
        ),
        migrations.CreateModel(
            name='Donor',
            fields=[
                ('user_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'همیار',
                'verbose_name_plural': 'همیاران',
            },
            bases=('main.user',),
        ),
        migrations.CreateModel(
            name='Volunteer',
            fields=[
                ('user_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'مددکار',
                'verbose_name_plural': 'مددکاران',
            },
            bases=('main.user',),
        ),
        migrations.AddField(
            model_name='userinfo',
            name='user',
            field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='ongoinguserinfo',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='activity',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='user',
            name='groups',
            field=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'),
        ),
        migrations.AddField(
            model_name='user',
            name='user_permissions',
            field=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'),
        ),
        migrations.AddField(
            model_name='support',
            name='child',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='main.Child'),
        ),
        migrations.AddField(
            model_name='support',
            name='volunteer',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='main.Volunteer'),
        ),
        migrations.AddField(
            model_name='sponsorship',
            name='child',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='main.Child'),
        ),
        migrations.AddField(
            model_name='sponsorship',
            name='sponsor',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='main.Donor'),
        ),
        migrations.AddField(
            model_name='purchaseforneed',
            name='payer',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='main.Donor'),
        ),
        migrations.AddField(
            model_name='purchaseforinstitute',
            name='payer',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='main.Donor'),
        ),
        migrations.AddField(
            model_name='need',
            name='child',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='main.Child'),
        ),
        migrations.AddField(
            model_name='letter',
            name='child',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='main.Child'),
        ),
    ]
