writer half almost working
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
15
hn/db.go
15
hn/db.go
@@ -6,13 +6,26 @@ import (
|
||||
"github.com/jinzhu/gorm"
|
||||
)
|
||||
|
||||
// this schema is quite redundant, i know
|
||||
|
||||
type HNFrontPage struct {
|
||||
gorm.Model
|
||||
InternalID uint64 `gorm:"primary_key;auto_increment:true`
|
||||
HNID uint // HN integer id
|
||||
Appeared time.Time
|
||||
Disappeared time.Time
|
||||
HighestRank uint // frontpage index
|
||||
Rank uint // frontpage index
|
||||
Title string // submission title
|
||||
URL string // duh
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user