bornhack-website/src/economy/migrations/0011_pos_posreport.py

289 lines
12 KiB
Python

# Generated by Django 3.1 on 2020-08-10 23:41
import uuid
import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
("teams", "0052_team_permission_set"),
("economy", "0010_auto_20190330_1045"),
]
operations = [
migrations.CreateModel(
name="Pos",
fields=[
(
"uuid",
models.UUIDField(
default=uuid.uuid4,
editable=False,
primary_key=True,
serialize=False,
),
),
("created", models.DateTimeField(auto_now_add=True)),
("updated", models.DateTimeField(auto_now=True)),
(
"name",
models.CharField(
help_text="The point-of-sale name", max_length=255
),
),
(
"slug",
models.SlugField(
blank=True,
help_text="Url slug for this POS. Leave blank to generate based on POS name.",
max_length=255,
),
),
(
"team",
models.ForeignKey(
help_text="The Team managning this POS",
on_delete=django.db.models.deletion.PROTECT,
to="teams.team",
),
),
],
options={
"ordering": ["name"],
},
),
migrations.CreateModel(
name="PosReport",
fields=[
(
"uuid",
models.UUIDField(
default=uuid.uuid4,
editable=False,
primary_key=True,
serialize=False,
),
),
("created", models.DateTimeField(auto_now_add=True)),
("updated", models.DateTimeField(auto_now=True)),
(
"date",
models.DateField(
help_text="The date this report covers (pick the starting date if opening hours cross midnight)."
),
),
(
"pos_json",
models.JSONField(
blank=True,
help_text="The JSON exported from the external POS system",
null=True,
),
),
(
"bank_count_dkk_start",
models.PositiveIntegerField(
default=0,
help_text="The number of DKK handed out from the bank to the POS at the start of the business day (counted by the bank responsible)",
),
),
(
"bank_count_hax5_start",
models.PositiveIntegerField(
default=0,
help_text="The number of 5 HAX coins handed out from the bank to the POS at the start of the business day (counted by the bank responsible)",
),
),
(
"bank_count_hax10_start",
models.PositiveIntegerField(
default=0,
help_text="The number of 10 HAX coins handed out from the bank to the POS at the start of the business day (counted by the bank responsible)",
),
),
(
"bank_count_hax20_start",
models.PositiveIntegerField(
default=0,
help_text="The number of 20 HAX coins handed out from the bank to the POS at the start of the business day (counted by the bank responsible)",
),
),
(
"bank_count_hax50_start",
models.PositiveIntegerField(
default=0,
help_text="The number of 50 HAX coins handed out from the bank to the POS at the start of the business day (counted by the bank responsible)",
),
),
(
"bank_count_hax100_start",
models.PositiveIntegerField(
default=0,
help_text="The number of 100 HAX coins handed out from the bank to the POS at the start of the business day (counted by the bank responsible)",
),
),
(
"pos_count_dkk_start",
models.PositiveIntegerField(
default=0,
help_text="The number of DKK handed out from the bank to the POS at the start of the business day (counted by the POS responsible)",
),
),
(
"pos_count_hax5_start",
models.PositiveIntegerField(
default=0,
help_text="The number of 5 HAX coins received by the POS from the bank at the start of the business day (counted by the POS responsible)",
),
),
(
"pos_count_hax10_start",
models.PositiveIntegerField(
default=0,
help_text="The number of 10 HAX coins received by the POS from the bank at the start of the business day (counted by the POS responsible)",
),
),
(
"pos_count_hax20_start",
models.PositiveIntegerField(
default=0,
help_text="The number of 20 HAX coins received by the POS from the bank at the start of the business day (counted by the POS responsible)",
),
),
(
"pos_count_hax50_start",
models.PositiveIntegerField(
default=0,
help_text="The number of 50 HAX coins received by the POS from the bank at the start of the business day (counted by the POS responsible)",
),
),
(
"pos_count_hax100_start",
models.PositiveIntegerField(
default=0,
help_text="The number of 100 HAX coins received by the POS from the bank at the start of the business day (counted by the POS responsible)",
),
),
(
"bank_count_dkk_end",
models.PositiveIntegerField(
default=0,
help_text="The number of DKK handed back from the POS to the bank at the end of the business day (counted by the bank responsible)",
),
),
(
"bank_count_hax5_end",
models.PositiveIntegerField(
default=0,
help_text="The number of 5 HAX coins handed back from the POS to the bank at the end of the business day (counted by the bank responsible)",
),
),
(
"bank_count_hax10_end",
models.PositiveIntegerField(
default=0,
help_text="The number of 10 HAX coins handed back from the POS to the bank at the end of the business day (counted by the bank responsible)",
),
),
(
"bank_count_hax20_end",
models.PositiveIntegerField(
default=0,
help_text="The number of 20 HAX coins handed back from the POS to the bank at the end of the business day (counted by the bank responsible)",
),
),
(
"bank_count_hax50_end",
models.PositiveIntegerField(
default=0,
help_text="The number of 50 HAX coins handed back from the POS to the bank at the end of the business day (counted by the bank responsible)",
),
),
(
"bank_count_hax100_end",
models.PositiveIntegerField(
default=0,
help_text="The number of 100 HAX coins handed back from the POS to the bank at the end of the business day (counted by the bank responsible)",
),
),
(
"pos_count_dkk_end",
models.PositiveIntegerField(
default=0,
help_text="The number of DKK handed back from the POS to the bank at the end of the business day (counted by the POS responsible)",
),
),
(
"pos_count_hax5_end",
models.PositiveIntegerField(
default=0,
help_text="The number of 5 HAX coins received by the bank from the POS at the end of the business day (counted by the POS responsible)",
),
),
(
"pos_count_hax10_end",
models.PositiveIntegerField(
default=0,
help_text="The number of 10 HAX coins received by the bank from the POS at the end of the business day (counted by the POS responsible)",
),
),
(
"pos_count_hax20_end",
models.PositiveIntegerField(
default=0,
help_text="The number of 20 HAX coins received by the bank from the POS at the end of the business day (counted by the POS responsible)",
),
),
(
"pos_count_hax50_end",
models.PositiveIntegerField(
default=0,
help_text="The number of 50 HAX coins received by the bank from the POS at the end of the business day (counted by the POS responsible)",
),
),
(
"pos_count_hax100_end",
models.PositiveIntegerField(
default=0,
help_text="The number of 100 HAX coins received by the bank from the POS at the end of the business day (counted by the POS responsible)",
),
),
(
"bank_responsible",
models.ForeignKey(
help_text="The banker responsible for this PosReport",
on_delete=django.db.models.deletion.PROTECT,
related_name="pos_reports_banker",
to=settings.AUTH_USER_MODEL,
),
),
(
"pos",
models.ForeignKey(
help_text="The Pos this PosReport belongs to.",
on_delete=django.db.models.deletion.PROTECT,
related_name="pos_reports",
to="economy.pos",
),
),
(
"pos_responsible",
models.ForeignKey(
help_text="The POS person responsible for this PosReport",
on_delete=django.db.models.deletion.PROTECT,
related_name="pos_reports_poser",
to=settings.AUTH_USER_MODEL,
),
),
],
options={
"abstract": False,
},
),
]