0001_initial.py 1.51 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.db import migrations, models
from django.conf import settings


class Migration(migrations.Migration):

    dependencies = [
11
        ('core', '0005_auto_20160128_0842'),
12
13
14
15
16
17
    ]

    operations = [
        migrations.CreateModel(
            name='Member',
            fields=[
18
                ('user', models.OneToOneField(to=settings.AUTH_USER_MODEL, primary_key=True, serialize=False)),
19
20
21
22
23
            ],
        ),
        migrations.CreateModel(
            name='Subscription',
            fields=[
24
25
                ('id', models.AutoField(auto_created=True, serialize=False, verbose_name='ID', primary_key=True)),
                ('subscription_type', models.CharField(choices=[('cursus-branche', 'Cursus Branche'), ('cursus-tronc-commun', 'Cursus Tronc Commun'), ('deux-semestres', 'Deux semestres'), ('un-semestre', 'Un semestre')], verbose_name='subscription type', max_length=255)),
26
27
28
                ('subscription_start', models.DateField(verbose_name='subscription start')),
                ('subscription_end', models.DateField(verbose_name='subscription end')),
                ('payment_method', models.CharField(choices=[('cheque', 'Chèque'), ('cash', 'Espèce'), ('other', 'Autre')], verbose_name='payment method', max_length=255)),
29
                ('member', models.ForeignKey(to='subscription.Member', related_name='subscriptions')),
30
31
32
33
34
35
            ],
            options={
                'ordering': ['subscription_start'],
            },
        ),
    ]