made bucket balance a float because the system may fill the bucket in fractional...
smbaker [Fri, 1 Mar 2013 17:41:04 +0000 (09:41 -0800)]
apps/billingsystem/billing/models.py
apps/billingsystem/datamodel.png

index 97ef6dd..bf24a1a 100644 (file)
@@ -44,7 +44,7 @@ class Account(models.Model):
 class Bucket(models.Model):
     account = models.ForeignKey(Account)
     resource = models.ForeignKey(Resource)
-    balance = models.IntegerField(default=0)
+    balance = models.FloatField(default=0.0)
     lastInTime = models.DateTimeField(blank=True, null=True)
     def __unicode__(self):
         return unicode(self.pk)
index 123e4f5..7c63d48 100644 (file)
Binary files a/apps/billingsystem/datamodel.png and b/apps/billingsystem/datamodel.png differ