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:
23
core/apps/eggs/models/invoice.py
Normal file
23
core/apps/eggs/models/invoice.py
Normal file
@@ -0,0 +1,23 @@
|
||||
"""
|
||||
Invoice model
|
||||
"""
|
||||
|
||||
from django.db import models
|
||||
|
||||
from core.apps.eggs.models import party
|
||||
|
||||
|
||||
class Invoice(models.Model):
|
||||
name = models.CharField(max_length=256)
|
||||
price = models.DecimalField(max_digits=30, decimal_places=2)
|
||||
party_id = models.ForeignKey(
|
||||
to=party.Party, on_delete=models.CASCADE, related_name="invoices"
|
||||
)
|
||||
|
||||
def __str__(self) -> str:
|
||||
return f"{self.name}, {self.price}"
|
||||
|
||||
class Meta:
|
||||
verbose_name = "Invoice"
|
||||
verbose_name_plural = "Invoices"
|
||||
db_table = "invoice"
|
||||
Reference in New Issue
Block a user