# Generated by Django 2.2.12 on 2021-03-04 13:01

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('otree', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Group',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('id_in_subsession', otree.db.models.PositiveIntegerField(db_index=True, null=True)),
                ('round_number', otree.db.models.PositiveIntegerField(db_index=True, null=True)),
                ('session', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='survey1st_group', to='otree.Session')),
            ],
            options={
                'db_table': 'survey1st_group',
            },
            bases=(models.Model, otree.db.idmap.GroupIDMapMixin),
        ),
        migrations.CreateModel(
            name='Subsession',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('round_number', otree.db.models.PositiveIntegerField(db_index=True, null=True)),
                ('session_name', otree.db.models.StringField(max_length=10000, null=True)),
                ('exec_time', otree.db.models.StringField(max_length=10000, null=True)),
                ('session', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='survey1st_subsession', to='otree.Session')),
            ],
            options={
                'db_table': 'survey1st_subsession',
            },
            bases=(models.Model, otree.db.idmap.SubsessionIDMapMixin),
        ),
        migrations.CreateModel(
            name='Player',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('id_in_group', otree.db.models.PositiveIntegerField(db_index=True, null=True)),
                ('_payoff', otree.db.models.CurrencyField(default=0, null=True)),
                ('round_number', otree.db.models.PositiveIntegerField(db_index=True, null=True)),
                ('_role', otree.db.models.StringField(max_length=10000, null=True)),
                ('gender', otree.db.models.StringField(choices=[['female', 'Female'], ['male', 'Male']], max_length=10000, null=True, verbose_name='Please state your gender:')),
                ('age', otree.db.models.PositiveIntegerField(null=True, verbose_name='Please state your age:')),
                ('nationality', otree.db.models.StringField(max_length=10000, null=True, verbose_name='What is your nationality?')),
                ('live_status', otree.db.models.StringField(choices=[['alone', 'I live alone'], ['with_partner', 'I live with my partner'], ['with_partner_and_children', 'I live with my partner and children'], ['others', 'Others']], max_length=10000, null=True, verbose_name='Please state your living status:')),
                ('monthly_income', otree.db.models.StringField(choices=[['40k_above', '40,000DKK and above'], ['between', 'Between 25,000DKK and 40,000DKK'], ['less_25k', '25,000DKK and less']], max_length=10000, null=True, verbose_name='Please state your monthly gross income:')),
                ('street_name', otree.db.models.StringField(max_length=10000, null=True, verbose_name='What is the name of your street?')),
                ('post_code', otree.db.models.StringField(max_length=10000, null=True, verbose_name='Please fill the post code:')),
                ('property_ownership', otree.db.models.StringField(choices=[['own', 'Own'], ['rent', 'Rent'], ['live_at_relative_residence', "Living at relatives' residence"]], max_length=10000, null=True, verbose_name='Do you own or rent your current property?')),
                ('flood_risk', otree.db.models.StringField(choices=[['no_risk', 'No risk'], ['high_risk', 'High risk']], max_length=10000, null=True, verbose_name="What is your residence's flood risk zone?")),
                ('apartment_type', otree.db.models.StringField(choices=[['an_apartment', 'An apartment'], ['a_house', 'A house']], max_length=10000, null=True, verbose_name='What is your dwelling type?')),
                ('risk_opt_preference', otree.db.models.StringField(choices=[['toss_a_coin', 'Toss a coin, win 10000 points with probability of 0.5 and win nothing with probability of 0.5'], ['win_5k_tokens', 'Win 5000 points with certainty'], ['either', 'Either, I am indifferent to the two options']], max_length=10000, null=True, verbose_name='Which option do you prefer?')),
                ('frame_loss_aversion', otree.db.models.StringField(choices=[['risk_averse_in_gains', 'Program A: 200 people will be saved;  Program  B: There is a one-third probability that 600 people will be saved,and a two-thirds probability that no people will be saved'], ['risk_loving_in_losse', 'Program C: 400 people will die; Program D: There is a one-third probability that nobody will die, and a two-third probability that 600 people will die']], max_length=10000, null=True, verbose_name='Which of the two programs would you favor?')),
                ('q1', otree.db.models.PositiveIntegerField(choices=[[1, '300 points immediately'], [0, '500 points in two months']], null=True, verbose_name='What would you prefer?')),
                ('q2', otree.db.models.PositiveIntegerField(choices=[[1, '300 points in one year'], [0, '500 points in one year and two months']], null=True, verbose_name='What would you prefer?')),
                ('q3', otree.db.models.PositiveIntegerField(choices=[[1, '400 points tokens in one year and two months'], [0, 'Being able to choose, one year from today, 300 points then 500 points in two months']], null=True, verbose_name='What would you prefer?')),
                ('q4', otree.db.models.PositiveIntegerField(choices=[[1, '700 points in one year and two months'], [0, 'Being able to choose, one year from today, 300 points then 500 points in two months']], null=True, verbose_name='What would you prefer?')),
                ('group', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='survey1st.Group')),
                ('participant', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='survey1st_player', to='otree.Participant')),
                ('session', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='survey1st_player', to='otree.Session')),
                ('subsession', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='survey1st.Subsession')),
            ],
            options={
                'db_table': 'survey1st_player',
            },
            bases=(models.Model, otree.db.idmap.PlayerIDMapMixin),
        ),
        migrations.AddField(
            model_name='group',
            name='subsession',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='survey1st.Subsession'),
        ),
    ]
