gold eggs backend
Some checks failed
Build and Push to Docker Hub / build-test-push (push) Failing after 1m55s
Some checks failed
Build and Push to Docker Hub / build-test-push (push) Failing after 1m55s
This commit is contained in:
25
core/apps/eggs/models/additional_cost.py
Normal file
25
core/apps/eggs/models/additional_cost.py
Normal file
@@ -0,0 +1,25 @@
|
||||
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
|
||||
Reference in New Issue
Block a user