0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-11-24 09:14:46 +01:00
posthog/ee/models/property_definition.py
Li Yi Yu 7546e3ea0a
Event properties taxonomy (#4486)
* 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
2021-06-03 09:22:16 -04:00

12 lines
569 B
Python

from django.contrib.postgres.fields import ArrayField
from django.db import models
from posthog.models.property_definition import PropertyDefinition
class EnterprisePropertyDefinition(PropertyDefinition):
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)