feat(posts): add post reference/internal linking functionality
Add support for referencing other posts within messages through a new post_ref segment type. Includes new PostReference model to track relationships, PostRefService for processing references, and new endpoints for post suggestions, related posts, and reference click tracking.
This commit is contained in:
@@ -43,6 +43,9 @@ var RepositorySet = wire.NewSet(
|
||||
|
||||
// 用户资料审核相关仓储
|
||||
repository.NewUserProfileAuditRepository,
|
||||
|
||||
// 帖子内链引用关系
|
||||
repository.NewPostRefRepository,
|
||||
)
|
||||
|
||||
// ProvideUserActivityRepository 提供用户活跃数据仓储
|
||||
|
||||
@@ -65,6 +65,9 @@ var ServiceSet = wire.NewSet(
|
||||
ProvideUserProfileAuditService,
|
||||
ProvideSetupService,
|
||||
|
||||
// 帖子内链引用
|
||||
ProvidePostRefService,
|
||||
|
||||
// 日志服务
|
||||
ProvideAsyncLogManager,
|
||||
ProvideOperationLogService,
|
||||
@@ -486,3 +489,10 @@ func ProvideSetupService(
|
||||
) service.SetupService {
|
||||
return service.NewSetupService(userRepo, roleRepo, casbinSvc, cfg.SetupSecret)
|
||||
}
|
||||
|
||||
func ProvidePostRefService(
|
||||
refRepo repository.PostRefRepository,
|
||||
postRepo repository.PostRepository,
|
||||
) service.PostRefService {
|
||||
return service.NewPostRefService(refRepo, postRepo)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user