# 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='AnomalyAlert',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('user_id', models.UUIDField()),
                ('stamp_id', models.UUIDField()),
                ('question_type', models.CharField(max_length=20)),
                ('anomaly_score', models.FloatField()),
                ('algorithm_used', models.CharField(max_length=50)),
                ('severity', models.CharField(max_length=20)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
            ],
        ),
        migrations.CreateModel(
            name='BurnoutAnalysis',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('user_id', models.UUIDField(db_index=True)),
                ('date', models.DateField()),
                ('risk_score', models.FloatField()),
                ('severity', models.CharField(choices=[('low', 'Low'), ('medium', 'Medium'), ('high', 'High'), ('critical', 'Critical')], max_length=20)),
                ('risk_factors', models.JSONField(default=dict)),
                ('recommendations', models.JSONField(default=list)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
            ],
            options={
                'db_table': 'burnout_analysis',
                'ordering': ['-date', '-created_at'],
            },
        ),
        migrations.CreateModel(
            name='BurnoutNotification',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('user_id', models.UUIDField(db_index=True)),
                ('notification_type', models.CharField(choices=[('burnout_alert', 'Burnout Alert'), ('balance_suggestion', 'Balance Suggestion'), ('recovery_reminder', 'Recovery Reminder')], max_length=50)),
                ('title', models.CharField(max_length=200)),
                ('message', models.TextField()),
                ('risk_score', models.FloatField()),
                ('recommendation', models.JSONField(default=dict)),
                ('is_read', models.BooleanField(default=False)),
                ('sent_at', models.DateTimeField(auto_now_add=True)),
                ('read_at', models.DateTimeField(blank=True, null=True)),
            ],
            options={
                'db_table': 'burnout_notifications',
                'ordering': ['-sent_at'],
            },
        ),
        migrations.CreateModel(
            name='ComplianceNotification',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('user_id', models.UUIDField(db_index=True)),
                ('alert_type', models.CharField(max_length=50)),
                ('severity', models.CharField(choices=[('low', 'Low'), ('medium', 'Medium'), ('high', 'High'), ('critical', 'Critical')], max_length=20)),
                ('title', models.CharField(max_length=200)),
                ('message', models.TextField()),
                ('time_remaining', models.FloatField(blank=True, null=True)),
                ('is_read', models.BooleanField(default=False)),
                ('sent_at', models.DateTimeField(auto_now_add=True)),
                ('read_at', models.DateTimeField(blank=True, null=True)),
            ],
            options={
                'db_table': 'compliance_notifications',
                'ordering': ['-sent_at'],
            },
        ),
        migrations.CreateModel(
            name='MLModel',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('user_id', models.UUIDField()),
                ('algorithm_name', models.CharField(max_length=50)),
                ('model_data', models.JSONField()),
                ('accuracy_score', models.FloatField()),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('last_trained', models.DateTimeField(auto_now=True)),
            ],
        ),
        migrations.CreateModel(
            name='ScheduledNotification',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('user_id', models.UUIDField()),
                ('question_type', models.CharField(max_length=20)),
                ('scheduled_time', models.DateTimeField()),
                ('celery_task_id', models.CharField(blank=True, max_length=255, null=True)),
                ('is_sent', models.BooleanField(default=False)),
                ('sent_at', models.DateTimeField(blank=True, null=True)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
            ],
            options={
                'unique_together': {('user_id', 'question_type', 'scheduled_time')},
            },
        ),
        migrations.CreateModel(
            name='UserFCMToken',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('user_id', models.UUIDField()),
                ('fcm_token', models.CharField(max_length=255)),
                ('device_type', models.CharField(default='mobile', max_length=20)),
                ('is_active', models.BooleanField(default=True)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
            ],
            options={
                'unique_together': {('user_id', 'fcm_token')},
            },
        ),
        migrations.CreateModel(
            name='UserPattern',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('user_id', models.UUIDField()),
                ('question_type', models.CharField(max_length=20)),
                ('average_time', models.TimeField()),
                ('variance_minutes', models.IntegerField()),
                ('confidence_score', models.FloatField()),
                ('last_updated', models.DateTimeField(auto_now=True)),
                ('sample_size', models.IntegerField()),
            ],
            options={
                'unique_together': {('user_id', 'question_type')},
            },
        ),
    ]
