Files
eggs-backend/core/apps/eggs/models/additional_cost.py
husanjon ab73d05ecc
Some checks failed
Build and Push to Docker Hub / build-test-push (push) Failing after 1m55s
gold eggs backend
2026-04-15 08:59:36 +02:00

26 lines
741 B
Python

from django.db import models
from django.utils.translation import gettext_lazy as _
from core.http.models import User
class AdditionalCost(models.Model):
user = models.ForeignKey(
to=User,
verbose_name=_("User"),
on_delete=models.CASCADE,
null=True,
blank=True,
)
reason = models.TextField(_("Name"))
price = models.DecimalField(_("Price"), max_digits=10, decimal_places=2)
created_at = models.DateTimeField(_("Created at"), auto_now_add=True)
updated_at = models.DateTimeField(_("Updated at"), auto_now=True)
class Meta:
verbose_name = _("Additional cost")
verbose_name_plural = _("Additional costs")
def __str__(self):
return self.reason