2021-02-28 22:00:11 +00:00
|
|
|
# Generated by Django 3.1.7 on 2021-02-28 21:09
|
2021-02-27 20:07:48 +00:00
|
|
|
import django.contrib.postgres.fields.ranges
|
|
|
|
import django.db.models.deletion
|
2021-02-28 22:03:32 +00:00
|
|
|
from django.conf import settings
|
|
|
|
from django.db import migrations
|
|
|
|
from django.db import models
|
2021-02-27 20:07:48 +00:00
|
|
|
|
|
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
|
|
|
|
initial = True
|
|
|
|
|
|
|
|
dependencies = [
|
|
|
|
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
|
|
|
]
|
|
|
|
|
|
|
|
operations = [
|
|
|
|
migrations.CreateModel(
|
2021-02-28 22:03:32 +00:00
|
|
|
name="MembershipType",
|
2021-02-27 20:07:48 +00:00
|
|
|
fields=[
|
2021-02-28 22:03:32 +00:00
|
|
|
(
|
|
|
|
"id",
|
|
|
|
models.AutoField(
|
|
|
|
auto_created=True,
|
|
|
|
primary_key=True,
|
|
|
|
serialize=False,
|
|
|
|
verbose_name="ID",
|
|
|
|
),
|
|
|
|
),
|
|
|
|
(
|
|
|
|
"modified",
|
|
|
|
models.DateTimeField(auto_now=True, verbose_name="modified"),
|
|
|
|
),
|
|
|
|
(
|
|
|
|
"created",
|
|
|
|
models.DateTimeField(auto_now_add=True, verbose_name="oprettet"),
|
|
|
|
),
|
|
|
|
("name", models.CharField(max_length=64, verbose_name="navn")),
|
2021-02-27 20:07:48 +00:00
|
|
|
],
|
|
|
|
options={
|
2021-02-28 22:03:32 +00:00
|
|
|
"verbose_name": "membership type",
|
|
|
|
"verbose_name_plural": "membership types",
|
2021-02-27 20:07:48 +00:00
|
|
|
},
|
|
|
|
),
|
|
|
|
migrations.CreateModel(
|
2021-02-28 22:03:32 +00:00
|
|
|
name="Membership",
|
2021-02-27 20:07:48 +00:00
|
|
|
fields=[
|
2021-02-28 22:03:32 +00:00
|
|
|
(
|
|
|
|
"id",
|
|
|
|
models.AutoField(
|
|
|
|
auto_created=True,
|
|
|
|
primary_key=True,
|
|
|
|
serialize=False,
|
|
|
|
verbose_name="ID",
|
|
|
|
),
|
|
|
|
),
|
|
|
|
(
|
|
|
|
"modified",
|
|
|
|
models.DateTimeField(auto_now=True, verbose_name="modified"),
|
|
|
|
),
|
|
|
|
(
|
|
|
|
"created",
|
|
|
|
models.DateTimeField(auto_now_add=True, verbose_name="oprettet"),
|
|
|
|
),
|
|
|
|
(
|
|
|
|
"period",
|
|
|
|
django.contrib.postgres.fields.ranges.DateTimeRangeField(
|
|
|
|
help_text="The duration this subscription is for. "
|
|
|
|
),
|
|
|
|
),
|
|
|
|
(
|
|
|
|
"membership_type",
|
|
|
|
models.ForeignKey(
|
|
|
|
on_delete=django.db.models.deletion.PROTECT,
|
|
|
|
related_name="memberships",
|
|
|
|
to="membership.membershiptype",
|
|
|
|
verbose_name="subscription type",
|
|
|
|
),
|
|
|
|
),
|
|
|
|
(
|
|
|
|
"user",
|
|
|
|
models.ForeignKey(
|
|
|
|
on_delete=django.db.models.deletion.PROTECT,
|
|
|
|
to=settings.AUTH_USER_MODEL,
|
|
|
|
),
|
|
|
|
),
|
2021-02-27 20:07:48 +00:00
|
|
|
],
|
|
|
|
options={
|
2021-02-28 22:03:32 +00:00
|
|
|
"verbose_name": "membership",
|
|
|
|
"verbose_name_plural": "memberships",
|
2021-02-27 20:07:48 +00:00
|
|
|
},
|
|
|
|
),
|
|
|
|
]
|