mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-21 01:09:24 +00:00
.github
antispam
api
club
com
core
counter
docs
eboutic
election
forum
galaxy
locale
matmat
pedagogy
rootplace
sas
sith
staticfiles
subscription
migrations
0001_initial.py
0002_auto_20160830_1719.py
0003_auto_20160902_1914.py
0004_auto_20170821_1849.py
0005_auto_20170821_2054.py
0006_auto_20170902_1222.py
0007_auto_20180706_1135.py
0008_auto_20180831_2016.py
0009_auto_20180920_1421.py
0010_auto_20180920_1441.py
0011_auto_20190825_2215.py
0012_auto_20200615_1438.py
0013_auto_20200828_2117.py
0014_auto_20201207_2323.py
__init__.py
static
templates
tests
__init__.py
admin.py
forms.py
models.py
urls.py
views.py
trombi
.coveragerc
.env.example
.envrc
.gitattributes
.gitignore
.mailmap
.npmrc
.pre-commit-config.yaml
.python-version
CONTRIBUTING.rst
LICENSE
Procfile.service
Procfile.static
README.md
biome.json
conftest.py
manage.py
mkdocs.yml
openapi-csrf.ts
openapi-ts.config.ts
package-lock.json
package.json
pyproject.toml
tsconfig.json
uv.lock
vite.config.mts
88 lines
3.2 KiB
Python
88 lines
3.2 KiB
Python
from __future__ import unicode_literals
|
|
|
|
import django.contrib.auth.models
|
|
import django.db.models.deletion
|
|
from django.db import migrations, models
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
dependencies = [("core", "0001_initial")]
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name="Subscription",
|
|
fields=[
|
|
(
|
|
"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",
|
|
),
|
|
),
|
|
],
|
|
options={"ordering": ["subscription_start"]},
|
|
),
|
|
migrations.AddField(
|
|
model_name="subscription",
|
|
name="member",
|
|
field=models.ForeignKey(
|
|
on_delete=django.db.models.deletion.CASCADE,
|
|
to="core.User",
|
|
related_name="subscriptions",
|
|
),
|
|
),
|
|
]
|