0001_initial.py 2.71 KB
Newer Older
luxcem's avatar
luxcem committed
1 2 3
# -*- coding: utf-8 -*-
from __future__ import unicode_literals

4
from django.db import migrations, models
luxcem's avatar
luxcem committed
5 6 7 8 9 10 11 12 13 14 15 16


class Migration(migrations.Migration):

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Dossier',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
17 18 19
                ('created', models.DateTimeField(auto_now_add=True)),
                ('updated', models.DateTimeField(auto_now=True)),
                ('fingerprint', models.CharField(unique=True, max_length=40)),
Arnaud Fabre's avatar
Arnaud Fabre committed
20
                ('title', models.CharField(max_length=1000)),
luxcem's avatar
luxcem committed
21
                ('reference', models.CharField(max_length=200)),
22
                ('text', models.TextField(default=b'', blank=True)),
luxcem's avatar
luxcem committed
23 24 25
                ('link', models.URLField()),
            ],
            options={
26
                'abstract': False,
luxcem's avatar
luxcem committed
27 28 29 30 31 32
            },
        ),
        migrations.CreateModel(
            name='Proposal',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
33 34 35
                ('created', models.DateTimeField(auto_now_add=True)),
                ('updated', models.DateTimeField(auto_now=True)),
                ('fingerprint', models.CharField(unique=True, max_length=40)),
Arnaud Fabre's avatar
Arnaud Fabre committed
36
                ('title', models.CharField(max_length=1000)),
37 38
                ('description', models.TextField(default=b'', blank=True)),
                ('reference', models.CharField(max_length=200, null=True, blank=True)),
luxcem's avatar
luxcem committed
39
                ('datetime', models.DateTimeField()),
40
                ('kind', models.CharField(default=b'', max_length=200, blank=True)),
Arnaud Fabre's avatar
Arnaud Fabre committed
41 42 43 44
                ('total_abstain', models.IntegerField()),
                ('total_against', models.IntegerField()),
                ('total_for', models.IntegerField()),
                ('dossier', models.ForeignKey(related_name='proposals', to='representatives_votes.Dossier')),
luxcem's avatar
luxcem committed
45 46
            ],
            options={
47
                'abstract': False,
luxcem's avatar
luxcem committed
48 49 50 51 52 53
            },
        ),
        migrations.CreateModel(
            name='Vote',
            fields=[
                ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
54 55
                ('representative_name', models.CharField(max_length=200, null=True, blank=True)),
                ('representative_remote_id', models.CharField(max_length=200, null=True, blank=True)),
luxcem's avatar
luxcem committed
56
                ('position', models.CharField(max_length=10, choices=[(b'abstain', b'abstain'), (b'for', b'for'), (b'against', b'against')])),
Arnaud Fabre's avatar
Arnaud Fabre committed
57
                ('proposal', models.ForeignKey(related_name='votes', to='representatives_votes.Proposal')),
luxcem's avatar
luxcem committed
58 59 60
            ],
        ),
    ]