ZeroBot-Plugin/plugin_book_review/model.go
fumiama cb44758036 ✏️ 修复 manager 定时器错误
同时 make lint happy
2021-12-26 14:07:05 +08:00

18 lines
359 B
Go

package bookreview
type book struct {
ID uint64 `db:"id"`
BookReview string `db:"bookreview"`
}
// 暂时随机选择一个书评
func getBookReviewByKeyword(keyword string) (b book) {
_ = db.Find("bookreview", &b, "where bookreview LIKE '%"+keyword+"%'")
return
}
func getRandomBookReview() (b book) {
_ = db.Pick("bookreview", &b)
return
}