# Generated by Django 3.0.4 on 2020-03-25 06:45

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


class Migration(migrations.Migration):

    dependencies = [
        ('clintwinsponsor', '0007_auto_20200324_1208'),
    ]

    operations = [
        migrations.CreateModel(
            name='Categories',
            fields=[
                ('categoryId', models.CharField(max_length=30, primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=50)),
                ('value', models.CharField(max_length=50)),
                ('valueType', models.CharField(max_length=50)),
            ],
        ),
        migrations.CreateModel(
            name='ClinicalTrial',
            fields=[
                ('trialId', models.CharField(max_length=30, primary_key=True, serialize=False)),
                ('title', models.CharField(max_length=100)),
                ('objective', models.CharField(max_length=100)),
                ('recruitmentStartDate', models.DateField()),
                ('recruitmentEndDate', models.DateField()),
                ('enrollmentTarget', models.IntegerField()),
                ('inclusionCriteria', models.CharField(max_length=30)),
                ('exclusionCriteria', models.CharField(max_length=30)),
                ('url', models.URLField()),
                ('followUp', models.TextField()),
                ('location', models.CharField(max_length=100)),
                ('comments', models.TextField()),
                ('createdTimeStamp', models.DateTimeField(auto_now_add=True)),
            ],
        ),
        migrations.CreateModel(
            name='ClinicalTrialCriteriaResponse',
            fields=[
                ('responseId', models.CharField(max_length=30, primary_key=True, serialize=False)),
                ('trialId', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='clintwinsponsor.ClinicalTrial')),
            ],
        ),
        migrations.CreateModel(
            name='Criteria',
            fields=[
                ('criteriaId', models.CharField(max_length=30, primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=50)),
                ('value', models.CharField(max_length=50)),
                ('valueType', models.CharField(max_length=50)),
            ],
        ),
        migrations.CreateModel(
            name='Participant',
            fields=[
                ('participantId', models.CharField(max_length=30, primary_key=True, serialize=False)),
                ('firstName', models.CharField(max_length=50)),
                ('lastName', models.CharField(max_length=50)),
                ('gender', models.CharField(choices=[('M', 'Male'), ('F', 'Female'), ('O', 'Other')], max_length=1)),
                ('weight', models.FloatField()),
                ('height', models.FloatField()),
                ('dateBirth', models.DateField()),
                ('dateRegistered', models.DateField()),
                ('dateDeregistered', models.DateField()),
                ('email', models.EmailField(max_length=254)),
                ('phone', models.IntegerField()),
                ('location', models.CharField(max_length=100)),
            ],
        ),
        migrations.CreateModel(
            name='Sponsor',
            fields=[
                ('sponsorId', models.CharField(max_length=30, primary_key=True, serialize=False)),
                ('OrganizationName', models.CharField(max_length=50)),
                ('dateRegistered', models.DateField()),
                ('dateDeregistered', models.DateField()),
                ('contactPerson', models.CharField(max_length=50)),
                ('email', models.EmailField(max_length=254)),
                ('phone', models.IntegerField()),
                ('location', models.CharField(max_length=100)),
            ],
        ),
        migrations.CreateModel(
            name='QuestionSchema',
            fields=[
                ('questionId', models.CharField(max_length=30, primary_key=True, serialize=False)),
                ('type', models.CharField(max_length=50)),
                ('categories', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='clintwinsponsor.Categories')),
                ('responseId', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='clintwinsponsor.ClinicalTrialCriteriaResponse')),
            ],
        ),
        migrations.AddField(
            model_name='clinicaltrialcriteriaresponse',
            name='value',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='clintwinsponsor.Criteria'),
        ),
        migrations.AddField(
            model_name='clinicaltrial',
            name='sponsorId',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='clintwinsponsor.Sponsor'),
        ),
    ]
