Add fields related to instance deletion
This commit is contained in:
parent
26a3a4942f
commit
9a403d74f2
1 changed files with 11 additions and 1 deletions
|
@ -425,7 +425,7 @@ class ServiceInstance(ServalaModelMixin, models.Model):
|
||||||
on_delete=models.SET_NULL,
|
on_delete=models.SET_NULL,
|
||||||
null=True,
|
null=True,
|
||||||
blank=True,
|
blank=True,
|
||||||
related_name="created_service_instances",
|
related_name="+",
|
||||||
)
|
)
|
||||||
context = models.ForeignKey(
|
context = models.ForeignKey(
|
||||||
to="core.ServiceOfferingControlPlane",
|
to="core.ServiceOfferingControlPlane",
|
||||||
|
@ -433,6 +433,16 @@ class ServiceInstance(ServalaModelMixin, models.Model):
|
||||||
on_delete=models.PROTECT,
|
on_delete=models.PROTECT,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
is_deleted = models.BooleanField(default=False)
|
||||||
|
deleted_at = models.DateTimeField(null=True, blank=True)
|
||||||
|
deleted_by = models.ForeignKey(
|
||||||
|
to="core.User",
|
||||||
|
on_delete=models.SET_NULL,
|
||||||
|
null=True,
|
||||||
|
blank=True,
|
||||||
|
related_name="+",
|
||||||
|
)
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
verbose_name = _("Service instance")
|
verbose_name = _("Service instance")
|
||||||
verbose_name_plural = _("Service instances")
|
verbose_name_plural = _("Service instances")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue