diff options
| -rw-r--r-- | app/dispatch/models.py | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/app/dispatch/models.py b/app/dispatch/models.py index 4e3a855..440804e 100644 --- a/app/dispatch/models.py +++ b/app/dispatch/models.py @@ -9,21 +9,11 @@ class Company(models.Model): address = models.CharField(max_length=256) phone_number = models.DecimalField(max_digits=16,decimal_places=0) email_address = models.CharField(max_length=256) - primary_contact = models.ForeignKey('Contact', blank=True, null=True) + contact_name = models.CharField(max_length=256) def __str__(self): return self.name -class Contact(models.Model): - first_name = models.CharField(max_length=64) - last_name = models.CharField(max_length=64) - phone_number = models.DecimalField(max_digits=16,decimal_places=0) - email_address = models.CharField(max_length=256) - works_for = models.ForeignKey(Company) - - def __str__(self): - return "{f} {l} ( {c} )".format(c=self.works_for, f=self.first_name, l=self.last_name) - class Load(models.Model): load_number = models.CharField(max_length=64,default="") date = models.DateField() @@ -47,5 +37,4 @@ class Load(models.Model): auditlog.register(Company) -auditlog.register(Contact) -auditlog.register(Load)
\ No newline at end of file +auditlog.register(Load) |
