// ================================================================================
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
// You can delete these comments if you wish manually maintain this interface file.
// ================================================================================

package service

import (
	"context"
	"server/internal/model"
)

type (
	IBook interface {
		// List retrieves a paginated list of books
		List(ctx context.Context, in *model.BookListIn) (out *model.BookListOut, err error)
		Create(ctx context.Context, in *model.BookAddIn) (out *model.BookCRUDOut, err error)
		Update(ctx context.Context, in *model.BookEditIn) (out *model.BookCRUDOut, err error)
		Delete(ctx context.Context, in *model.BookDelIn) (out *model.BookCRUDOut, err error)
		// AppList retrieves book list for app
		AppList(ctx context.Context, in *model.BookAppListIn) (out *model.BookAppListOut, err error)
		// AppRate rates a book for app
		AppRate(ctx context.Context, in *model.BookAppRateIn) (out *model.BookAppRateOut, err error)
		// AppDetail retrieves book detail for app
		AppDetail(ctx context.Context, in *model.BookAppDetailIn) (out *model.BookAppDetailOut, err error)
		MyList(ctx context.Context, in *model.MyBookListIn) (out *model.MyBookListOut, err error)
		// SetFeatured: 单独修改书籍的精选状态
		SetFeatured(ctx context.Context, in *model.BookSetFeaturedIn) (out *model.BookCRUDOut, err error)
		// SetRecommended: 单独修改书籍的推荐状态
		SetRecommended(ctx context.Context, in *model.BookSetRecommendedIn) (out *model.BookCRUDOut, err error)
		// SetHot: 单独修改书籍的热门状态
		SetHot(ctx context.Context, in *model.BookSetHotIn) (out *model.BookCRUDOut, err error)
	}
)

var (
	localBook IBook
)

func Book() IBook {
	if localBook == nil {
		panic("implement not found for interface IBook, forgot register?")
	}
	return localBook
}

func RegisterBook(i IBook) {
	localBook = i
}
