# Generated by Django 5.0.2 on 2024-02-16 17:40

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='BeverageRecord',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('beverage_type', models.CharField(max_length=100)),
                ('glass_type', models.CharField(max_length=100)),
                ('glass_count', models.IntegerField()),
                ('quantity', models.IntegerField()),
                ('quantity_measure', models.CharField(max_length=100)),
            ],
            options={
                'db_table': 'beverage_record',
            },
        ),
        migrations.CreateModel(
            name='FoodIngredientRecord',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
            ],
            options={
                'db_table': 'food_ingredient_record',
            },
        ),
        migrations.CreateModel(
            name='FoodRecord',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('quantity', models.IntegerField()),
            ],
            options={
                'db_table': 'food_record',
            },
        ),
        migrations.CreateModel(
            name='MealRecord',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('meal_date', models.DateField()),
                ('meal_time', models.TimeField()),
            ],
            options={
                'db_table': 'meal_record',
            },
        ),
        migrations.CreateModel(
            name='Medicine',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(blank=True, max_length=255, null=True)),
                ('quantity', models.IntegerField(default=0)),
                ('type', models.CharField(blank=True, max_length=100, null=True)),
            ],
            options={
                'db_table': 'medicine',
            },
        ),
        migrations.CreateModel(
            name='SymptomTypeAfterMeal',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
            ],
            options={
                'db_table': 'symptom_type_after_meal',
            },
        ),
        migrations.CreateModel(
            name='SymptomTypeBeforeMeal',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
            ],
            options={
                'db_table': 'symptom_type_before_meal',
            },
        ),
        migrations.CreateModel(
            name='Bowel',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('bowel_date', models.DateField()),
                ('bowel_time', models.TimeField()),
                ('stool_type', models.CharField(blank=True, max_length=100, null=True)),
                ('duration', models.DurationField(blank=True, null=True)),
                ('completeness_of_evacuation', models.CharField(blank=True, max_length=100, null=True)),
                ('urgency', models.CharField(blank=True, max_length=100, null=True)),
                ('smellness', models.CharField(blank=True, max_length=100, null=True)),
                ('pain_level', models.CharField(blank=True, max_length=100, null=True)),
                ('volume', models.CharField(blank=True, max_length=100, null=True)),
                ('color', models.CharField(blank=True, max_length=100, null=True)),
                ('excessive_flatulence', models.BooleanField(default=False)),
                ('principal', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='bowel_principal', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'db_table': 'bowel',
            },
        ),
        migrations.CreateModel(
            name='ChronicCondition',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('active', models.BooleanField(default=True)),
                ('deleted', models.BooleanField(default=False)),
                ('created_on', models.DateTimeField(auto_now_add=True)),
                ('modified_on', models.DateTimeField(auto_now=True)),
                ('name', models.CharField(blank=True, max_length=255, null=True)),
                ('duration', models.CharField(blank=True, max_length=255, null=True)),
                ('created_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='%(class)s_created', to=settings.AUTH_USER_MODEL)),
                ('modified_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='%(class)s_modified', to=settings.AUTH_USER_MODEL)),
                ('principal', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='chronic_principal', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'db_table': 'chronic_condition',
            },
        ),
        migrations.CreateModel(
            name='Intolerance',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('active', models.BooleanField(default=True)),
                ('deleted', models.BooleanField(default=False)),
                ('created_on', models.DateTimeField(auto_now_add=True)),
                ('modified_on', models.DateTimeField(auto_now=True)),
                ('name', models.CharField(blank=True, max_length=255, null=True)),
                ('duration', models.CharField(blank=True, max_length=255, null=True)),
                ('created_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='%(class)s_created', to=settings.AUTH_USER_MODEL)),
                ('modified_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='%(class)s_modified', to=settings.AUTH_USER_MODEL)),
                ('principal', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='intolerance_principal', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'db_table': 'intolerance',
            },
        ),
        migrations.CreateModel(
            name='MealRecordBeverageRecord',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('beverage_record', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='module_activity.beveragerecord')),
                ('meal_record', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='module_activity.mealrecord')),
            ],
            options={
                'db_table': 'meal_record_beverage_record',
            },
        ),
        migrations.AddField(
            model_name='mealrecord',
            name='beverage_records',
            field=models.ManyToManyField(through='module_activity.MealRecordBeverageRecord', to='module_activity.beveragerecord'),
        ),
        migrations.CreateModel(
            name='MealRecordFoodIngredientRecord',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('food_ingredient_record', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='module_activity.foodingredientrecord')),
                ('meal_record', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='module_activity.mealrecord')),
            ],
            options={
                'db_table': 'meal_record_food_ingredient_record',
            },
        ),
        migrations.AddField(
            model_name='mealrecord',
            name='food_ingredient_records',
            field=models.ManyToManyField(through='module_activity.MealRecordFoodIngredientRecord', to='module_activity.foodingredientrecord'),
        ),
        migrations.CreateModel(
            name='MealRecordFoodRecord',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('food_record', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='module_activity.foodrecord')),
                ('meal_record', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='module_activity.mealrecord')),
            ],
            options={
                'db_table': 'meal_record_food_record',
            },
        ),
        migrations.AddField(
            model_name='mealrecord',
            name='food_records',
            field=models.ManyToManyField(through='module_activity.MealRecordFoodRecord', to='module_activity.foodrecord'),
        ),
        migrations.CreateModel(
            name='MealSymptomRecord',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('symptoms_date', models.DateField()),
                ('symptoms_time', models.TimeField()),
                ('symptoms_description', models.TextField(blank=True, null=True)),
                ('interval', models.DurationField()),
                ('principal', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='meal_symptom_principal', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'db_table': 'meal_symptom_record',
            },
        ),
        migrations.CreateModel(
            name='Medication',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date', models.DateField()),
                ('time', models.TimeField()),
                ('principal', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='medication_principal', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'db_table': 'medication',
            },
        ),
        migrations.CreateModel(
            name='MedicationMedicine',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('medication', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='medication_medicines', to='module_activity.medication')),
                ('medicine', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='medication_medicines', to='module_activity.medicine')),
            ],
            options={
                'db_table': 'medication_medicine',
            },
        ),
        migrations.AddField(
            model_name='medication',
            name='medicines',
            field=models.ManyToManyField(related_name='medications', through='module_activity.MedicationMedicine', to='module_activity.medicine'),
        ),
        migrations.CreateModel(
            name='PastTreatment',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('active', models.BooleanField(default=True)),
                ('deleted', models.BooleanField(default=False)),
                ('created_on', models.DateTimeField(auto_now_add=True)),
                ('modified_on', models.DateTimeField(auto_now=True)),
                ('name', models.CharField(blank=True, max_length=255, null=True)),
                ('duration', models.DateField()),
                ('created_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='%(class)s_created', to=settings.AUTH_USER_MODEL)),
                ('modified_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='%(class)s_modified', to=settings.AUTH_USER_MODEL)),
                ('principal', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='pasttreatment_principal', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'db_table': 'past_treatment',
            },
        ),
        migrations.CreateModel(
            name='PrincipalHealthData',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('active', models.BooleanField(default=True)),
                ('deleted', models.BooleanField(default=False)),
                ('created_on', models.DateTimeField(auto_now_add=True)),
                ('modified_on', models.DateTimeField(auto_now=True)),
                ('gastrointestinal_health', models.CharField(blank=True, help_text='Describe your gastrointestinal health (e.g., best, average, poor, etc.)', max_length=255, null=True, verbose_name='Gastrointestinal Health')),
                ('exercise_frequency', models.CharField(blank=True, help_text='Describe your exercise frequency (e.g., Less than equal to 3 days, 2 days, Greater than 3 days, etc.)', max_length=255, null=True, verbose_name='Exercise Frequency')),
                ('sleep_duration', models.CharField(blank=True, help_text='Enter your average sleep duration in hours per night.', max_length=255, null=True, verbose_name='Sleep Duration (hours)')),
                ('ethenicity', models.CharField(blank=True, help_text='Select your ethnicity.', max_length=255, null=True, verbose_name='Ethnicity')),
                ('weight', models.DecimalField(blank=True, decimal_places=2, help_text='Enter your weight in kilograms.', max_digits=5, null=True, verbose_name='Weight (kg)')),
                ('height', models.DecimalField(blank=True, decimal_places=2, help_text='Enter your height in centimeters.', max_digits=4, null=True, verbose_name='Height (cm)')),
                ('eat_frequency', models.CharField(blank=True, help_text='Describe your eating frequency (e.g., 3 meals per day, frequent snacking, etc.)', max_length=255, null=True, verbose_name='Eating Frequency')),
                ('created_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='%(class)s_created', to=settings.AUTH_USER_MODEL)),
                ('modified_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='%(class)s_modified', to=settings.AUTH_USER_MODEL)),
                ('principal', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='health_data_principal', to=settings.AUTH_USER_MODEL, verbose_name='Principal')),
            ],
            options={
                'db_table': 'princpal_health_data',
            },
        ),
        migrations.CreateModel(
            name='Symptoms',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('active', models.BooleanField(default=True)),
                ('deleted', models.BooleanField(default=False)),
                ('created_on', models.DateTimeField(auto_now_add=True)),
                ('modified_on', models.DateTimeField(auto_now=True)),
                ('name', models.CharField(blank=True, max_length=255, null=True)),
                ('duration', models.CharField(blank=True, max_length=255, null=True)),
                ('created_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='%(class)s_created', to=settings.AUTH_USER_MODEL)),
                ('modified_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='%(class)s_modified', to=settings.AUTH_USER_MODEL)),
                ('principal', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='symptoms_principal', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'db_table': 'symptoms',
            },
        ),
        migrations.CreateModel(
            name='SymptomRecordAfterMeal',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('symptom_record', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='module_activity.mealsymptomrecord')),
                ('symptom_type_after_meal', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='module_activity.symptomtypeaftermeal')),
            ],
            options={
                'db_table': 'symptom_record_after_meal',
            },
        ),
        migrations.AddField(
            model_name='mealsymptomrecord',
            name='symptoms_after_meal',
            field=models.ManyToManyField(through='module_activity.SymptomRecordAfterMeal', to='module_activity.symptomtypeaftermeal'),
        ),
        migrations.CreateModel(
            name='SymptomRecordBeforeMeal',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('symptom_record', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='module_activity.mealsymptomrecord')),
                ('symptom_type_before_meal', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='module_activity.symptomtypebeforemeal')),
            ],
            options={
                'db_table': 'symptom_record_before_meal',
            },
        ),
        migrations.AddField(
            model_name='mealsymptomrecord',
            name='symptoms_before_meal',
            field=models.ManyToManyField(through='module_activity.SymptomRecordBeforeMeal', to='module_activity.symptomtypebeforemeal'),
        ),
    ]
