Sith/counter/migrations/0002_auto_20160826_1342.py

109 lines
3.7 KiB
Python
Raw Permalink Normal View History

from __future__ import unicode_literals
2024-06-24 11:07:36 +00:00
import django.db.models.deletion
from django.conf import settings
2024-06-24 11:07:36 +00:00
from django.db import migrations, models
import accounting.models
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
2018-10-04 19:29:19 +00:00
("counter", "0001_initial"),
]
operations = [
migrations.CreateModel(
2018-10-04 19:29:19 +00:00
name="CashRegisterSummary",
fields=[
2018-10-04 19:29:19 +00:00
(
"id",
models.AutoField(
verbose_name="ID",
primary_key=True,
serialize=False,
auto_created=True,
),
),
("date", models.DateTimeField(verbose_name="date")),
(
"comment",
models.TextField(null=True, verbose_name="comment", blank=True),
),
("emptied", models.BooleanField(default=False, verbose_name="emptied")),
(
"counter",
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
2018-10-04 19:29:19 +00:00
to="counter.Counter",
related_name="cash_summaries",
verbose_name="counter",
),
),
(
"user",
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
2018-10-04 19:29:19 +00:00
to=settings.AUTH_USER_MODEL,
related_name="cash_summaries",
verbose_name="user",
),
),
],
2018-10-04 19:29:19 +00:00
options={"verbose_name": "cash register summary"},
),
migrations.CreateModel(
2018-10-04 19:29:19 +00:00
name="CashRegisterSummaryItem",
fields=[
2018-10-04 19:29:19 +00:00
(
"id",
models.AutoField(
verbose_name="ID",
primary_key=True,
serialize=False,
auto_created=True,
),
),
(
"value",
accounting.models.CurrencyField(
max_digits=12, verbose_name="value", decimal_places=2
),
),
("quantity", models.IntegerField(default=0, verbose_name="quantity")),
("check", models.BooleanField(default=False, verbose_name="check")),
(
"cash_summary",
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
2018-10-04 19:29:19 +00:00
to="counter.CashRegisterSummary",
related_name="items",
verbose_name="cash summary",
),
),
],
2018-10-04 19:29:19 +00:00
options={"verbose_name": "cash register summary item"},
),
migrations.AlterField(
2018-10-04 19:29:19 +00:00
model_name="permanency",
name="counter",
field=models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
2018-10-04 19:29:19 +00:00
to="counter.Counter",
related_name="permanencies",
verbose_name="counter",
),
),
migrations.AlterField(
2018-10-04 19:29:19 +00:00
model_name="permanency",
name="user",
field=models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
2018-10-04 19:29:19 +00:00
to=settings.AUTH_USER_MODEL,
related_name="permanencies",
verbose_name="user",
),
),
]