added migrations for objects

rebuild requirements.txt
This commit is contained in:
2025-07-30 19:55:55 +03:00
parent 135da0ade1
commit 5b6e96f30e
33 changed files with 1345 additions and 39 deletions
+90
View File
@@ -0,0 +1,90 @@
# Generated by Django 5.2.3 on 2025-07-14 07:49
import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
("common", "0002_alter_companymodel_short_name_and_more"),
("containers", "0006_containerphotos"),
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.CreateModel(
name="Payment",
fields=[
(
"id",
models.BigAutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
("invoice_number", models.CharField(max_length=50, unique=True)),
("total_amount", models.DecimalField(decimal_places=2, max_digits=10)),
("created_on", models.DateTimeField(auto_now_add=True)),
("paid", models.BooleanField(default=False)),
("paid_on", models.DateTimeField(auto_now_add=True)),
("paid_info", models.TextField(blank=True, null=True)),
(
"description",
models.CharField(blank=True, max_length=255, null=True),
),
(
"company",
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
related_name="payment_company",
to="common.companymodel",
),
),
(
"created_by",
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
related_name="payments_user",
to=settings.AUTH_USER_MODEL,
),
),
],
),
migrations.CreateModel(
name="PaymentItem",
fields=[
(
"id",
models.BigAutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
("amount", models.DecimalField(decimal_places=2, max_digits=10)),
(
"container",
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
related_name="payment_containers",
to="containers.container",
),
),
(
"payment",
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
related_name="payment_items",
to="payments.payment",
),
),
],
),
]
@@ -0,0 +1,70 @@
# Generated by Django 5.2.3 on 2025-07-15 18:07
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("payments", "0001_initial"),
]
operations = [
migrations.CreateModel(
name="AdditionalFees",
fields=[
(
"id",
models.BigAutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
(
"reefer_daily_supplement",
models.DecimalField(decimal_places=2, default=3.0, max_digits=6),
),
(
"sweeping_fee",
models.DecimalField(decimal_places=2, default=35.0, max_digits=6),
),
(
"fumigation_fee",
models.DecimalField(decimal_places=2, default=75.0, max_digits=6),
),
],
options={
"verbose_name": "Additional Fees",
"verbose_name_plural": "Additional Fees",
},
),
migrations.CreateModel(
name="ContainerTariffPeriod",
fields=[
(
"id",
models.BigAutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
(
"container_size",
models.CharField(
choices=[("20", "20 feet"), ("40", "40/45 feet")], max_length=2
),
),
("from_days", models.PositiveIntegerField()),
("to_days", models.PositiveIntegerField(blank=True, null=True)),
("daily_rate", models.DecimalField(decimal_places=2, max_digits=6)),
],
options={
"ordering": ["container_size", "from_days"],
"unique_together": {("container_size", "from_days")},
},
),
]
@@ -0,0 +1,12 @@
# Generated by Django 5.2.3 on 2025-07-25 16:20
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
("payments", "0002_additionalfees_containertariffperiod"),
]
operations = []
View File