mirror of
https://github.com/Dvorinka/Bookra.git
synced 2026-10-28 07:41:16 +00:00
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:
1 parent
e5cb9bd543
commit
d86cba61e3
18 files changed
+634
-28
No files matched your search
@@ -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
|
||||
// ============================================
|
||||
|
||||
Reference in new issue
Block a user