You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

11 lines
417 B

from django.db import models
from locations_api.models import Location
from contacts_api.models import Contact
# Create your models here.
class Company(models.Model):
name = models.CharField(max_length=32)
industry = models.CharField(max_length=32)
headquarters = models.ForeignKey(Location, related_name='companies', null=True, on_delete=models.SET_NULL)
employees = models.ManyToManyField(Contact)