aviary in bird model
This commit is contained in:
parent
6af0a15f9e
commit
96dc7ed688
6 changed files with 381 additions and 6 deletions
|
@ -3,6 +3,8 @@ from uuid import uuid4
|
|||
from django.conf import settings
|
||||
from django.db import models
|
||||
|
||||
from djmoney.models.fields import MoneyField
|
||||
|
||||
from rescuer.models import Rescuer
|
||||
from aviary.models import Aviary
|
||||
|
||||
|
@ -14,8 +16,12 @@ class FallenBird(models.Model):
|
|||
place = models.CharField(max_length=256)
|
||||
created = models.DateTimeField(auto_now_add=True)
|
||||
updated = models.DateTimeField(auto_now=True)
|
||||
diagnostic_finding = models.CharField(max_length=256)
|
||||
cost_sum = MoneyField( max_digits=4, decimal_places=2,
|
||||
default_currency='EUR')
|
||||
rescuer = models.ForeignKey(Rescuer, on_delete=models.CASCADE)
|
||||
user = models.ForeignKey(settings.AUTH_USER_MODEL, on_delete=models.CASCADE)
|
||||
user = models.ForeignKey( settings.AUTH_USER_MODEL,
|
||||
on_delete=models.CASCADE)
|
||||
aviary = models.ForeignKey(Aviary, on_delete=models.CASCADE)
|
||||
|
||||
def __str__(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue