Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

corporate: Add minimum_licenses field to Customer model.

Lauryn Menarddeaf7344888d
diff --git a/corporate/migrations/0032_customer_minimum_licenses.py b/corporate/migrations/0032_customer_minimum_licenses.py
new file mode 100644
index 00000000000..0c765b540c3
--- /dev/null
+++ b/corporate/migrations/0032_customer_minimum_licenses.py
@@ -0,0 +1,17 @@
+# Generated by Django 4.2.8 on 2023-12-14 13:27
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+ dependencies = [
+ ("corporate", "0031_customer_flat_discount_and_more"),
+ ]
+
+ operations = [
+ migrations.AddField(
+ model_name="customer",
+ name="minimum_licenses",
+ field=models.PositiveIntegerField(null=True),
+ ),
+ ]
diff --git a/corporate/models.py b/corporate/models.py
index b0c13811904..7f933164c91 100644
--- a/corporate/models.py
+++ b/corporate/models.py
@@ -28,6 +28,7 @@ class Customer(models.Model):
sponsorship_pending = models.BooleanField(default=False)
# A percentage, like 85.
default_discount = models.DecimalField(decimal_places=4, max_digits=7, null=True)
+ minimum_licenses = models.PositiveIntegerField(null=True)
# Some non-profit organizations on manual license management pay
# only for their paid employees. We don't prevent these
# organizations from adding more users than the number of licenses