Closed nesh170 closed 7 years ago
class Cart(models.Model):
disburser = models.ForeignKey(User, on_delete=models.CASCADE, related_name='disburser', limit_choices_to={'is_staff': True})
comment = models.TextField(null=True, blank=True)
receiver = models.ForeignKey(User, on_delete=models.CASCADE, related_name='receiver', null=True, blank=True)
timestamp = models.DateTimeField(auto_created=True)
class Disbursement(models.Model):
cart = models.ForeignKey(Cart, on_delete=models.CASCADE, related_name='disbursements')
item = models.ForeignKey(Item, on_delete=models.SET_NULL, null=True, related_name='disbursed')
quantity = models.PositiveIntegerField()
Need to have the cart metaphor assigned to one admin