orangesite/hn/db.go
sneak c61227293e
Some checks failed
continuous-integration/drone/push Build is failing
progress
2020-03-24 17:49:19 -07:00

30 lines
729 B
Go

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
}