Skip to content

Commit

Permalink
Oeps
Browse files Browse the repository at this point in the history
  • Loading branch information
JobDoesburg committed Apr 8, 2024
1 parent bdf3e7a commit da12b0b
Show file tree
Hide file tree
Showing 19 changed files with 1,562 additions and 0 deletions.
28 changes: 28 additions & 0 deletions website/age/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Generated by Django 4.2.9 on 2024-04-08 12:50

from django.db import migrations, models


class Migration(migrations.Migration):
initial = True

dependencies = []

operations = [
migrations.CreateModel(
name="AgeRegistration",
fields=[
("id", models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")),
("created_at", models.DateTimeField(auto_now_add=True)),
("updated_at", models.DateTimeField(auto_now=True)),
("minimum_age", models.PositiveIntegerField()),
(
"verified_by",
models.CharField(
blank=True, choices=[("yivi", "Yivi"), ("manual", "Manually")], max_length=100, null=True
),
),
("attributes", models.JSONField(blank=True, max_length=1000, null=True)),
],
),
]
33 changes: 33 additions & 0 deletions website/age/migrations/0002_initial.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Generated by Django 4.2.9 on 2024-04-08 12:50

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


class Migration(migrations.Migration):
initial = True

dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
("age", "0001_initial"),
]

operations = [
migrations.AddField(
model_name="ageregistration",
name="user",
field=models.OneToOneField(
on_delete=django.db.models.deletion.CASCADE,
related_name="is_18_years_old",
to=settings.AUTH_USER_MODEL,
),
),
migrations.AddField(
model_name="ageregistration",
name="verified_by_user",
field=models.ForeignKey(
blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL
),
),
]
42 changes: 42 additions & 0 deletions website/announcements/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Generated by Django 4.2.9 on 2024-04-08 12:50

from django.db import migrations, models
import django.utils.timezone
import tinymce.models


class Migration(migrations.Migration):
initial = True

dependencies = []

