2015-12-15 16:50:50 +00:00
|
|
|
from __future__ import unicode_literals
|
|
|
|
|
2016-01-29 14:20:00 +00:00
|
|
|
import django.contrib.auth.models
|
2019-10-05 22:32:54 +00:00
|
|
|
import django.db.models.deletion
|
2024-06-24 11:07:36 +00:00
|
|
|
from django.db import migrations, models
|
2015-12-15 16:50:50 +00:00
|
|
|
|
|
|
|
|
|
|
|
class Migration(migrations.Migration):
|
2018-10-04 19:29:19 +00:00
|
|
|
dependencies = [("core", "0001_initial")]
|
2015-12-15 16:50:50 +00:00
|
|
|
|
|
|
|
operations = [
|
|
|
|
migrations.CreateModel(
|
2018-10-04 19:29:19 +00:00
|
|
|
name="Subscription",
|
2015-12-15 16:50:50 +00:00
|
|
|
fields=[
|
2018-10-04 19:29:19 +00:00
|
|
|
(
|
|
|
|
"id",
|
|
|
|
models.AutoField(
|
|
|
|
primary_key=True,
|
|
|
|
serialize=False,
|
|
|
|
verbose_name="ID",
|
|
|
|
auto_created=True,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
(
|
|
|
|
"subscription_type",
|
|
|
|
models.CharField(
|
|
|
|
choices=[
|
|
|
|
("amicale/doceo", "Amicale/DOCEO member"),
|
|
|
|
("assidu", "Assidu member"),
|
|
|
|
("crous", "CROUS member"),
|
|
|
|
("cursus-alternant", "Branch cursus"),
|
|
|
|
("cursus-branche", "Branch cursus"),
|
|
|
|
("cursus-tronc-commun", "Common core cursus"),
|
|
|
|
("deux-semestres", "Two semesters"),
|
|
|
|
("membre-honoraire", "Honorary member"),
|
|
|
|
("reseau-ut", "UT network member"),
|
|
|
|
("sbarro/esta", "Sbarro/ESTA member"),
|
|
|
|
("un-semestre", "One semester"),
|
|
|
|
],
|
|
|
|
max_length=255,
|
|
|
|
verbose_name="subscription type",
|
|
|
|
),
|
|
|
|
),
|
|
|
|
(
|
|
|
|
"subscription_start",
|
|
|
|
models.DateField(verbose_name="subscription start"),
|
|
|
|
),
|
|
|
|
("subscription_end", models.DateField(verbose_name="subscription end")),
|
|
|
|
(
|
|
|
|
"payment_method",
|
|
|
|
models.CharField(
|
|
|
|
choices=[
|
|
|
|
("CHECK", "Check"),
|
|
|
|
("CARD", "Credit card"),
|
|
|
|
("CASH", "Cash"),
|
|
|
|
("EBOUTIC", "Eboutic"),
|
|
|
|
("OTHER", "Other"),
|
|
|
|
],
|
|
|
|
max_length=255,
|
|
|
|
verbose_name="payment method",
|
|
|
|
),
|
|
|
|
),
|
|
|
|
(
|
|
|
|
"location",
|
|
|
|
models.CharField(
|
|
|
|
choices=[
|
|
|
|
("BELFORT", "Belfort"),
|
|
|
|
("SEVENANS", "Sevenans"),
|
|
|
|
("MONTBELIARD", "Montbéliard"),
|
|
|
|
],
|
|
|
|
max_length=20,
|
|
|
|
verbose_name="location",
|
|
|
|
),
|
|
|
|
),
|
2015-12-15 16:50:50 +00:00
|
|
|
],
|
2018-10-04 19:29:19 +00:00
|
|
|
options={"ordering": ["subscription_start"]},
|
2015-12-15 16:50:50 +00:00
|
|
|
),
|
2016-01-29 14:20:00 +00:00
|
|
|
migrations.AddField(
|
2018-10-04 19:29:19 +00:00
|
|
|
model_name="subscription",
|
|
|
|
name="member",
|
2019-10-05 22:32:54 +00:00
|
|
|
field=models.ForeignKey(
|
|
|
|
on_delete=django.db.models.deletion.CASCADE,
|
|
|
|
to="core.User",
|
|
|
|
related_name="subscriptions",
|
|
|
|
),
|
2016-01-29 14:20:00 +00:00
|
|
|
),
|
2015-12-15 16:50:50 +00:00
|
|
|
]
|