# -*- coding: utf-8 -*-
# Generated by Django 1.9.1 on 2016-09-25 15:11
from __future__ import unicode_literals

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='Appointment',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
            ],
        ),
        migrations.CreateModel(
            name='AppointmentTime',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
            ],
        ),
        migrations.CreateModel(
            name='Doctor',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('first_name', models.CharField(max_length=100, null=True)),
                ('last_name', models.CharField(max_length=100, null=True)),
                ('address', models.CharField(max_length=900, null=True)),
                ('phone_number', models.CharField(blank=True, default=None, max_length=12)),
                ('email', models.CharField(blank=True, default=None, max_length=100)),
                ('appointment_times', models.ManyToManyField(blank=True, default=None, to='HealthNet.AppointmentTime')),
            ],
        ),
        migrations.CreateModel(
            name='Hospital',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('location', models.CharField(max_length=900)),
            ],
        ),
        migrations.CreateModel(
            name='Patient',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('first_name', models.CharField(max_length=100, null=True)),
                ('last_name', models.CharField(max_length=100, null=True)),
                ('address', models.CharField(max_length=900, null=True)),
                ('phone_number', models.CharField(blank=True, max_length=12)),
                ('email', models.CharField(blank=True, max_length=100)),
                ('insurance_num', models.CharField(blank=True, max_length=50)),
                ('sex', models.CharField(max_length=6, null=True)),
                ('weight', models.CharField(max_length=10, null=True)),
                ('height_ft', models.CharField(max_length=3, null=True)),
                ('height_in', models.CharField(max_length=3, null=True)),
                ('cur_hospital', models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, related_name='preferred', to='HealthNet.Hospital')),
                ('doctor', models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, to='HealthNet.Doctor')),
                ('preferred_hospital', models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, related_name='admitted', to='HealthNet.Hospital')),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AddField(
            model_name='doctor',
            name='hospital',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='HealthNet.Hospital'),
        ),
        migrations.AddField(
            model_name='doctor',
            name='user',
            field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='appointment',
            name='dr',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='HealthNet.Doctor'),
        ),
        migrations.AddField(
            model_name='appointment',
            name='ptient',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='HealthNet.Patient'),
        ),
        migrations.AddField(
            model_name='appointment',
            name='time',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='HealthNet.AppointmentTime'),
        ),
    ]
