feat: aggregate account and transaction activity logs on space activity page
This commit is contained in:
parent
c96595d41e
commit
9826068208
7 changed files with 135 additions and 38 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue