2019-02-09 12:30:49 +00:00
|
|
|
package models
|
|
|
|
|
|
|
|
import (
|
|
|
|
"database/sql"
|
|
|
|
)
|
|
|
|
|
|
|
|
type ScrapedItem struct {
|
|
|
|
ID int `db:"id" json:"id"`
|
|
|
|
Title sql.NullString `db:"title" json:"title"`
|
|
|
|
Description sql.NullString `db:"description" json:"description"`
|
2019-02-14 22:53:32 +00:00
|
|
|
URL sql.NullString `db:"url" json:"url"`
|
2019-03-05 01:14:52 +00:00
|
|
|
Date SQLiteDate `db:"date" json:"date"`
|
2019-02-09 12:30:49 +00:00
|
|
|
Rating sql.NullString `db:"rating" json:"rating"`
|
|
|
|
Tags sql.NullString `db:"tags" json:"tags"`
|
|
|
|
Models sql.NullString `db:"models" json:"models"`
|
|
|
|
Episode sql.NullInt64 `db:"episode" json:"episode"`
|
|
|
|
GalleryFilename sql.NullString `db:"gallery_filename" json:"gallery_filename"`
|
2019-02-14 22:53:32 +00:00
|
|
|
GalleryURL sql.NullString `db:"gallery_url" json:"gallery_url"`
|
2019-02-09 12:30:49 +00:00
|
|
|
VideoFilename sql.NullString `db:"video_filename" json:"video_filename"`
|
2019-02-14 22:53:32 +00:00
|
|
|
VideoURL sql.NullString `db:"video_url" json:"video_url"`
|
2019-02-09 12:30:49 +00:00
|
|
|
StudioID sql.NullInt64 `db:"studio_id,omitempty" json:"studio_id"`
|
|
|
|
CreatedAt SQLiteTimestamp `db:"created_at" json:"created_at"`
|
|
|
|
UpdatedAt SQLiteTimestamp `db:"updated_at" json:"updated_at"`
|
|
|
|
}
|
2019-12-21 00:13:23 +00:00
|
|
|
|
2021-01-18 01:23:20 +00:00
|
|
|
type ScrapedItems []*ScrapedItem
|
|
|
|
|
|
|
|
func (s *ScrapedItems) Append(o interface{}) {
|
|
|
|
*s = append(*s, o.(*ScrapedItem))
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *ScrapedItems) New() interface{} {
|
|
|
|
return &ScrapedItem{}
|
|
|
|
}
|