summaryrefslogtreecommitdiff
path: root/content/item.go
blob: 79d0197a7130b74ef68074d3a53467b0c1eed174 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
package content

// Item should only be embedded into content type structs.
type Item struct {
	ID        int    `json:"id"`
	Slug      string `json:"slug"`
	Timestamp int64  `json:"timestamp"`
	Updated   int64  `json:"updated"`
}

// Time partially implements the Sortable interface
func (i Item) Time() int64 {
	return i.Timestamp
}

// ContentID partially implements the Sortable interface
func (i Item) ContentID() int {
	return i.ID
}