mirror of
https://github.com/PostHog/posthog.git
synced 2024-12-01 04:12:23 +01:00
7546e3ea0a
* add description and tag fields to event and property definitions * set up description and tagging on models * frontend functionality for description editing * connect backend and kea logic for description editing * update event and property definitions model and migration * delete set null instead of cascade * migration merge fix * add owner column * undo posthog event property taxonomy migrations * set up definitions on enterprise level * allow enterprise definitions description editing * fix licensing conditions and add tests * proper get and update methods for the multi inheritance table and new column fields for enterprise event model * check for license to separate routes * migrate existing definitions to ee definitions tables and render ee vs non-ee definition views based on existing feature conditional * all the working backend updates * updated tests * frontend fixes and linting updates * feature flag it
13 lines
676 B
Python
13 lines
676 B
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.CharField = models.CharField(max_length=400, blank=True)
|
|
tags: ArrayField = ArrayField(models.CharField(max_length=32), null=True, blank=True, default=list)
|
|
updated_at: models.DateTimeField = models.DateTimeField(auto_now=True)
|
|
updated_by = models.ForeignKey("posthog.User", null=True, on_delete=models.SET_NULL, blank=True)
|