151 lines
3.4 KiB
Go
151 lines
3.4 KiB
Go
// Package model 提供播客和剧集的数据模型
|
|
package model
|
|
|
|
import (
|
|
"time"
|
|
)
|
|
|
|
// Medium 表示媒体类型
|
|
type Medium string
|
|
|
|
const (
|
|
// MediumPodcast 表示播客媒体类型
|
|
MediumPodcast Medium = "podcast"
|
|
// MediumMusic 表示音乐媒体类型
|
|
MediumMusic Medium = "music"
|
|
// MediumAudiobook 表示有声书媒体类型
|
|
MediumAudiobook Medium = "audiobook"
|
|
)
|
|
|
|
// Locked 表示播客是否锁定
|
|
type Locked struct {
|
|
// 是否锁定
|
|
Locked bool `json:"locked,omitempty"`
|
|
// 锁定的所有者
|
|
Owner string `json:"owner,omitempty"`
|
|
}
|
|
|
|
// Funding 表示资金支持信息
|
|
type Funding struct {
|
|
// 资金支持URL
|
|
URL string `json:"url,omitempty"`
|
|
// 资金支持文本
|
|
Text string `json:"text,omitempty"`
|
|
}
|
|
|
|
// Person 表示人员信息
|
|
type Person struct {
|
|
// 人员名称
|
|
Name string `json:"name,omitempty"`
|
|
// 人员角色
|
|
Role string `json:"role,omitempty"`
|
|
// 人员组
|
|
Group string `json:"group,omitempty"`
|
|
// 人员头像URL
|
|
Img string `json:"img,omitempty"`
|
|
// 人员URL
|
|
Href string `json:"href,omitempty"`
|
|
}
|
|
|
|
// Value 表示价值交换信息
|
|
type Value struct {
|
|
// 类型
|
|
Type string `json:"type,omitempty"`
|
|
// 方法
|
|
Method string `json:"method,omitempty"`
|
|
// 建议
|
|
Suggested string `json:"suggested,omitempty"`
|
|
// 接收者
|
|
Recipients []ValueRecipient `json:"recipients,omitempty"`
|
|
}
|
|
|
|
// ValueRecipient 表示价值接收者
|
|
type ValueRecipient struct {
|
|
// 名称
|
|
Name string `json:"name,omitempty"`
|
|
// 类型
|
|
Type string `json:"type,omitempty"`
|
|
// 地址
|
|
Address string `json:"address,omitempty"`
|
|
// 分割
|
|
Split float64 `json:"split,omitempty"`
|
|
// 自定义键
|
|
CustomKey string `json:"customKey,omitempty"`
|
|
// 自定义值
|
|
CustomValue string `json:"customValue,omitempty"`
|
|
}
|
|
|
|
// Block 表示阻止标签
|
|
type Block struct {
|
|
// 阻止的ID
|
|
ID string `json:"id,omitempty"`
|
|
// 阻止的URL
|
|
URL string `json:"url,omitempty"`
|
|
}
|
|
|
|
// Episode 表示播客剧集
|
|
type Episode struct {
|
|
// 剧集的唯一标识符
|
|
GUID string `json:"guid,omitempty"`
|
|
|
|
// 剧集的标题
|
|
Title string `json:"title,omitempty"`
|
|
|
|
// 剧集的描述
|
|
Description string `json:"description,omitempty"`
|
|
|
|
// 剧集的链接
|
|
Link string `json:"link,omitempty"`
|
|
|
|
// 剧集的发布日期
|
|
PublicationDate *time.Time `json:"publicationDate,omitempty"`
|
|
|
|
// 剧集的作者
|
|
Author string `json:"author,omitempty"`
|
|
|
|
// 剧集的内容URL
|
|
ContentURL string `json:"contentUrl,omitempty"`
|
|
|
|
// 剧集的图片URL
|
|
ImageURL string `json:"imageUrl,omitempty"`
|
|
|
|
// 剧集的时长(秒)
|
|
Duration int `json:"duration,omitempty"`
|
|
|
|
// 剧集的转录URL列表
|
|
TranscriptURLs []TranscriptURL `json:"transcriptUrls,omitempty"`
|
|
}
|
|
|
|
// RemoteItem 表示远程项目
|
|
type RemoteItem struct {
|
|
// 远程项目的唯一标识符
|
|
GUID string `json:"guid,omitempty"`
|
|
|
|
// 远程项目的标题
|
|
Title string `json:"title,omitempty"`
|
|
|
|
// 远程项目的描述
|
|
Description string `json:"description,omitempty"`
|
|
|
|
// 远程项目的链接
|
|
Link string `json:"link,omitempty"`
|
|
|
|
// 远程项目的发布日期
|
|
PublicationDate *time.Time `json:"publicationDate,omitempty"`
|
|
|
|
// 远程项目的作者
|
|
Author string `json:"author,omitempty"`
|
|
|
|
// 远程项目的内容URL
|
|
ContentURL string `json:"contentUrl,omitempty"`
|
|
|
|
// 远程项目的图片URL
|
|
ImageURL string `json:"imageUrl,omitempty"`
|
|
|
|
// 远程项目的时长(秒)
|
|
Duration int `json:"duration,omitempty"`
|
|
|
|
// 远程项目的转录URL列表
|
|
TranscriptURLs []TranscriptURL `json:"transcriptUrls,omitempty"`
|
|
}
|