From 56fbea1b6ba70fd5c1181e2d057ed91988906715 Mon Sep 17 00:00:00 2001 From: Evan Chen Date: Thu, 16 Dec 2021 23:59:16 +0800 Subject: [PATCH] feat: add history helper --- history/helper.go | 4 ++++ history/history.go | 1 + 2 files changed, 5 insertions(+) diff --git a/history/helper.go b/history/helper.go index da97d2a..d4a517b 100644 --- a/history/helper.go +++ b/history/helper.go @@ -38,3 +38,7 @@ func (h *History) Iss(issuer string) *History { h.Issuer = issuer return h } +func (h *History) Grp(grp string) *History { + h.Group = grp + return h +} diff --git a/history/history.go b/history/history.go index 12205e8..7f5797c 100644 --- a/history/history.go +++ b/history/history.go @@ -29,6 +29,7 @@ type History struct { Message string Body interface{} `gorm:"-"` Issuer string + Group string BodyJson string }