zilencer: Make plan types less weird.

This commit is contained in:
Tim Abbott
2023-11-17 12:03:58 -08:00
parent c86ad857ac
commit c5940bd68f
2 changed files with 13 additions and 5 deletions

View File

@@ -48,7 +48,9 @@ class RemoteZulipServer(models.Model):
# Plan types for self-hosted customers
PLAN_TYPE_SELF_HOSTED = 1
PLAN_TYPE_STANDARD = 102
PLAN_TYPE_COMMUNITY = 100
PLAN_TYPE_BUSINESS = 101
PLAN_TYPE_ENTERPRISE = 102
# The current billing plan for the remote server, similar to Realm.plan_type.
plan_type = models.PositiveSmallIntegerField(default=PLAN_TYPE_SELF_HOSTED)
@@ -113,11 +115,17 @@ class RemoteRealm(models.Model):
# Plan types for self-hosted customers
PLAN_TYPE_SELF_HOSTED = 1
PLAN_TYPE_STANDARD = 102
PLAN_TYPE_COMMUNITY = 100
PLAN_TYPE_BUSINESS = 101
PLAN_TYPE_ENTERPRISE = 102
# The current billing plan for the remote server, similar to Realm.plan_type.
plan_type = models.PositiveSmallIntegerField(default=PLAN_TYPE_SELF_HOSTED, db_index=True)
@override
def __str__(self) -> str:
return f"{self.host} {str(self.uuid)[0:12]}"
class RemoteZulipServerAuditLog(AbstractRealmAuditLog):
"""Audit data associated with a remote Zulip server (not specific to a