feat: aggregate account and transaction activity logs on space activity page

This commit is contained in:
juancwu 2026-05-03 23:56:06 +00:00
commit 9826068208
7 changed files with 135 additions and 38 deletions

View file

@ -2,15 +2,15 @@ package model
import "time"
// AccountActivityRow is a unified row representing either an account-scoped space
// audit entry or a transaction audit entry that belongs to the account. Exactly one
// of SpaceLog / TxLog is set.
type AccountActivityRow struct {
// ActivityRow is a unified row representing either a space-scoped audit entry or a
// transaction audit entry. Exactly one of SpaceLog / TxLog is set. Used by both the
// account-level and space-level activity feeds.
type ActivityRow struct {
SpaceLog *SpaceAuditLogWithActor
TxLog *TransactionAuditLogWithActor
}
func (r AccountActivityRow) Timestamp() time.Time {
func (r ActivityRow) Timestamp() time.Time {
if r.SpaceLog != nil {
return r.SpaceLog.CreatedAt
}