# Generated by Django 3.2 on 2021-05-11 19:48

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Hantera',
            fields=[
                ('ssn', models.CharField(max_length=100, primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=150)),
                ('result', models.CharField(max_length=150)),
            ],
        ),
        migrations.CreateModel(
            name='Patient',
            fields=[
                ('ssn', models.BigIntegerField(primary_key=True, serialize=False, unique=True, validators=[psa.models.validate_ssn])),
                ('namn', models.CharField(max_length=100)),
                ('gata', models.CharField(max_length=50)),
                ('postort', models.CharField(max_length=50)),
                ('postnr', models.IntegerField(validators=[psa.models.validate_postnr])),
                ('mail', models.EmailField(max_length=50)),
                ('operationsdatum', models.DateField()),
                ('created', models.DateField(auto_now_add=True)),
                ('kallelsedatum', models.DateField()),
            ],
            options={
                'verbose_name_plural': 'Patienter',
            },
        ),
        migrations.CreateModel(
            name='Provsvar',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('created', models.DateField(auto_now_add=True)),
                ('result', models.DecimalField(decimal_places=2, max_digits=5)),
                ('done', models.CharField(default='False', max_length=100)),
                ('ssn', models.ForeignKey(default='None', on_delete=django.db.models.deletion.SET_DEFAULT, to='psa.patient', validators=[psa.models.validate_ssn, psa.models.read_from_db], verbose_name='Kopplad patient')),
            ],
            options={
                'verbose_name_plural': 'Provsvar',
            },
        ),
    ]
