# Generated by Django 2.2 on 2019-04-07 03:10

import apps.user.models
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
import mptt.fields


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('org', '0001_initial'),
        ('auth', '0011_update_proxy_permissions'),
    ]

    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')),
                ('username', models.CharField(max_length=32, null=True, unique=True)),
                ('full_name', models.CharField(blank=True, max_length=128, null=True)),
                ('designation', models.CharField(blank=True, max_length=128, null=True)),
                ('email', models.EmailField(blank=True, max_length=254, null=True)),
                ('phone', models.CharField(blank=True, max_length=16, null=True)),
                ('is_superuser', models.BooleanField(default=False)),
                ('is_active', models.BooleanField(default=False)),
                ('is_staff', models.BooleanField(default=False)),
                ('role', models.PositiveSmallIntegerField(blank=True, choices=[(3, 'Leader'), (0, 'Organizer'), (1, 'Manager'), (2, 'Employee')], default=2)),
                ('is_present', models.BooleanField(default=False)),
                ('is_awol', models.BooleanField(default=False)),
                ('active_task', models.IntegerField(default=0)),
                ('date_joined', models.DateTimeField(default=django.utils.timezone.now)),
                ('image', models.URLField(blank=True, null=True)),
                ('domain', models.PositiveSmallIntegerField(choices=[(4, 'Insurance'), (0, 'Sales'), (3, 'Rent-a-car/Ride sharing'), (6, 'Sales(Pharma)'), (2, 'Installation/Maintenance/Repair'), (1, 'Delivery Service'), (5, 'Others')], default=0)),
                ('fb_token', models.TextField(blank=True, default='')),
                ('lft', models.PositiveIntegerField(db_index=True, editable=False)),
                ('rght', models.PositiveIntegerField(db_index=True, editable=False)),
                ('tree_id', models.PositiveIntegerField(db_index=True, editable=False)),
                ('level', models.PositiveIntegerField(db_index=True, editable=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')),
                ('org', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='org.Organization')),
                ('parent', mptt.fields.TreeForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='children', to=settings.AUTH_USER_MODEL)),
                ('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={
                'abstract': False,
            },
            managers=[
                ('objects', apps.user.models.SimpleUserManager()),
            ],
        ),
        migrations.CreateModel(
            name='DataUsage',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('megabytes', models.FloatField(default=0.0)),
                ('timestamp', models.DateTimeField(default=django.utils.timezone.now)),
                ('agent', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