operations = [
migrations.CreateModel(
name="Announcement",
fields=[
("id", models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")),
(
"title",
models.CharField(
help_text="This is not shown on the announcement but can be used as an identifier in the admin area.",
max_length=100,
),
),
("content", tinymce.models.HTMLField(max_length=500)),
("since", models.DateTimeField(default=django.utils.timezone.now)),
("until", models.DateTimeField(blank=True, null=True)),
(
"icon",
models.CharField(
default="bullhorn",
help_text="Font Awesome 6 abbreviation for icon to use.",
max_length=150,
verbose_name="Font Awesome 6 icon",
),
),
],
options={
"ordering": ("-since",),
},
),
]
19 changes: 19 additions & 0 deletions website/associations/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Generated by Django 4.2.9 on 2024-04-08 12:50

from django.db import migrations, models


class Migration(migrations.Migration):
initial = True

dependencies = []

operations = [
migrations.CreateModel(
name="Association",
fields=[
("id", models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")),
("name", models.CharField(max_length=150)),
],
),
]
115 changes: 115 additions & 0 deletions website/borrel/migrations/0001_initial.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
# Generated by Django 4.2.9 on 2024-04-08 12:50

import django.core.validators
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):
initial = True

dependencies = [
("associations", "0001_initial"),
]

operations = [
migrations.CreateModel(
name="BasicBorrelBrevet",
fields=[
("id", models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")),
("registered_on", models.DateField(auto_now_add=True)),
],
),
migrations.CreateModel(
name="BorrelReservation",
fields=[
("id", models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")),
("created_at", models.DateTimeField(auto_now_add=True)),
("updated_at", models.DateTimeField(auto_now=True)),
("submitted_at", models.DateTimeField(blank=True, null=True)),
("title", models.CharField(max_length=100)),
("start", models.DateTimeField()),
("end", models.DateTimeField(blank=True, null=True)),
("comments", models.TextField(blank=True, null=True)),
("accepted", models.BooleanField(blank=True, default=None, null=True)),
(
"join_code",
models.CharField(
blank=True, max_length=255, validators=[django.core.validators.MinLengthValidator(20)]
),
),
(
"association",
models.ForeignKey(
blank=True,
null=True,
on_delete=django.db.models.deletion.SET_NULL,
related_name="borrel_reservations",
to="associations.association",
),
),
],
options={
"ordering": ["-start", "-end", "title"],
},
),
migrations.CreateModel(
name="Product",
fields=[
("id", models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")),
("name", models.CharField(max_length=100, unique=True)),
("active", models.BooleanField(default=True)),
("description", models.TextField(blank=True, null=True)),
("price", models.DecimalField(decimal_places=2, max_digits=6)),
("can_be_reserved", models.BooleanField(default=True)),
("can_be_submitted", models.BooleanField(default=True)),
],
),
migrations.CreateModel(
name="ProductCategory",
fields=[
("id", models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")),
("name", models.CharField(max_length=100)),
],
options={
"verbose_name": "product category",
"verbose_name_plural": "product categories",
},
),
migrations.CreateModel(
name="ReservationItem",
fields=[
("id", models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name="ID")),
("product_name", models.CharField(max_length=100)),
("product_description", models.TextField(blank=True, null=True)),
("product_price_per_unit", models.DecimalField(decimal_places=2, max_digits=6)),
("amount_reserved", models.PositiveIntegerField()),
("amount_used", models.PositiveIntegerField(blank=True, null=True)),
(
"product",
models.ForeignKey(
blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to="borrel.product"
),
),
(
"reservation",
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
related_name="items",
to="borrel.borrelreservation",
),
),
],
),
migrations.AddField(
model_name="product",
name="category",
field=models.ForeignKey(
blank=True,
null=True,
on_delete=django.db.models.deletion.SET_NULL,
related_name="products",
to="borrel.productcategory",
),
),
]
82 changes: 82 additions & 0 deletions website/borrel/migrations/0002_initial.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# Generated by Django 4.2.9 on 2024-04-08 12:50

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


class Migration(migrations.Migration):
initial = True

dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
("venues", "0001_initial"),
("borrel", "0001_initial"),
]

operations = [
migrations.AddField(
model_name="borrelreservation",
name="user_created",
field=models.ForeignKey(
blank=True,
null=True,
on_delete=django.db.models.deletion.SET_NULL,
related_name="borrel_reservations_created",
to=settings.AUTH_USER_MODEL,
),
),
migrations.AddField(
model_name="borrelreservation",
name="user_submitted",
field=models.ForeignKey(
blank=True,
null=True,
on_delete=django.db.models.deletion.SET_NULL,
related_name="borrel_reservations_submitted",
to=settings.AUTH_USER_MODEL,
),
),
migrations.AddField(
model_name="borrelreservation",
name="user_updated",
field=models.ForeignKey(
blank=True,
null=True,
on_delete=django.db.models.deletion.SET_NULL,
related_name="borrel_reservations_updated",
to=settings.AUTH_USER_MODEL,
),
),
migrations.AddField(
model_name="borrelreservation",
name="users_access",
field=models.ManyToManyField(
blank=True, related_name="borrel_reservations_access", to=settings.AUTH_USER_MODEL
),
),
migrations.AddField(
model_name="borrelreservation",
name="venue_reservation",
field=models.OneToOneField(
blank=True,
null=True,
on_delete=django.db.models.deletion.SET_NULL,
related_name="borrel_reservations",
to="venues.reservation",
),
),
migrations.AddField(
model_name="basicborrelbrevet",
name="user",
field=models.OneToOneField(
on_delete=django.db.models.deletion.CASCADE,
related_name="basic_borrel_brevet",
to=settings.AUTH_USER_MODEL,
),
),
migrations.AlterUniqueTogether(
name="reservationitem",
unique_together={("reservation", "product_name")},
),
]
Loading

0 comments on commit da12b0b

Please sign in to comment.