feat(activity): per-tenant audit feed in notification dropdown

activity_events records booking lifecycle transitions with the actor
behind each change — staff (dashboard), customer (self-service), or
system (auto-promotion). The notification dropdown leads with the real
feed instead of derived recent-booking guesses.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
Tomas DvorakandDevin committed 2026-09-18 16:06:13 +02:00
1 parent e5cb9bd543
commit d86cba61e3
18 files changed
+634 -28

No files matched your search

+17
View File
@@ -539,6 +539,23 @@ type CancelBookingRequest struct {
Reason string `json:"reason,omitempty"`
}
// ActivityEvent is a per-tenant audit entry: who changed what. ActorKind is
// staff | customer | system; Action is a dotted verb like booking.created.
type ActivityEvent struct {
ID string `json:"id"`
ActorKind string `json:"actorKind"`
ActorName string `json:"actorName,omitempty"`
Action string `json:"action"`
EntityType string `json:"entityType"`
EntityID string `json:"entityId,omitempty"`
Summary string `json:"summary"`
CreatedAt time.Time `json:"createdAt"`
}
type ActivityFeedResponse struct {
Events []ActivityEvent `json:"events"`
}
// ============================================
// ADMIN MODELS
// ============================================