# Generated by Django 2.0.7 on 2018-07-21 10:21

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import first.UserManager


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')),
                ('email', models.EmailField(help_text='1@gmail.com', max_length=254, unique=True, verbose_name='آدرس ایمیل')),
                ('first_name', models.CharField(blank=True, max_length=30, verbose_name='نام')),
                ('last_name', models.CharField(blank=True, max_length=30, verbose_name='نام خانودگی')),
                ('date_Birth', models.DateTimeField(blank=True, help_text='روز-ماه-سال', null=True, verbose_name='تاریخ تولد')),
                ('contact', models.CharField(blank=True, max_length=30, null=True, verbose_name='شماره تماس')),
                ('user_name', models.CharField(max_length=30, unique=True, verbose_name='نلم کاربری')),
                ('avatar', models.ImageField(blank=True, null=True, upload_to='image/')),
                ('national_number', models.CharField(max_length=30, unique=True, verbose_name='شماره ملی')),
                ('is_active', models.BooleanField(default=True)),
                ('is_admin', models.BooleanField(default=False)),
                ('is_staff', models.BooleanField(default=False)),
                ('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': 'userProfile',
                'verbose_name_plural': 'usersProfile',
                'db_table': 'first_profile',
                'ordering': ['-last_name', 'first_name'],
            },
            managers=[
                ('objects', first.UserManager.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Request',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('subject', models.CharField(max_length=500, verbose_name='موضوع')),
                ('text', models.TextField(verbose_name='درخواست')),
                ('state', models.IntegerField(choices=[(0, 'درانتظار پاسخ رهی'), (1, 'در حال پاسخ دهی'), (2, 'اتمام کار')], default=0, verbose_name='وضعیت')),
                ('response', models.TextField(verbose_name='پاسخ')),
                ('writer', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'request',
                'verbose_name_plural': 'requests',
                'db_table': 'Requests',
            },
        ),
    ]
