# Generated by Django 6.0.7 on 2026-07-09 01:19

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='AdminAuditLog',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('action', models.CharField(max_length=255)),
                ('description', models.TextField(blank=True, null=True)),
                ('old_value', models.JSONField(blank=True, null=True)),
                ('new_value', models.JSONField(blank=True, null=True)),
                ('created_at', models.DateTimeField(blank=True, null=True)),
            ],
            options={
                'db_table': 'admin_audit_log',
                'ordering': ['-created_at'],
                'managed': False,
            },
        ),
        migrations.CreateModel(
            name='AdminReport',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('report_type', models.CharField(choices=[('user_stats', 'User Stats'), ('consultation_stats', 'Consultation Stats'), ('system_health', 'System Health')], default='user_stats', max_length=30)),
                ('title', models.CharField(blank=True, max_length=255, null=True)),
                ('data', models.JSONField(blank=True, null=True)),
                ('generated_at', models.DateTimeField(blank=True, null=True)),
            ],
            options={
                'db_table': 'admin_reports',
                'ordering': ['-generated_at'],
                'managed': False,
            },
        ),
        migrations.CreateModel(
            name='AdminWorkflow',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('workflow_type', models.CharField(choices=[('doctor_approval', 'Doctor Approval'), ('content_moderation', 'Content Moderation'), ('user_report', 'User Report'), ('feedback_review', 'Feedback Review')], max_length=30)),
                ('status', models.CharField(choices=[('pending', 'Pending'), ('approved', 'Approved'), ('rejected', 'Rejected'), ('in_review', 'In Review')], default='pending', max_length=20)),
                ('description', models.TextField(blank=True, null=True)),
                ('reason', models.TextField(blank=True, null=True)),
                ('data', models.JSONField(blank=True, null=True)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('completed_at', models.DateTimeField(blank=True, null=True)),
            ],
            options={
                'db_table': 'admin_workflows',
                'ordering': ['-created_at'],
                'managed': False,
            },
        ),
        migrations.CreateModel(
            name='AppUser',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=255)),
                ('email', models.EmailField(max_length=255)),
                ('password', models.CharField(max_length=255)),
                ('phone', models.CharField(blank=True, max_length=20, null=True)),
                ('address', models.TextField(blank=True, null=True)),
                ('date_of_birth', models.DateField(blank=True, null=True)),
                ('age', models.IntegerField(blank=True, null=True)),
                ('role', models.CharField(choices=[('user', 'User'), ('doctor', 'Doctor'), ('admin', 'Admin')], default='user', max_length=20)),
                ('profile_image', models.CharField(blank=True, max_length=255, null=True)),
                ('bio', models.TextField(blank=True, null=True)),
                ('cycle_length_days', models.IntegerField(default=28)),
                ('last_period_date', models.DateField(blank=True, null=True)),
                ('is_pregnant', models.BooleanField(default=False)),
                ('health_conditions', models.JSONField(blank=True, null=True)),
                ('status', models.CharField(choices=[('active', 'Active'), ('inactive', 'Inactive'), ('banned', 'Banned')], default='active', max_length=20)),
                ('created_at', models.DateTimeField(blank=True, null=True)),
                ('updated_at', models.DateTimeField(blank=True, null=True)),
            ],
            options={
                'db_table': 'users',
                'ordering': ['-id'],
                'managed': False,
            },
        ),
        migrations.CreateModel(
            name='Consultation',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('topic', models.CharField(blank=True, max_length=255, null=True)),
                ('chat_history', models.JSONField(blank=True, null=True)),
                ('appointment_time', models.DateTimeField(blank=True, null=True)),
                ('status', models.CharField(choices=[('pending', 'Pending'), ('confirmed', 'Confirmed'), ('completed', 'Completed'), ('cancelled', 'Cancelled')], default='pending', max_length=20)),
                ('prescription_url', models.CharField(blank=True, max_length=255, null=True)),
                ('notes', models.TextField(blank=True, null=True)),
                ('rating', models.IntegerField(blank=True, null=True)),
                ('created_at', models.DateTimeField(blank=True, null=True)),
                ('updated_at', models.DateTimeField(blank=True, null=True)),
            ],
            options={
                'db_table': 'consultations',
                'ordering': ['-updated_at'],
                'managed': False,
            },
        ),
        migrations.CreateModel(
            name='FeedPost',
            fields=[
                ('id', models.BigAutoField(primary_key=True, serialize=False)),
                ('content', models.TextField(blank=True, null=True)),
                ('media', models.JSONField(blank=True, null=True)),
                ('created_at', models.DateTimeField(blank=True, null=True)),
                ('updated_at', models.DateTimeField(blank=True, null=True)),
            ],
            options={
                'db_table': 'feed_posts',
                'ordering': ['-created_at'],
                'managed': False,
            },
        ),
        migrations.CreateModel(
            name='FeedPostComment',
            fields=[
                ('id', models.BigAutoField(primary_key=True, serialize=False)),
                ('text', models.TextField()),
                ('created_at', models.DateTimeField(blank=True, null=True)),
            ],
            options={
                'db_table': 'feed_post_comments',
                'ordering': ['created_at'],
                'managed': False,
            },
        ),
        migrations.CreateModel(
            name='FeedPostLike',
            fields=[
                ('id', models.BigAutoField(primary_key=True, serialize=False)),
                ('created_at', models.DateTimeField(blank=True, null=True)),
            ],
            options={
                'db_table': 'feed_post_likes',
                'managed': False,
            },
        ),
        migrations.CreateModel(
            name='KnowledgeContent',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('title', models.CharField(max_length=255)),
                ('content', models.TextField()),
                ('status', models.CharField(choices=[('active', 'Active'), ('inactive', 'Inactive')], default='active', max_length=20)),
                ('created_at', models.DateTimeField(blank=True, null=True)),
                ('updated_at', models.DateTimeField(blank=True, null=True)),
            ],
            options={
                'db_table': 'knowledge_contents',
                'ordering': ['-created_at'],
                'managed': False,
            },
        ),
        migrations.CreateModel(
            name='KnowledgeTopic',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('title', models.CharField(max_length=255)),
                ('description', models.TextField(blank=True, null=True)),
                ('status', models.CharField(choices=[('active', 'Active'), ('inactive', 'Inactive')], default='active', max_length=20)),
                ('created_at', models.DateTimeField(blank=True, null=True)),
                ('updated_at', models.DateTimeField(blank=True, null=True)),
            ],
            options={
                'db_table': 'knowledge_topics',
                'ordering': ['-created_at'],
                'managed': False,
            },
        ),
        migrations.CreateModel(
            name='Notification',
            fields=[
                ('id', models.BigAutoField(primary_key=True, serialize=False)),
                ('title', models.CharField(max_length=255)),
                ('message', models.TextField()),
                ('type', models.CharField(choices=[('period_reminder', 'Period Reminder'), ('appointment', 'Appointment'), ('health_tip', 'Health Tip'), ('alert', 'Alert')], default='alert', max_length=20)),
                ('is_read', models.BooleanField(default=False)),
                ('action_url', models.CharField(blank=True, max_length=255, null=True)),
                ('created_at', models.DateTimeField(blank=True, null=True)),
            ],
            options={
                'db_table': 'notifications',
                'ordering': ['-created_at'],
                'managed': False,
            },
        ),
        migrations.CreateModel(
            name='PeriodLog',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('start_date', models.DateField()),
                ('end_date', models.DateField(blank=True, null=True)),
                ('symptoms', models.JSONField(blank=True, null=True)),
                ('mood', models.CharField(blank=True, max_length=50, null=True)),
                ('flow_intensity', models.CharField(blank=True, choices=[('light', 'Light'), ('medium', 'Medium'), ('heavy', 'Heavy')], max_length=20, null=True)),
                ('notes', models.TextField(blank=True, null=True)),
                ('created_at', models.DateTimeField(blank=True, null=True)),
                ('updated_at', models.DateTimeField(blank=True, null=True)),
            ],
            options={
                'db_table': 'period_logs',
                'ordering': ['-start_date'],
                'managed': False,
            },
        ),
        migrations.CreateModel(
            name='PregnancyTracking',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('start_date', models.DateField()),
                ('due_date', models.DateField(blank=True, null=True)),
                ('current_week', models.IntegerField(blank=True, null=True)),
                ('notes', models.TextField(blank=True, null=True)),
                ('last_checkup_date', models.DateField(blank=True, null=True)),
                ('status', models.CharField(choices=[('active', 'Active'), ('completed', 'Completed'), ('miscarriage', 'Miscarriage')], default='active', max_length=20)),
                ('created_at', models.DateTimeField(blank=True, null=True)),
                ('updated_at', models.DateTimeField(blank=True, null=True)),
            ],
            options={
                'db_table': 'pregnancy_tracking',
                'managed': False,
            },
        ),
        migrations.CreateModel(
            name='UserFeedback',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('feedback_type', models.CharField(blank=True, max_length=100, null=True)),
                ('message', models.TextField()),
                ('rating', models.IntegerField(blank=True, null=True)),
                ('status', models.CharField(choices=[('new', 'New'), ('in_review', 'In Review'), ('resolved', 'Resolved')], default='new', max_length=20)),
                ('created_at', models.DateTimeField(blank=True, null=True)),
            ],
            options={
                'db_table': 'user_feedback',
                'ordering': ['-created_at'],
                'managed': False,
            },
        ),
        migrations.CreateModel(
            name='UserOnboarding',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('is_married', models.BooleanField()),
                ('first_period_age', models.IntegerField()),
                ('last_period_first_day', models.DateField()),
                ('is_planning_baby', models.BooleanField(blank=True, null=True)),
                ('created_at', models.DateTimeField(blank=True, null=True)),
                ('updated_at', models.DateTimeField(blank=True, null=True)),
            ],
            options={
                'db_table': 'user_onboarding',
                'managed': False,
            },
        ),
        migrations.CreateModel(
            name='UserSetting',
            fields=[
                ('id', models.BigAutoField(primary_key=True, serialize=False)),
                ('language', models.CharField(default='English', max_length=20)),
                ('notifications_enabled', models.BooleanField(default=True)),
                ('created_at', models.DateTimeField(blank=True, null=True)),
                ('updated_at', models.DateTimeField(blank=True, null=True)),
            ],
            options={
                'db_table': 'user_settings',
                'managed': False,
            },
        ),
        migrations.CreateModel(
            name='PasswordResetCode',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('email', models.EmailField(db_index=True, max_length=255)),
                ('code', models.CharField(max_length=6)),
                ('expires_at', models.DateTimeField()),
                ('used', models.BooleanField(default=False)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
            ],
            options={
                'db_table': 'password_reset_codes',
                'managed': True,
            },
        ),
        migrations.CreateModel(
            name='DeviceToken',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('token', models.CharField(max_length=512, unique=True)),
                ('platform', models.CharField(choices=[('android', 'Android'), ('ios', 'iOS'), ('web', 'Web')], default='android', max_length=20)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('user', models.ForeignKey(db_column='user_id', on_delete=django.db.models.deletion.CASCADE, related_name='device_tokens', to='core.appuser')),
            ],
            options={
                'db_table': 'device_tokens',
                'managed': True,
            },
        ),
    ]
