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.
31 lines
641 B
Go
31 lines
641 B
Go
package column
|
|
|
|
import (
|
|
"cls-server/pkg/util/page"
|
|
"xorm.io/builder"
|
|
)
|
|
|
|
// Repository 专栏仓储接口
|
|
type ColumnRepository interface {
|
|
// Save 保存专栏
|
|
Save(column *Column) error
|
|
|
|
// FindByID 根据ID查找专栏
|
|
FindByID(id uint64) (*Column, error)
|
|
|
|
// FindByName 根据名称查找专栏
|
|
FindByName(name string) (*Column, error)
|
|
|
|
// FindByAuthorID 查找作者的所有专栏
|
|
FindByAuthorID(authorID uint64) ([]*Column, error)
|
|
|
|
// FindAll 查询专栏列表
|
|
FindAll(page *page.Page, conds []builder.Cond) error
|
|
|
|
// Update 更新专栏
|
|
Update(column *Column) error
|
|
|
|
// Delete 删除专栏
|
|
Delete(id uint64) error
|
|
}
|