Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Channel ¶ added in v0.0.20
type Channel struct {
Id int64 `gorm:"primaryKey;autoIncrement;comment:主键id"`
ChannelName string `gorm:"comment:频道名"`
ChannelUrl string `gorm:"comment:频道url字段"`
ChannelId string `gorm:"comment:频道id"` // 自动去除 -100前缀 ,默认文件名第一个下划线之前
CreatedAt time.Time `gorm:"autoCreateTime"`
UpdatedAt time.Time `gorm:"autoUpdateTime"`
DeletedAt gorm.DeletedAt `gorm:"index"`
}
func (*Channel) GetByChannelId ¶ added in v0.1.0
func (*Channel) GetByChannelName ¶ added in v0.1.0
func (*Channel) GetByChannelURL ¶ added in v0.1.0
func (*Channel) SetChannel ¶ added in v0.0.24
type File ¶
type File struct {
Id int64 `gorm:"primaryKey;autoIncrement;comment:主键id"`
Origin string `gorm:"comment:原始url"`
Channel string `gorm:"comment:频道id"`
FileId int `gorm:"comment:文件id"` // 文件id
Tag string `gorm:"comment:主文件夹名 #后面的文件名"`
Subtag string `gorm:"comment:子(二级)文件夹名 &后面的文件名"`
Filename string `gorm:"comment:手动设置的文件名 @后面的文件名"`
Offset int `gorm:"comment:偏移量 如下载当前媒体之后第n个文件 +后面的数字"`
Capacity int `gorm:"comment:下载当前文件和之后的n个文件 %后面的数字"`
From string `gorm:"comment:用来下载的设备"`
CreatedAt time.Time `gorm:"autoCreateTime"`
UpdatedAt time.Time `gorm:"autoUpdateTime"`
DeletedAt gorm.DeletedAt `gorm:"index"`
}
func (*File) FindByFileId ¶ added in v0.1.0
根据fileid判断是否下载过
func (*File) FindByFileIdAndChannel ¶ added in v0.1.0
根据fileid和channel判断是否下载过,如果有同一条记录同时这两个值相等,则认为是同一个文件
func (*File) FindByFilename ¶ added in v0.0.20
根据自定义文件名判断是否下载过
type Save ¶ added in v0.1.0
type Save struct {
Id int64 `gorm:"primaryKey;autoIncrement;comment:主键"`
FileName string `gorm:"comment:文件名"`
Before string `gorm:"comment:转换前大小(MB)"`
After string `gorm:"comment:转换后大小(MB)"`
SaveSize float64 `gorm:"comment:节省(为正数的时候)的空间(MB)"`
CreateAt time.Time `gorm:"autoCreateTime;comment:创建时间"`
UpdateAt time.Time `gorm:"autoUpdateTime;comment:更新时间"`
DeleteAt gorm.DeletedAt `gorm:"index;comment:删除时间"`
}
Click to show internal directories.
Click to hide internal directories.