go18/book/v4/apps/comment/interface.go

21 lines
301 B
Go
Raw Normal View History

2025-05-25 12:05:06 +08:00
package comment
import (
"context"
)
const (
APP_NAME = "comment"
)
// comment.Service, Comment的业务定义
type Service interface {
// 为书籍添加评论
AddComment(context.Context, *AddCommentRequest) (*Comment, error)
}
type AddCommentRequest struct {
BookId uint
Comment string
}