From 9e779891fa91f44a9734b79ccb4f6aef48a0de3f Mon Sep 17 00:00:00 2001 From: Leonardo Bishop Date: Thu, 18 Sep 2025 21:00:28 +0100 Subject: Add filters on html page --- pkg/entries/model.go | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 pkg/entries/model.go (limited to 'pkg/entries/model.go') diff --git a/pkg/entries/model.go b/pkg/entries/model.go new file mode 100644 index 0000000..9ddcd20 --- /dev/null +++ b/pkg/entries/model.go @@ -0,0 +1,30 @@ +package entries + +import "git.leonardobishop.net/stash/pkg/database/sqlc" + +type EntryRow struct { + Title string `json:"title"` + Url string `json:"url"` + Description string `json:"description"` + Timestamp string `json:"timestamp"` + KindName string `json:"kind_name"` + KindEmoji string `json:"kind_emoji"` +} + +func (dst *EntryRow) ScanGetEntriesByKindRow(src sqlc.GetEntriesByKindRow) { + dst.Title = src.Title + dst.Url = src.Url + dst.Description = src.Description + dst.Timestamp = src.Timestamp + dst.KindName = src.KindName + dst.KindEmoji = src.KindEmoji +} + +func (dst *EntryRow) ScanGetEntriesRow(src sqlc.GetEntriesRow) { + dst.Title = src.Title + dst.Url = src.Url + dst.Description = src.Description + dst.Timestamp = src.Timestamp + dst.KindName = src.KindName + dst.KindEmoji = src.KindEmoji +} -- cgit v1.2.3-70-g09d2