change structure of provider companies to organizations
This commit is contained in:
@@ -41,8 +41,8 @@ class Device(BaseModel):
|
||||
latitude = models.FloatField(default=0)
|
||||
longitude = models.FloatField(default=0)
|
||||
is_activated = models.BooleanField(default=False)
|
||||
company = models.ForeignKey(
|
||||
ProviderCompany,
|
||||
organization = models.ForeignKey(
|
||||
Organization,
|
||||
on_delete=models.CASCADE,
|
||||
related_name='devices',
|
||||
null=True
|
||||
@@ -73,10 +73,10 @@ class DeviceActivationCode(BaseModel):
|
||||
related_name="code",
|
||||
null=True
|
||||
)
|
||||
company = models.ForeignKey(
|
||||
ProviderCompany,
|
||||
organization = models.ForeignKey(
|
||||
Organization,
|
||||
on_delete=models.CASCADE,
|
||||
related_name='code',
|
||||
related_name='device_activations',
|
||||
null=True
|
||||
)
|
||||
code = models.CharField(max_length=10, null=True, unique=True)
|
||||
@@ -97,10 +97,10 @@ class DeviceVersion(BaseModel):
|
||||
related_name='devices_version',
|
||||
null=True
|
||||
)
|
||||
company = models.ForeignKey(
|
||||
ProviderCompany,
|
||||
organization = models.ForeignKey(
|
||||
Organization,
|
||||
on_delete=models.CASCADE,
|
||||
related_name='devices_company',
|
||||
related_name='device_versions',
|
||||
null=True
|
||||
)
|
||||
name = models.CharField(max_length=250, null=True)
|
||||
@@ -210,10 +210,10 @@ class POSClientAttributeValue(BaseModel):
|
||||
|
||||
|
||||
class DeviceAssignment(BaseModel):
|
||||
company = models.ForeignKey(
|
||||
ProviderCompany,
|
||||
organization = models.ForeignKey(
|
||||
Organization,
|
||||
on_delete=models.CASCADE,
|
||||
related_name='assignments',
|
||||
related_name='device_assignments',
|
||||
null=True
|
||||
)
|
||||
client = models.ForeignKey(
|
||||
|
||||
Reference in New Issue
Block a user