from django db import models class Payer models Model name models Char

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
from django.db import models
class Payer(models.Model):
name = models.CharField(max_length = 400)
class Payment(models.Model):
date = models.DateField()
payer = models.ForeignKey('Payer')
tax = models.ForeignKey('Tax')
amount = models.IntegerField()
class TaxCategory(models.Model):
name = models.CharField(max_length = 70)
class Tax(models.Model):
category = models.ForeignKey('TaxCategory')
code = models.CharField(max_length = 25)
desc = models.CharField(max_length = 400)