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.
158 lines
3.9 KiB
158 lines
3.9 KiB
// Copyright 2023 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 sakila
|
|
|
|
import (
|
|
"github.com/bitbus/sqlx"
|
|
"github.com/rocboss/paopao-ce/internal/core"
|
|
"github.com/rocboss/paopao-ce/internal/core/cs"
|
|
"github.com/rocboss/paopao-ce/internal/dao/sakila/auto/ac"
|
|
"github.com/rocboss/paopao-ce/pkg/debug"
|
|
)
|
|
|
|
var (
|
|
_ core.TweetServantA = (*tweetSrvA)(nil)
|
|
_ core.TweetManageServantA = (*tweetManageSrvA)(nil)
|
|
_ core.TweetHelpServantA = (*tweetHelpSrvA)(nil)
|
|
)
|
|
|
|
type tweetSrvA struct {
|
|
*sqlxSrv
|
|
q *ac.TweetA
|
|
}
|
|
|
|
type tweetManageSrvA struct {
|
|
*sqlxSrv
|
|
cis core.CacheIndexService
|
|
q *ac.TweetManageA
|
|
}
|
|
|
|
type tweetHelpSrvA struct {
|
|
*sqlxSrv
|
|
q *ac.TweetHelpA
|
|
}
|
|
|
|
func (s *tweetSrvA) TweetInfoById(id int64) (*cs.TweetInfo, error) {
|
|
// TODO
|
|
return nil, debug.ErrNotImplemented
|
|
}
|
|
|
|
func (s *tweetSrvA) TweetItemById(id int64) (*cs.TweetItem, error) {
|
|
// TODO
|
|
return nil, debug.ErrNotImplemented
|
|
}
|
|
|
|
func (s *tweetSrvA) UserTweets(visitorId, userId int64) (res cs.TweetList, err error) {
|
|
// TODO
|
|
return nil, debug.ErrNotImplemented
|
|
}
|
|
|
|
func (s *tweetSrvA) ReactionByTweetId(userId int64, tweetId int64) (*cs.ReactionItem, error) {
|
|
// TODO
|
|
return nil, debug.ErrNotImplemented
|
|
}
|
|
|
|
func (s *tweetSrvA) UserReactions(userId int64, limit int, offset int) (cs.ReactionList, error) {
|
|
// TODO
|
|
return nil, debug.ErrNotImplemented
|
|
}
|
|
|
|
func (s *tweetSrvA) FavoriteByTweetId(userId int64, tweetId int64) (*cs.FavoriteItem, error) {
|
|
// TODO
|
|
return nil, debug.ErrNotImplemented
|
|
}
|
|
|
|
func (s *tweetSrvA) UserFavorites(userId int64, limit int, offset int) (cs.FavoriteList, error) {
|
|
// TODO
|
|
return nil, debug.ErrNotImplemented
|
|
}
|
|
|
|
func (s *tweetSrvA) AttachmentByTweetId(userId int64, tweetId int64) (*cs.AttachmentBill, error) {
|
|
// TODO
|
|
return nil, debug.ErrNotImplemented
|
|
}
|
|
|
|
func (s *tweetManageSrvA) CreateAttachment(obj *cs.Attachment) (int64, error) {
|
|
// TODO
|
|
return 0, debug.ErrNotImplemented
|
|
}
|
|
|
|
func (s *tweetManageSrvA) CreateTweet(userId int64, req *cs.NewTweetReq) (*cs.TweetItem, error) {
|
|
// TODO
|
|
return nil, debug.ErrNotImplemented
|
|
}
|
|
|
|
func (s *tweetManageSrvA) DeleteTweet(userId int64, tweetId int64) ([]string, error) {
|
|
// TODO
|
|
return nil, debug.ErrNotImplemented
|
|
}
|
|
|
|
func (s *tweetManageSrvA) LockTweet(userId int64, tweetId int64) error {
|
|
// TODO
|
|
return debug.ErrNotImplemented
|
|
}
|
|
|
|
func (s *tweetManageSrvA) StickTweet(userId int64, tweetId int64) error {
|
|
// TODO
|
|
return debug.ErrNotImplemented
|
|
}
|
|
|
|
func (s *tweetManageSrvA) VisibleTweet(userId int64, visibility cs.TweetVisibleType) error {
|
|
// TODO
|
|
return debug.ErrNotImplemented
|
|
}
|
|
|
|
func (s *tweetManageSrvA) CreateReaction(userId int64, tweetId int64) error {
|
|
// TODO
|
|
return debug.ErrNotImplemented
|
|
}
|
|
|
|
func (s *tweetManageSrvA) DeleteReaction(userId int64, reactionId int64) error {
|
|
// TODO
|
|
return debug.ErrNotImplemented
|
|
}
|
|
|
|
func (s *tweetManageSrvA) CreateFavorite(userId int64, tweetId int64) error {
|
|
// TODO
|
|
return debug.ErrNotImplemented
|
|
}
|
|
|
|
func (s *tweetManageSrvA) DeleteFavorite(userId int64, favoriteId int64) error {
|
|
// TODO
|
|
return debug.ErrNotImplemented
|
|
}
|
|
|
|
func (s *tweetHelpSrvA) RevampTweets(tweets cs.TweetList) (cs.TweetList, error) {
|
|
// TODO
|
|
return nil, debug.ErrNotImplemented
|
|
}
|
|
|
|
func (s *tweetHelpSrvA) MergeTweets(tweets cs.TweetInfo) (cs.TweetList, error) {
|
|
// TODO
|
|
return nil, debug.ErrNotImplemented
|
|
}
|
|
|
|
func newTweetServantA(db *sqlx.DB) core.TweetServantA {
|
|
return &tweetSrvA{
|
|
sqlxSrv: newSqlxSrv(db),
|
|
q: acBuildFn(db, ac.BuildTweetA),
|
|
}
|
|
}
|
|
|
|
func newTweetManageServantA(db *sqlx.DB, cacheIndex core.CacheIndexService) core.TweetManageServantA {
|
|
return &tweetManageSrvA{
|
|
sqlxSrv: newSqlxSrv(db),
|
|
cis: cacheIndex,
|
|
q: acBuildFn(db, ac.BuildTweetManageA),
|
|
}
|
|
}
|
|
|
|
func newTweetHelpServantA(db *sqlx.DB) core.TweetHelpServantA {
|
|
return &tweetHelpSrvA{
|
|
sqlxSrv: newSqlxSrv(db),
|
|
q: acBuildFn(db, ac.BuildTweetHelpA),
|
|
}
|
|
}
|