You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
652 B
Go
28 lines
652 B
Go
1 month ago
|
package free_trial
|
||
|
|
||
|
import (
|
||
|
"cls/pkg/util/page"
|
||
|
"xorm.io/builder"
|
||
|
)
|
||
|
|
||
|
// FreeTrialRepository 免费试读仓储接口
|
||
|
type FreeTrialRepository interface {
|
||
|
// Save 保存免费试读记录
|
||
|
Save(freeTrial *FreeTrial) error
|
||
|
|
||
|
// FindByID 根据ID查找试读记录
|
||
|
FindByID(id uint64) (*FreeTrial, error)
|
||
|
|
||
|
// FindByArticleID 根据文章ID查找试读记录
|
||
|
FindByArticleID(articleID uint64) (*FreeTrial, error)
|
||
|
|
||
|
// FindAll 查询试读记录列表
|
||
|
FindAll(page *page.Page, conds []builder.Cond) error
|
||
|
|
||
|
// Delete 删除试读记录
|
||
|
Delete(id uint64) error
|
||
|
|
||
|
//GetValidityData 获取有效期内试读
|
||
|
GetValidityData() ([]*FreeTrial, error)
|
||
|
}
|