models: Add org_type to RemoteZulipServer.

This is required to save sponsorship data for remote servers.
This commit is contained in:
Aman Agrawal
2023-11-29 09:38:09 +00:00
committed by Tim Abbott
parent 405c28252a
commit 2795f11e3f
2 changed files with 40 additions and 0 deletions

View File

@@ -58,6 +58,12 @@ class RemoteZulipServer(models.Model):
# The current billing plan for the remote server, similar to Realm.plan_type.
plan_type = models.PositiveSmallIntegerField(default=PLAN_TYPE_SELF_HOSTED)
# This is not synced with the remote server, but only filled for sponsorship requests.
org_type = models.PositiveSmallIntegerField(
default=Realm.ORG_TYPES["unspecified"]["id"],
choices=[(t["id"], t["name"]) for t in Realm.ORG_TYPES.values()],
)
@override
def __str__(self) -> str:
return f"{self.hostname} {str(self.uuid)[0:12]}"