mirror of
https://github.com/eitchtee/WYGIWYH.git
synced 2026-07-11 07:12:57 +02:00
feat: multi tenancy support
This commit is contained in:
@@ -2,8 +2,10 @@ from django.db import models
|
||||
from django.db.models import Q
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
from apps.common.models import SharedObject, SharedObjectManager
|
||||
|
||||
class TransactionRule(models.Model):
|
||||
|
||||
class TransactionRule(SharedObject):
|
||||
active = models.BooleanField(default=True)
|
||||
on_update = models.BooleanField(default=False)
|
||||
on_create = models.BooleanField(default=True)
|
||||
@@ -11,6 +13,9 @@ class TransactionRule(models.Model):
|
||||
description = models.TextField(blank=True, null=True, verbose_name=_("Description"))
|
||||
trigger = models.TextField(verbose_name=_("Trigger"))
|
||||
|
||||
objects = SharedObjectManager()
|
||||
all_objects = models.Manager() # Unfiltered manager
|
||||
|
||||
class Meta:
|
||||
verbose_name = _("Transaction rule")
|
||||
verbose_name_plural = _("Transaction rules")
|
||||
|
||||
Reference in New Issue
Block a user