# Generated by Django 4.2.29 on 2026-04-02 11:08

from decimal import Decimal
from django.db import migrations, models
import django.utils.timezone


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0012_alter_user_first_name_max_length'),
    ]

    operations = [
        migrations.CreateModel(
            name='User',
            fields=[
                ('id', models.BigAutoField(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)),
                ('full_name', models.CharField(max_length=150)),
                ('role', models.CharField(choices=[('CEO', 'CEO'), ('PM', 'Project Manager'), ('TL', 'Team Lead'), ('BD', 'BD / Sales'), ('Member', 'Team Member'), ('Finance', 'Finance Officer'), ('HR', 'HR / Admin')], default='Member', max_length=10)),
                ('department', models.CharField(choices=[('Tech', 'Technology'), ('Cyber', 'Cybersecurity'), ('Legal', 'Legal'), ('Sales', 'Sales'), ('Finance', 'Finance'), ('Admin', 'Administration')], default='Tech', max_length=10)),
                ('salary_pkr', models.DecimalField(decimal_places=2, default=Decimal('0.00'), help_text='Monthly salary in PKR', max_digits=12)),
                ('hourly_rate', models.DecimalField(decimal_places=2, default=Decimal('0.00'), help_text='Auto-computed: salary / 176', max_digits=10)),
                ('profile_photo', models.ImageField(blank=True, null=True, upload_to='profiles/')),
                ('is_active', models.BooleanField(default=True)),
                ('is_staff', models.BooleanField(default=False)),
                ('joined_date', models.DateField(default=django.utils.timezone.now)),
                ('force_password_change', models.BooleanField(default=True)),
                ('theme_preference', models.CharField(choices=[('system', 'System Default'), ('light', 'Light'), ('dark', 'Dark')], default='system', max_length=10)),
                ('email_notifications', models.JSONField(blank=True, default=dict, help_text='Per-category email notification toggles')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('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={
                'ordering': ['full_name'],
            },
        ),
    ]
