19 lines
583 B
Python
19 lines
583 B
Python
from django.utils import timezone
|
|
|
|
from django.db import models
|
|
from django_tenants.models import TenantMixin, DomainMixin
|
|
|
|
class Client(TenantMixin):
|
|
name = models.CharField(max_length=100, unique=True, db_index=True)
|
|
paid_until = models.DateField(default=timezone.now)
|
|
on_trial = models.BooleanField(default=True)
|
|
created_on = models.DateField(auto_now_add=True)
|
|
|
|
# default true, schema will be automatically created and synced when it is saved
|
|
auto_create_schema = True
|
|
|
|
def __str__(self):
|
|
return self.name
|
|
|
|
class Domain(DomainMixin):
|
|
pass |