# Generated by Django 5.0.2 on 2025-11-20 19:16

import uuid
from django.db import migrations, models


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='AppSettings',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('smtp_enabled', models.BooleanField(default=False, help_text='Enable SMTP email sending')),
                ('smtp_host', models.CharField(blank=True, help_text='SMTP server hostname', max_length=255, null=True)),
                ('smtp_port', models.IntegerField(default=587, help_text='SMTP server port (587 for TLS, 465 for SSL)')),
                ('smtp_use_tls', models.BooleanField(default=True, help_text='Use TLS encryption')),
                ('smtp_use_ssl', models.BooleanField(default=False, help_text='Use SSL encryption')),
                ('smtp_username', models.CharField(blank=True, help_text='SMTP username/email', max_length=255, null=True)),
                ('smtp_password', models.CharField(blank=True, help_text='SMTP password (stored encrypted)', max_length=255, null=True)),
                ('smtp_from_email', models.EmailField(blank=True, help_text='Default from email address', max_length=254, null=True)),
                ('smtp_from_name', models.CharField(blank=True, default='TimeTracker', help_text='Default from name', max_length=255, null=True)),
                ('send_welcome_email_on_creation', models.BooleanField(default=True, help_text='Automatically send welcome email when employee is created')),
                ('temp_password_length', models.IntegerField(default=16, help_text='Length of temporary password')),
                ('temp_password_expires_hours', models.IntegerField(default=48, help_text='Hours until temporary password expires')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
            ],
            options={
                'verbose_name': 'App Settings',
                'verbose_name_plural': 'App Settings',
                'db_table': 'app_settings',
            },
        ),
        migrations.CreateModel(
            name='Configuration',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('header', models.CharField(max_length=255)),
                ('icon', models.CharField(max_length=100)),
                ('function_ref_id', models.CharField(max_length=100)),
                ('color', models.CharField(max_length=50)),
                ('questions', models.JSONField(blank=True, default=list)),
                ('menu_type', models.CharField(blank=True, choices=[('InMenu', 'InMenu'), ('OutMenu', 'OutMenu')], max_length=10, null=True)),
                ('is_quick_menu', models.BooleanField(default=False)),
                ('visibility_rule', models.CharField(choices=[('always_show', 'Always Show'), ('hide_when_in', 'Hide When In'), ('hide_when_out', 'Hide When Out'), ('show_when_in', 'Show When In'), ('show_when_out', 'Show When Out')], default='always_show', help_text='Controls when this action button should be visible', max_length=20)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
            ],
            options={
                'ordering': ['-created_at'],
            },
        ),
        migrations.CreateModel(
            name='ConfigurationTranslation',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('translation_type', models.CharField(choices=[('function_header', 'Function Header'), ('question_label', 'Question Label')], max_length=20)),
                ('language', models.CharField(choices=[('en', 'English'), ('fi', 'Finnish'), ('sv', 'Swedish')], max_length=10)),
                ('reference_id', models.CharField(help_text='function_ref_id for headers, question_id for labels', max_length=100)),
                ('original_text', models.CharField(help_text='Original text in default language', max_length=255)),
                ('translated_text', models.CharField(help_text='Translated text', max_length=255)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
            ],
            options={
                'db_table': 'configuration_translations',
                'ordering': ['translation_type', 'language', 'reference_id'],
                'indexes': [models.Index(fields=['translation_type', 'language', 'reference_id'], name='configurati_transla_7699a4_idx')],
                'unique_together': {('translation_type', 'language', 'reference_id')},
            },
        ),
    ]
