mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-15 11:35:41 +00:00
Add 'Contact' model to Company app
This commit is contained in:
@ -65,3 +65,17 @@ class Company(models.Model):
|
||||
@property
|
||||
def has_parts(self):
|
||||
return self.part_count > 0
|
||||
|
||||
|
||||
class Contact(models.Model):
|
||||
|
||||
name = models.CharField(max_length=100)
|
||||
|
||||
phone = models.CharField(max_length=100, blank=True)
|
||||
|
||||
email = models.EmailField(blank=True)
|
||||
|
||||
role = models.CharField(max_length=100, blank=True)
|
||||
|
||||
company = models.ForeignKey(Company, related_name='contacts',
|
||||
on_delete = models.CASCADE)
|
||||
|
Reference in New Issue
Block a user