mirror of https://github.com/go-sonic/sonic.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
918 B
Go
24 lines
918 B
Go
package service
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/go-sonic/sonic/consts"
|
|
"github.com/go-sonic/sonic/model/entity"
|
|
"github.com/go-sonic/sonic/model/param"
|
|
)
|
|
|
|
type PostService interface {
|
|
BasePostService
|
|
Page(ctx context.Context, postQuery param.PostQuery) ([]*entity.Post, int64, error)
|
|
IncreaseLike(ctx context.Context, postID int32) error
|
|
GetPrevPosts(ctx context.Context, post *entity.Post, size int) ([]*entity.Post, error)
|
|
GetNextPosts(ctx context.Context, post *entity.Post, size int) ([]*entity.Post, error)
|
|
Create(ctx context.Context, postParam *param.Post) (*entity.Post, error)
|
|
Update(ctx context.Context, postID int32, postParam *param.Post) (*entity.Post, error)
|
|
CountByStatus(ctx context.Context, status consts.PostStatus) (int64, error)
|
|
CountVisit(ctx context.Context) (int64, error)
|
|
Preview(ctx context.Context, postID int32) (string, error)
|
|
CountLike(ctx context.Context) (int64, error)
|
|
}
|