Design internal event object shape (type, txid, principal, amount, timestamp, metadata) and DB schema for storing events.