import - sync_livestock/herd_rancher_sync/purchase_policy & service_area in organization

This commit is contained in:
2025-12-30 11:54:09 +03:30
parent fe68b2db78
commit b94484eaaf
11 changed files with 982 additions and 29 deletions

View File

@@ -147,6 +147,16 @@ class Organization(BaseModel):
has_pos = models.BooleanField(default=False)
additional_data = models.JSONField(default=dict)
service_area = models.ManyToManyField(City, related_name='service_area')
PURCHASE_POLICIES = (
('INTERNAL_ONLY', 'Internal Only'),
('CROSS_COOP', 'Cross Cooperative Allowed'),
)
purchase_policy = models.CharField(
max_length=20,
choices=PURCHASE_POLICIES,
default='INTERNAL_ONLY',
help_text='defines where ranchers can purchase from'
)
def __str__(self):
return f'{self.name}-{self.type}'