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",
),
),
],
),
]