summaryrefslogtreecommitdiffstats
path: root/pkg/entries/model.go
blob: 9ddcd20a40aa595fbf34e2eb3a7abd1ae1964159 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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
}