# Generated by Django 4.2.28 on 2026-02-24 15:21

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


class Migration(migrations.Migration):

    dependencies = [
        ('accounts', '0003_user_failed_login_attempts_user_locked_until_and_more'),
    ]

    operations = [
        migrations.CreateModel(
            name='Employee',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('code', models.CharField(max_length=40, unique=True)),
                ('first_name', models.CharField(max_length=150)),
                ('last_name', models.CharField(blank=True, max_length=150)),
                ('email', models.EmailField(blank=True, max_length=254)),
                ('phone', models.CharField(blank=True, max_length=20)),
                ('role', models.CharField(choices=[('super_admin', 'Super Admin'), ('store_manager', 'Store Manager'), ('storekeeper', 'Storekeeper'), ('accountant', 'Accountant'), ('sales_officer', 'Sales Officer'), ('auditor', 'Auditor')], default='sales_officer', max_length=20)),
                ('is_active', models.BooleanField(default=True)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('user', models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='employee_record', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ('first_name', 'last_name', 'code'),
            },
        ),
    ]
