snapshot: preserve trial lifecycle and product-grade expiry UX

This commit is contained in:
Md Bayazid Bostame
2026-03-26 14:43:10 +01:00
parent 8821a7943b
commit 811bcd8745
24 changed files with 1196 additions and 148 deletions

View File

@@ -98,6 +98,26 @@ class PortalCompanyConfig(models.Model):
return self.legal_company_name or self.name
class PortalTrialConfig(models.Model):
name = models.CharField(max_length=80, default='Default', unique=True)
is_trial_mode = models.BooleanField(default=False)
trial_started_at = models.DateTimeField(null=True, blank=True)
trial_expires_at = models.DateTimeField(null=True, blank=True)
restrict_production_integrations = models.BooleanField(default=True)
auto_cleanup_enabled = models.BooleanField(default=True)
trial_banner_text = models.CharField(max_length=255, blank=True, default='')
trial_banner_text_en = models.CharField(max_length=255, blank=True, default='')
last_cleanup_at = models.DateTimeField(null=True, blank=True)
updated_at = models.DateTimeField(auto_now=True)
class Meta:
verbose_name = 'Portal Trial Config'
verbose_name_plural = 'Portal Trial Config'
def __str__(self) -> str:
return self.name
class PortalAppConfig(models.Model):
SECTION_APP = 'app'
SECTION_PLATFORM = 'platform'