0001_initial.py 3.03 KB
Newer Older
Aymeric Barantal's avatar
Aymeric Barantal committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89
# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.db import models, migrations


class Migration(migrations.Migration):

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

    operations = [
        migrations.CreateModel(
            name='Argumentary',
            fields=[
                ('id', models.AutoField(serialize=False, primary_key=True)),
                ('lang', models.CharField(max_length=255)),
            ],
            options={
            },
            bases=(models.Model,),
        ),
        migrations.CreateModel(
            name='Campaign',
            fields=[
                ('id', models.AutoField(serialize=False, primary_key=True)),
                ('title', models.CharField(max_length=255)),
                ('description', models.CharField(max_length=512)),
                ('start_date', models.DateTimeField()),
                ('end_date', models.DateTimeField()),
                ('default_lang', models.CharField(max_length=5)),
            ],
            options={
            },
            bases=(models.Model,),
        ),
        migrations.CreateModel(
            name='CampaignContact',
            fields=[
                ('id', models.AutoField(serialize=False, primary_key=True)),
                ('weight', models.IntegerField(default=0)),
                ('campaign_id', models.ForeignKey(to='campaign.Campaign')),
            ],
            options={
            },
            bases=(models.Model,),
        ),
        migrations.CreateModel(
            name='Contact',
            fields=[
                ('id', models.AutoField(serialize=False, primary_key=True)),
                ('first_name', models.CharField(max_length=64)),
                ('last_name', models.CharField(max_length=64)),
                ('phone', models.CharField(max_length=32)),
                ('twitter', models.CharField(max_length=64)),
                ('mail', models.CharField(max_length=255)),
            ],
            options={
            },
            bases=(models.Model,),
        ),
        migrations.CreateModel(
            name='Group',
            fields=[
                ('id', models.AutoField(serialize=False, primary_key=True)),
                ('name', models.CharField(max_length=64)),
                ('type', models.CharField(max_length=255)),
                ('media', models.CharField(max_length=255)),
                ('contacts', models.ManyToManyField(to='campaign.Contact')),
                ('organisation_id', models.ForeignKey(to='organization.Organization')),
            ],
            options={
            },
            bases=(models.Model,),
        ),
        migrations.AddField(
            model_name='campaigncontact',
            name='contact_id',
            field=models.ForeignKey(to='campaign.Contact'),
            preserve_default=True,
        ),
        migrations.AddField(
            model_name='argumentary',
            name='campaign_id',
            field=models.ForeignKey(to='campaign.Campaign'),
            preserve_default=True,
        ),
    ]