# Generated by Django 3.1.1 on 2020-09-07 18:13

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Address',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('streetNb', models.IntegerField()),
                ('AptFloor', models.CharField(max_length=200)),
                ('city', models.CharField(max_length=60)),
            ],
        ),
        migrations.CreateModel(
            name='Nurse',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('first_name', models.CharField(max_length=80)),
                ('last_name', models.CharField(max_length=80)),
                ('birth_date', models.DateField()),
                ('sex', models.CharField(choices=[('Male', 'Male'), ('Female', 'Female')], max_length=10)),
                ('cin', models.CharField(max_length=15)),
                ('phone_nb', models.CharField(max_length=30)),
                ('salary', models.FloatField()),
                ('is_active', models.BooleanField(default=True)),
                ('created', models.DateField(auto_now_add=True)),
                ('address', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='mainapp.address')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='InsuranceAgency',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=200)),
                ('email', models.EmailField(max_length=254)),
                ('phone_nb', models.CharField(max_length=30)),
                ('repayment_rate', models.IntegerField(validators=[django.core.validators.MaxValueValidator(100), django.core.validators.MinValueValidator(1)])),
                ('address', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='mainapp.address')),
            ],
        ),
        migrations.CreateModel(
            name='InsuranceAccount',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('insur_acc_nb', models.CharField(max_length=60)),
                ('insuranceAgency', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='mainapp.insuranceagency')),
            ],
        ),
        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=80)),
                ('last_name', models.CharField(max_length=80)),
                ('birth_date', models.DateField()),
                ('sex', models.CharField(choices=[('Male', 'Male'), ('Female', 'Female')], max_length=10)),
                ('cin', models.CharField(max_length=15)),
                ('phone_nb', models.CharField(max_length=30)),
                ('email', models.EmailField(max_length=254)),
                ('pwd', models.CharField(max_length=200)),
                ('salary', models.FloatField()),
                ('specialty', models.CharField(choices=[('General practice', 'General practice'), ('Clinical radiology', 'Clinical radiology'), ('Anaesthesia', 'Anaesthesia'), ('Ophthalmology', 'Ophthalmology')], max_length=200)),
                ('is_active', models.BooleanField(default=True)),
                ('created', models.DateField(auto_now_add=True)),
                ('address', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='mainapp.address')),
            ],
            options={
                'abstract': False,
            },
        ),
    ]
