# Generated by Django 2.2.5 on 2019-11-01 13:12

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


class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Chv',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('age', models.IntegerField()),
                ('phonenumber', models.CharField(max_length=255)),
                ('profile_picture', models.ImageField(blank=True, default='prof.jpg', upload_to='chv_profiles/')),
                ('location', models.CharField(max_length=200)),
                ('name', models.OneToOneField(on_delete=django.db.models.deletion.PROTECT, related_name='profile', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'db_table': 'chv',
                'ordering': ['-name'],
            },
        ),
        migrations.CreateModel(
            name='Location',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=200)),
                ('county', models.CharField(max_length=200)),
                ('accessibility', models.CharField(choices=[('Great', 'The roads are well passable in all weather conditions'), ('Good', 'The roads are passable in favourable weather conditions'), ('Bad', 'The roads are not passable')], max_length=200)),
            ],
            options={
                'db_table': 'location',
                'ordering': ['-name'],
            },
        ),
        migrations.CreateModel(
            name='Patient',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255)),
                ('age', models.IntegerField()),
                ('gender', models.CharField(max_length=200)),
                ('location', models.CharField(choices=[('Juja', 'Gachororo'), ('High Point', 'Sewage'), ('K-road', 'Stage'), ('Gwa-Kairu', 'Estate'), ('Ruiru', 'Kimbo'), ('Kasarani', 'Nairobi')], default='Ruiru', max_length=200)),
                ('time', models.DateTimeField()),
                ('symptoms', models.TextField()),
                ('urgency', models.CharField(choices=[('red', 'High severity'), ('yellow', 'Moderate severity'), ('green', 'Low severity'), ('blue', 'Unknown severity')], default='blue', max_length=200)),
                ('action_taken', models.TextField()),
                ('examiner', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='chv', to='reachweb.Chv')),
            ],
            options={
                'db_table': 'patient',
                'ordering': ['-name'],
            },
        ),
        migrations.CreateModel(
            name='Emergencies',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('type', models.CharField(choices=[('Road', 'Road accidents'), ('Fire', 'Fire emergencies'), ('Water', 'Water related accidents'), ('Sickness', 'Sick people emergencies')], default='Sickness', max_length=200)),
                ('location', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='locale', to='reachweb.Location')),
                ('reported_by', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='reporter', to='reachweb.Chv')),
            ],
            options={
                'db_table': 'emergencies',
                'ordering': ['type'],
            },
        ),
    ]
