mirror of
https://github.com/PostHog/posthog.git
synced 2024-11-22 08:40:03 +01:00
34d0da70d9
Also remove type annotations for Django fields, due to updates to the stubs and possibly to mypy they are actively unhelpful now.
36 lines
1.2 KiB
Python
36 lines
1.2 KiB
Python
from django.contrib.postgres.fields import ArrayField
|
|
from django.db import models
|
|
|
|
from posthog.models.event_definition import EventDefinition
|
|
|
|
|
|
class EnterpriseEventDefinition(EventDefinition):
|
|
owner = models.ForeignKey(
|
|
"posthog.User",
|
|
null=True,
|
|
on_delete=models.SET_NULL,
|
|
related_name="event_definitions",
|
|
)
|
|
description = models.TextField(blank=True, null=True, default="")
|
|
updated_at = models.DateTimeField(auto_now=True)
|
|
updated_by = models.ForeignKey("posthog.User", null=True, on_delete=models.SET_NULL, blank=True)
|
|
verified = models.BooleanField(default=False, blank=True)
|
|
verified_at = models.DateTimeField(null=True, blank=True)
|
|
verified_by = models.ForeignKey(
|
|
"posthog.User",
|
|
null=True,
|
|
on_delete=models.SET_NULL,
|
|
blank=True,
|
|
related_name="verifying_user",
|
|
)
|
|
|
|
# Deprecated in favour of app-wide tagging model. See EnterpriseTaggedItem
|
|
deprecated_tags: ArrayField = ArrayField(models.CharField(max_length=32), null=True, blank=True, default=list)
|
|
deprecated_tags_v2: ArrayField = ArrayField(
|
|
models.CharField(max_length=32),
|
|
null=True,
|
|
blank=True,
|
|
default=None,
|
|
db_column="tags",
|
|
)
|