1
0
mirror of https://github.com/mxpv/podsync.git synced 2024-05-11 05:55:04 +00:00

61 lines
1.8 KiB
Go
Raw Normal View History

2017-11-02 21:41:52 -07:00
package model
2017-10-26 14:36:52 -07:00
2017-11-03 15:41:26 -07:00
import (
"time"
2018-11-24 11:58:08 -08:00
"github.com/mxpv/podsync/pkg/api"
2017-11-03 15:41:26 -07:00
)
2017-10-26 14:36:52 -07:00
//noinspection SpellCheckingInspection
2017-10-26 14:36:52 -07:00
type Pledge struct {
PledgeID int64 `sql:",pk"`
PatronID int64
CreatedAt time.Time `dynamodbav:",unixtime"`
DeclinedSince time.Time `dynamodbav:",unixtime"`
2017-10-26 14:36:52 -07:00
AmountCents int
TotalHistoricalAmountCents int
OutstandingPaymentAmountCents int
IsPaused bool
}
2017-11-03 15:41:26 -07:00
type Item struct {
ID string
Title string
Description string
Thumbnail string
Duration int64
VideoURL string
PubDate time.Time `dynamodbav:",unixtime"`
Size int64
Order string `dynamodbav:"-"`
}
//noinspection SpellCheckingInspection
2017-11-03 15:41:26 -07:00
type Feed struct {
FeedID int64 `sql:",pk" dynamodbav:"-"`
HashID string // Short human readable feed id for users
UserID string // Patreon user id
ItemID string
LinkType api.LinkType // Either group, channel or user
Provider api.Provider // Youtube or Vimeo
PageSize int // The number of episodes to return
Format api.Format
Quality api.Quality
FeatureLevel int
CreatedAt time.Time `dynamodbav:",unixtime"`
LastAccess time.Time `dynamodbav:",unixtime"`
ExpirationTime time.Time `sql:"-" dynamodbav:",unixtime"`
2019-01-06 19:13:13 -08:00
CoverArt string `dynamodbav:",omitempty"`
Explicit bool
2019-02-24 13:30:53 -08:00
Language string `dynamodbav:",omitempty"` // ISO 639
Title string
Description string
PubDate time.Time `dynamodbav:",unixtime"`
Author string
ItemURL string // Platform specific URL
Episodes []*Item // Array of episodes
LastID string // Last seen video URL ID (for incremental updater)
UpdatedAt time.Time `dynamodbav:",unixtime"`
2017-11-03 15:41:26 -07:00
}