# Generated by Django 5.0.2 on 2025-11-20 19:16

import django.db.models.deletion
import django.utils.timezone
import uuid
from django.db import migrations, models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Company',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=255)),
                ('industry', models.CharField(choices=[('construction', 'Construction'), ('technology', 'Technology'), ('healthcare', 'Healthcare'), ('retail', 'Retail'), ('manufacturing', 'Manufacturing'), ('services', 'Services'), ('other', 'Other')], max_length=50)),
                ('company_size', models.CharField(choices=[('1-5', '1-5 employees'), ('5-20', '5-20 employees'), ('20-50', '20-50 employees'), ('50-100', '50-100 employees'), ('100+', '100+ employees')], max_length=10)),
                ('primary_location', models.CharField(max_length=255)),
                ('operating_countries', models.JSONField(default=list)),
                ('api_endpoint', models.URLField(blank=True, help_text='API endpoint URL for user authentication (e.g., https://api.example.com/auth/login)', max_length=500, null=True)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
            ],
            options={
                'ordering': ['-created_at'],
            },
        ),
        migrations.CreateModel(
            name='CollectiveAgreement',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('agreement_type', models.CharField(choices=[('rakennusalan_tes', 'Rakennusalan työehtosopimus (Construction)'), ('kvtes', 'KVTES (Municipal workers)'), ('avaintes', 'AVAINTES (Healthcare & social services)'), ('teknologiateollisuuden_tes', 'Teknologiateollisuuden TES (Technology)'), ('palvelualojen_tes', 'Palvelualojen TES (Service sector)'), ('kaupan_alan_tes', 'Kaupan alan TES (Retail)'), ('byggnads', 'Byggnads (Swedish Construction)'), ('other', 'Other / Custom'), ('none', 'No collective agreement (use Työaikalaki only)')], max_length=50)),
                ('custom_name', models.CharField(blank=True, max_length=255, null=True)),
                ('organization', models.CharField(blank=True, max_length=255, null=True)),
                ('overtime_2h_rate', models.DecimalField(decimal_places=2, default=50.0, max_digits=5)),
                ('overtime_after_2h_rate', models.DecimalField(decimal_places=2, default=100.0, max_digits=5)),
                ('night_work_rate', models.DecimalField(decimal_places=2, default=30.0, max_digits=5)),
                ('night_work_start', models.TimeField(default='22:00:00')),
                ('night_work_end', models.TimeField(default='07:00:00')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('company', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='collective_agreement', to='company.company')),
            ],
            options={
                'ordering': ['-created_at'],
            },
        ),
        migrations.CreateModel(
            name='OnboardingProgress',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('current_step', models.CharField(choices=[('company_profile', 'Company Profile'), ('collective_agreement', 'Collective Agreement'), ('working_time_policy', 'Working Time Policy'), ('vacation_policy', 'Vacation Policy'), ('completed', 'Completed')], default='company_profile', max_length=30)),
                ('is_completed', models.BooleanField(default=False)),
                ('completed_at', models.DateTimeField(blank=True, null=True)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('company', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='onboarding_progress', to='company.company')),
            ],
            options={
                'ordering': ['-created_at'],
            },
        ),
        migrations.CreateModel(
            name='VacationPolicy',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('vacation_accrual_type', models.CharField(choices=[('standard_finnish', 'Standard Finnish law (2 days/month, 2.5 after 1yr)'), ('custom', 'Custom accrual rate')], default='standard_finnish', max_length=20)),
                ('custom_accrual_rate', models.DecimalField(blank=True, decimal_places=2, max_digits=5, null=True)),
                ('vacation_year_start', models.DateField(default=django.utils.timezone.now)),
                ('vacation_period_start', models.DateField()),
                ('vacation_period_end', models.DateField()),
                ('track_vacation_days', models.BooleanField(default=True)),
                ('track_flex_time', models.BooleanField(default=True)),
                ('track_time_bank', models.BooleanField(default=True)),
                ('track_overtime_balance', models.BooleanField(default=True)),
                ('track_toil', models.BooleanField(default=False)),
                ('self_certification_days', models.IntegerField(default=3)),
                ('sick_pay_percentage', models.IntegerField(default=100)),
                ('include_finnish_holidays', models.BooleanField(default=True)),
                ('include_swedish_holidays', models.BooleanField(default=False)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('company', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='vacation_policy', to='company.company')),
            ],
            options={
                'ordering': ['-created_at'],
            },
        ),
        migrations.CreateModel(
            name='WorkingTimePolicy',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('monday_friday_start', models.TimeField(default='08:00:00')),
                ('monday_friday_end', models.TimeField(default='16:00:00')),
                ('saturday_start', models.TimeField(default='10:00:00')),
                ('saturday_end', models.TimeField(default='15:00:00')),
                ('sunday_start', models.TimeField(default='10:00:00')),
                ('sunday_end', models.TimeField(default='15:00:00')),
                ('use_flextime', models.BooleanField(default=False)),
                ('core_hours_start', models.TimeField(default='10:00:00')),
                ('core_hours_end', models.TimeField(default='14:00:00')),
                ('flex_range_start', models.TimeField(default='06:00:00')),
                ('flex_range_end', models.TimeField(default='20:00:00')),
                ('max_flex_negative', models.IntegerField(default=-10)),
                ('max_flex_positive', models.IntegerField(default=40)),
                ('use_time_banking', models.BooleanField(default=False)),
                ('max_bank_balance', models.IntegerField(default=80)),
                ('overtime_conversion_daily', models.IntegerField(default=8)),
                ('overtime_conversion_weekly', models.IntegerField(default=40)),
                ('lunch_break_paid', models.BooleanField(default=True)),
                ('lunch_break_duration', models.IntegerField(default=30)),
                ('lunch_break_required_after', models.IntegerField(default=6)),
                ('short_break_required', models.BooleanField(default=True)),
                ('short_break_duration_minutes', models.IntegerField(default=15)),
                ('short_break_required_after_hours', models.FloatField(default=4.0)),
                ('minimum_total_break_time_minutes', models.IntegerField(default=45)),
                ('enable_violation_monitoring', models.BooleanField(default=False)),
                ('violation_notification_enabled', models.BooleanField(default=False)),
                ('monitor_daily_violations', models.BooleanField(default=False)),
                ('monitor_weekly_violations', models.BooleanField(default=False)),
                ('monitor_monthly_violations', models.BooleanField(default=False)),
                ('monitor_missing_breaks', models.BooleanField(default=True)),
                ('violation_severity_warning_threshold', models.FloatField(default=1.0)),
                ('violation_severity_critical_threshold', models.FloatField(default=2.0)),
                ('burnout_detection_enabled', models.BooleanField(default=True)),
                ('burnout_notification_enabled', models.BooleanField(default=True)),
                ('burnout_sensitivity', models.CharField(choices=[('low', 'Low'), ('medium', 'Medium'), ('high', 'High')], default='medium', max_length=20)),
                ('overtime_weekends_rate', models.DecimalField(decimal_places=2, default=100.0, max_digits=5)),
                ('overtime_holidays_rate', models.DecimalField(decimal_places=2, default=100.0, max_digits=5)),
                ('require_manager_approval', models.BooleanField(default=True)),
                ('workers_self_register_overtime', models.BooleanField(default=False)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('company', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='working_time_policy', to='company.company')),
            ],
            options={
                'ordering': ['-created_at'],
            },
        ),
    ]
