Transaction, Merchant and Category object model from my personal finance mini-hackathon http://ollieglass.com/2013/01/30/personal-finance-mini-hackathon
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Category(models.Model): | |
name = models.CharField(max_length=255) | |
class Merchant(models.Model): | |
name = models.CharField(max_length=255) | |
category = models.ForeignKey(Category, blank=True, null=True, db_index=True) | |
class Transaction(models.Model): | |
transaction_date = models.DateTimeField(db_index=True) | |
posting_date = models.DateTimeField(null=True) | |
billing_amount = models.FloatField(max_length=255) | |
merchant_raw = models.CharField(max_length=255) | |
merchant = models.ForeignKey(Merchant, db_index=True) | |
merchant_town = models.CharField(max_length=255) | |
merchant_county = models.CharField(max_length=255) | |
merchant_postcode = models.CharField(max_length=255) | |
reference_number = models.CharField(max_length=255) | |
debit_credit_flag = models.CharField(max_length=255) | |
sicmcc_code = models.CharField(max_length=255) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment