mirror of
https://github.com/hanzoai/insights.git
synced 2026-11-02 09:24:48 +00:00
Mechanically re-derived: bin/debrand runs over a fresh import of posthog/posthog@fa1a9a60d4 (2026-08-06). The pipeline (.hanzo/workflows), the Dockerfiles and bin/docker* entrypoints, compose files, LLM.md and the squashed initial migration are restored from the shipped tree, same as the previous import. The prune's import-closure guard kept 21 products the new core now imports; dropping them is a refactor now, recorded rather than forced.
15 lines
555 B
Python
15 lines
555 B
Python
"""
|
|
Django models for apm.
|
|
|
|
Keep models thin — business logic belongs in logic/.
|
|
Use types from facade/enums.py where applicable.
|
|
Avoid ForeignKeys to models outside this app; if needed,
|
|
disallow reverse relations with related_name='+'.
|
|
|
|
Models must inherit TeamScopedRootMixin to opt into fail-closed team
|
|
scoping — queries without team context raise TeamScopeError instead of
|
|
silently returning every team's rows. Main-DB products add
|
|
`team = models.ForeignKey("insights.Team", on_delete=models.CASCADE)`.
|
|
See insights/models/scoping/README.md.
|
|
"""
|