progress
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
2020-03-24 17:49:19 -07:00
parent fa62cf4bd0
commit c61227293e
17 changed files with 364 additions and 129 deletions

29
hn/db.go Normal file
View File

@@ -0,0 +1,29 @@
package hn
import (
"time"
"github.com/jinzhu/gorm"
)
type HNStoryRank struct {
gorm.Model
InternalStoryID uint64 `gorm:"primary_key;auto_increment:true`
HNID uint // HN integer id
Title string // submission title
URL string // duh
FetchID uint // integer identifying fetch batch
Rank uint // frontpage index
FetchedAt time.Time // identical within fetchid
}
type FrontPageCache struct {
gorm.Model
CacheID uint64 `gorm:"primary_key;auto_increment:true`
HNID uint
HighestRankReached uint
URL string
Title string
Appeared time.Time
Disappeared time.Time
}