feat: transaction activity audit and account activity audit
This commit is contained in:
parent
ca7b2ff74f
commit
c96595d41e
19 changed files with 1259 additions and 20 deletions
18
internal/model/account_activity.go
Normal file
18
internal/model/account_activity.go
Normal 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
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue