review

package
v1.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 25, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ReviewRepo

type ReviewRepo interface {
	AddReview(ctx context.Context, review *entity.Review) (err error)
	UpdateReviewStatus(ctx context.Context, reviewID int, reviewerUserID string, status int) (err error)
	GetReview(ctx context.Context, reviewID int) (review *entity.Review, exist bool, err error)
	GetReviewCount(ctx context.Context, status int) (count int64, err error)
	GetReviewPage(ctx context.Context, page, pageSize int, cond *entity.Review) (reviewList []*entity.Review, total int64, err error)
}

ReviewRepo review repository

type ReviewService

type ReviewService struct {
	// contains filtered or unexported fields
}

ReviewService user service

func NewReviewService

func NewReviewService(
	reviewRepo ReviewRepo,
	objectInfoService *object_info.ObjService,
	userCommon *usercommon.UserCommon,
	userRepo usercommon.UserRepo,
	questionRepo questioncommon.QuestionRepo,
	answerRepo answercommon.AnswerRepo,
	userRoleService *role.UserRoleRelService,
	externalNotificationQueueService notice_queue.ExternalNotificationQueueService,
	tagCommon *tagcommon.TagCommonService,
	notificationQueueService notice_queue.NotificationQueueService,
	siteInfoService siteinfo_common.SiteInfoCommonService,
) *ReviewService

NewReviewService new review service

func (*ReviewService) AddAnswerReview

func (cs *ReviewService) AddAnswerReview(ctx context.Context,
	answer *entity.Answer) (needReview bool)

AddAnswerReview add review for answer if needed

func (*ReviewService) AddQuestionReview

func (cs *ReviewService) AddQuestionReview(ctx context.Context,
	question *entity.Question, tags []*schema.TagItem) (needReview bool)

AddQuestionReview add review for question if needed

func (*ReviewService) GetReviewPendingCount

func (cs *ReviewService) GetReviewPendingCount(ctx context.Context) (count int64, err error)

GetReviewPendingCount get review pending count

func (*ReviewService) GetUnreviewedPostPage

func (cs *ReviewService) GetUnreviewedPostPage(ctx context.Context, req *schema.GetUnreviewedPostPageReq) (
	pageModel *pager.PageModel, err error)

GetUnreviewedPostPage get review page

func (*ReviewService) UpdateReview

func (cs *ReviewService) UpdateReview(ctx context.Context, req *schema.UpdateReviewReq) (err error)

UpdateReview update review

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL