mirror of https://github.com/rocboss/paopao-ce
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
1.2 KiB
37 lines
1.2 KiB
// Copyright 2022 ROC. All rights reserved.
|
|
// Use of this source code is governed by a MIT style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
package core
|
|
|
|
import (
|
|
"github.com/rocboss/paopao-ce/internal/dao/jinzhu/dbr"
|
|
)
|
|
|
|
type (
|
|
Comment = dbr.Comment
|
|
CommentFormated = dbr.CommentFormated
|
|
CommentReply = dbr.CommentReply
|
|
CommentContent = dbr.CommentContent
|
|
CommentReplyFormated = dbr.CommentReplyFormated
|
|
)
|
|
|
|
// CommentService 评论检索服务
|
|
type CommentService interface {
|
|
GetComments(conditions *ConditionsT, offset, limit int) ([]*Comment, error)
|
|
GetCommentByID(id int64) (*Comment, error)
|
|
GetCommentCount(conditions *ConditionsT) (int64, error)
|
|
GetCommentReplyByID(id int64) (*CommentReply, error)
|
|
GetCommentContentsByIDs(ids []int64) ([]*CommentContent, error)
|
|
GetCommentRepliesByID(ids []int64) ([]*CommentReplyFormated, error)
|
|
}
|
|
|
|
// CommentManageService 评论管理服务
|
|
type CommentManageService interface {
|
|
DeleteComment(comment *Comment) error
|
|
CreateComment(comment *Comment) (*Comment, error)
|
|
CreateCommentReply(reply *CommentReply) (*CommentReply, error)
|
|
DeleteCommentReply(reply *CommentReply) error
|
|
CreateCommentContent(content *CommentContent) (*CommentContent, error)
|
|
}
|