2015-12-15 16:50:50 +00:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
from __future__ import unicode_literals
|
|
|
|
|
|
|
|
from django.db import migrations, models
|
2016-01-29 14:20:00 +00:00
|
|
|
import django.contrib.auth.models
|
2015-12-15 16:50:50 +00:00
|
|
|
|
|
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
|
|
|
|
dependencies = [
|
2016-01-29 14:20:00 +00:00
|
|
|
('core', '0001_initial'),
|
2015-12-15 16:50:50 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
operations = [
|
|
|
|
migrations.CreateModel(
|
|
|
|
name='Subscription',
|
|
|
|
fields=[
|
2016-01-29 14:20:00 +00:00
|
|
|
('id', models.AutoField(verbose_name='ID', primary_key=True, auto_created=True, serialize=False)),
|
|
|
|
('subscription_type', models.CharField(choices=[('cursus-branche', 'Cursus Branche'), ('cursus-tronc-commun', 'Cursus Tronc Commun'), ('deux-semestres', 'Deux semestres'), ('un-semestre', 'Un semestre')], max_length=255, verbose_name='subscription type')),
|
2015-12-15 16:50:50 +00:00
|
|
|
('subscription_start', models.DateField(verbose_name='subscription start')),
|
|
|
|
('subscription_end', models.DateField(verbose_name='subscription end')),
|
2016-01-29 14:20:00 +00:00
|
|
|
('payment_method', models.CharField(choices=[('cheque', 'Chèque'), ('cash', 'Espèce'), ('other', 'Autre')], max_length=255, verbose_name='payment method')),
|
2015-12-15 16:50:50 +00:00
|
|
|
],
|
|
|
|
options={
|
|
|
|
'ordering': ['subscription_start'],
|
|
|
|
},
|
|
|
|
),
|
2016-01-29 14:20:00 +00:00
|
|
|
migrations.CreateModel(
|
|
|
|
name='Subscriber',
|
|
|
|
fields=[
|
|
|
|
],
|
|
|
|
options={
|
|
|
|
'proxy': True,
|
|
|
|
},
|
|
|
|
bases=('core.user',),
|
|
|
|
managers=[
|
|
|
|
('objects', django.contrib.auth.models.UserManager()),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
migrations.AddField(
|
|
|
|
model_name='subscription',
|
|
|
|
name='member',
|
|
|
|
field=models.ForeignKey(related_name='subscriptions', to='subscription.Subscriber'),
|
|
|
|
),
|
2015-12-15 16:50:50 +00:00
|
|
|
]
|