feat: transaction activity audit and account activity audit

This commit is contained in:
juancwu 2026-05-03 23:50:39 +00:00
commit c96595d41e
19 changed files with 1259 additions and 20 deletions

View file

@ -0,0 +1,18 @@
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 {
SpaceLog *SpaceAuditLogWithActor
TxLog *TransactionAuditLogWithActor
}
func (r AccountActivityRow) Timestamp() time.Time {
if r.SpaceLog != nil {
return r.SpaceLog.CreatedAt
}
return r.TxLog.CreatedAt
}