feat(channel): integrate channel functionality into post management
- Added Channel support in Post model, including ChannelID field in PostRequest and PostResponse DTOs. - Updated PostService and PostRepository to handle channel-specific logic for creating and listing posts. - Introduced ChannelRepository and ChannelService, along with corresponding handlers for managing channels. - Enhanced router to include routes for channel management and public channel listing. - Seeded default channels in the database during initialization.
This commit is contained in:
@@ -39,6 +39,7 @@ var ServiceSet = wire.NewSet(
|
||||
ProvideUserService,
|
||||
ProvideStickerService,
|
||||
ProvideVoteService,
|
||||
ProvideChannelService,
|
||||
ProvideChatService,
|
||||
ProvideScheduleService,
|
||||
ProvideScheduleSyncService,
|
||||
@@ -172,6 +173,10 @@ func ProvideVoteService(
|
||||
return service.NewVoteService(voteRepo, postRepo, cache, postAIService, systemMessageService)
|
||||
}
|
||||
|
||||
func ProvideChannelService(channelRepo *repository.ChannelRepository) service.ChannelService {
|
||||
return service.NewChannelService(channelRepo)
|
||||
}
|
||||
|
||||
// ProvideChatService 提供聊天服务
|
||||
// Note: sensitiveService 传 nil,与 main.go 保持一致
|
||||
func ProvideChatService(
|
||||
|
||||
Reference in New Issue
Block a user