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.
1069 lines
64 KiB
1069 lines
64 KiB
// Code generated by Yesql. DO NOT EDIT.
|
|
// versions:
|
|
// - Yesql v1.8.0
|
|
|
|
package cc
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/alimy/yesql"
|
|
"github.com/bitbus/sqlx"
|
|
)
|
|
|
|
const (
|
|
_TagsFromNames = `SELECT * FROM @tag WHERE tag IN (?) AND is_del=0`
|
|
_UpdateTagQuote = `UPDATE @tag SET quote_num=?, modified_on=? WHERE id=? AND is_del=0`
|
|
_AuthorizationManage_BeFriendIds = `SELECT user_id FROM @contact WHERE friend_id=? AND status=2 AND is_del=0`
|
|
_AuthorizationManage_IsFriend = `SELECT status FROM @contact WHERE user_id=? AND friend_id=? AND is_del=0`
|
|
_AuthorizationManage_MyFriendSet = `SELECT friend_id FROM @contact WHERE user_id=? AND status=2 AND is_del=0`
|
|
_Comment_GetCommentById = `SELECT * FROM @comment WHERE id=? AND is_del=0`
|
|
_Comment_GetCommentContentsByIds = `SELECT * FROM @comment_content WHERE comment_id IN (?)`
|
|
_Comment_GetCommentCount = `SELECT count(*) FROM @comment WHERE post_id=:post_id AND is_del=0`
|
|
_Comment_GetCommentReplyById = `SELECT * FROM @comment_reply WHERE id=? AND is_del=0`
|
|
_Comment_GetCommentThumbs = `SELECT * FROM @tweet_comment_thumbs WHERE user_id=? AND tweet_id=?`
|
|
_Comment_GetComments = `SELECT * FROM @comment WHERE post_id=? AND is_del=0 ORDER BY %order% LIMIT ? OFFSET ?`
|
|
_Comment_GetCommmentRepliesByIds = `SELECT * FROM @comment_reply WHERE comment_id IN (?) ORDER BY id ASC`
|
|
_Comment_GetUsersByIds = `SELECT id, nickname, username, status, avatar, is_admin FROM @user WHERE id IN (?)`
|
|
_CommentManage_CreateComment = `INSERT INTO @comment (post_id, user_id, ip, ip_loc, created_on) VALUES (?, ?, ?, ?, ?)`
|
|
_CommentManage_CreateCommentContent = `INSERT INTO @comment_content (comment_id, user_id, content, type, sort, created_on) VALUES (?, ?, ?, ?, ?, ?)`
|
|
_CommentManage_CreateCommentReply = `INSERT INTO @comment_reply (comment_id, user_id, content, at_user_id, ip, ip_loc, created_on) VALUES (?, ?, ?, ?, ?, ?, ?)`
|
|
_CommentManage_CreateThumbsUpdownComment = `INSERT INTO @tweet_comment_thumbs (user_id, tweet_id, comment_id, reply_id, is_thumbs_up, is_thumbs_down, comment_type, created_on) VALUES (:user_id, :tweet_id, :comment_id, :reply_id, :is_thumbs_up, :is_thumbs_down, :comment_type, :created_on)`
|
|
_CommentManage_DeleteComment = `UPDATE @comment SET deleted_on=?, is_del=1 WHERE id=? AND is_del=0`
|
|
_CommentManage_DeleteCommentReply = `UPDATE @comment_reply SET deleted_on=?, is_del=1 WHERE id=? AND is_del=0`
|
|
_CommentManage_DeleteCommentThumbs = `UPDATE @tweet_comment_thumbs SET deleted_on=?, is_del=1 WHERE user_id=? AND tweet_id=? AND comment_id=? AND is_del=0`
|
|
_CommentManage_DeleteReplyThumbs = `UPDATE @tweet_comment_thumbs SET deleted_on=?, is_del=1 WHERE user_id=? AND comment_id=? AND reply_id=? AND is_del=0`
|
|
_CommentManage_GetCommentReplyThumb = `SELECT * FROM @tweet_comment_thumbs WHERE user_id=? AND tweet_id=? AND comment_id=? AND reply_id=? AND comment_type=1 AND is_del=0`
|
|
_CommentManage_GetTweetCommentThumb = `SELECT * FROM @tweet_comment_thumbs WHERE user_id=? AND tweet_id=? AND comment_id=? AND comment_type=0 AND is_del=0`
|
|
_CommentManage_UpdateCommentThumbsCount = `UPDATE @comment SET thumbs_up_count=?, thumbs_down_count=?, modified_on=? WHERE id=? AND is_del=0`
|
|
_CommentManage_UpdateReplyThumbsCount = `UPDATE @comment_reply SET thumbs_up_count=?, thumbs_down_count=?, modified_on=? WHERE id=? AND is_del=0`
|
|
_CommentManage_UpdateThumbsUpdownComment = `UPDATE @tweet_comment_thumbs SET is_thumbs_up=:is_thumbs_up, is_thumbs_down=:is_thumbs_down, modified_on=:modified_on WHERE id=:id AND is_del=0`
|
|
_ContactManager_AddFriendMsgsUpdate = `UPDATE @message SET reply_id=?, modified_on=? WHERE ((sender_user_id = ? AND receiver_user_id = ?) OR (sender_user_id = ? AND receiver_user_id = ?)) AND type = ? AND reply_id = ?`
|
|
_ContactManager_CreateContact = `INSERT INTO @contact (user_id, friend_id, status, created_on) VALUES (?, ?, ?, ?)`
|
|
_ContactManager_CreateMessage = `INSERT INTO @message (sender_user_id, receiver_user_id, type, brief, content, reply_id, created_on) VALUES (:sender_user_id, :receiver_user_id, :type, :brief, :content, :reply_id, :created_on)`
|
|
_ContactManager_DelFriend = `UPDATE @contact SET status=4, is_del=1, deleted_on=? WHERE id=?`
|
|
_ContactManager_FreshContactStatus = `UPDATE @contact SET status=?, modified_on=?, is_del=0 WHERE id=?`
|
|
_ContactManager_GetContact = `SELECT id, user_id, friend_id, group_id, remark, status, is_top, is_black, notice_enable, is_del FROM @contact WHERE user_id=? AND friend_id=?`
|
|
_ContactManager_GetContacts = `SELECT id, user_id, friend_id, group_id, remark, status, is_top, is_black, notice_enable, is_del FROM @contact WHERE (user_id=? AND friend_id=?) OR (user_id=? AND friend_id=?)`
|
|
_ContactManager_GetUserFriend = `SELECT id, user_id, friend_id, group_id, remark, status, is_top, is_black, notice_enable, is_del FROM @contact WHERE user_id=? AND friend_id=? AND is_del=0`
|
|
_ContactManager_IsFriend = `SELECT true FROM @contact WHERE user_id=? AND friend_id=? AND is_del=0 AND status=2`
|
|
_ContactManager_ListFriend = `SELECT c.friend_id user_id, u.username username, u.nickname nickname, u.avatar avatar, u.phone phone FROM @contact c JOIN @user u ON c.friend_id=u.id WHERE user_id=? AND status=2 AND is_del=0 ORDER BY u.nickname ASC LIMIT ? OFFSET ?`
|
|
_ContactManager_RejectFriendMsgsUpdate = `UPDATE @message SET reply_id=?, modified_on=? WHERE sender_user_id = ? AND receiver_user_id = ? AND type = ? AND reply_id = ?`
|
|
_ContactManager_TotalFriendsById = `SELECT count(*) FROM @contact WHERE user_id=? AND status=2 AND is_del=0`
|
|
_FollowingManager_CountFollowings = `SELECT count(*) FROM @following WHERE follow_id=? AND is_del=0`
|
|
_FollowingManager_CountFollows = `SELECT count(*) FROM @following WHERE user_id=? AND is_del=0`
|
|
_FollowingManager_CreateFollowing = `INSERT INTO @following (user_id, follow_id, created_on) VALUES (?, ?, ?)`
|
|
_FollowingManager_DeleteFollowing = `UPDATE @following SET is_del=0, deleted_on=? WHERE user_id=? AND follow_id=? AND is_del=0`
|
|
_FollowingManager_ExistFollowing = `SELECT 1 FROM @following WHERE user_id=? AND follow_id=? AND is_del=0`
|
|
_FollowingManager_ListFollowings = `SELECT u.user_id user_id, u.username username, u.nickname nickname, u.avatar avatar, u.created_on created_on FROM @following f JOIN @user u ON f.user_id=u.id WHERE f.follow_id=? AND f.is_del=0 ORDER BY u.nickname ASC LIMIT ? OFFSET ?`
|
|
_FollowingManager_ListFollows = `SELECT u.user_id user_id, u.username username, u.nickname nickname, u.avatar avatar, u.created_on created_on FROM @following f JOIN @user u ON f.follow_id=u.id WHERE f.user_id=? AND f.is_del=0 ORDER BY u.nickname ASC LIMIT ? OFFSET ?`
|
|
_Message_CreateMessage = `INSERT INTO @message (sender_user_id, receiver_user_id, type, brief, content, post_id, comment_id, reply_id, created_on) VALUES (:sender_user_id, :receiver_user_id, :type, :brief, :content, :post_id, :comment_id, :reply_id, :created_on)`
|
|
_Message_GetMessageById = `SELECT * FROM @message WHERE id=? AND is_del=0`
|
|
_Message_GetMessageCount = `SELECT count(*) FROM @message WHERE receiver_user_id=:recerver_user_id AND is_del=0`
|
|
_Message_GetMessages = `SELECT * FROM @message WHERE receiver_user_id=:recerver_user_id AND is_del=0 ORDER BY id DESC LIMIT :limit OFFSET :offset`
|
|
_Message_GetUnreadCount = `SELECT count(*) FROM @message WHERE receiver_user_id=? AND is_read=0 AND is_del=0`
|
|
_Message_ReadMessage = `UPDATE @message SET is_read=1, modified_on=? WHERE id=?`
|
|
_Security_CreatePhoneCaptcha = `INSERT INTO @captcha (phone, captcha, expired_on, created_on) VALUES (:phone, :captcha, :expired_on, :created_on)`
|
|
_Security_GetLatestPhoneCaptcha = `SELECT * FROM @captcha WHERE phone=? AND is_del=0`
|
|
_Security_UsePhoneCaptcha = `UPDATE @captcha SET use_times=use_times+1, modified_on=? WHERE id=? AND is_del=0`
|
|
_ShipIndexA_UserInfo = `SELECT * FROM @user WHERE username=?`
|
|
_ShipIndex_IndexByAdmin = `SELECT * FROM @p_post WHERE is_del=0 ORDER BY is_top DESC, latest_replied_on DESC LIMIT ? OFFSET ?`
|
|
_ShipIndex_IndexByGuest = `SELECT * FROM @p_post WHERE visibility=0 AND is_del=0 ORDER BY is_top DESC, latest_replied_on DESC LIMIT ? OFFSET ?`
|
|
_ShipIndex_IndexBySelf = `SELECT * FROM @p_post WHERE is_del=0 AND (visibility=0 OR (visibility=1 AND user_id=?) OR (visibility=2 AND user_id IN ?)) ORDER BY is_top DESC, latest_replied_on DESC LIMIT ? OFFSET ?`
|
|
_ShipIndex_IndexCountByAdmin = `SELECT count(*) FROM @p_post WHERE is_del=0`
|
|
_ShipIndex_IndexCountByGuest = `SELECT count(*) FROM @p_post WHERE visibility=0 AND is_del=0`
|
|
_ShipIndex_IndexCountBySelf = `SELECT count(*) FROM @p_post WHERE is_del=0 AND (visibility=0 OR (visibility=1 AND user_id=?) OR (visibility=2 AND user_id IN ?))`
|
|
_SimpleIndexA_UserInfo = `SELECT * FROM @user WHERE username=?`
|
|
_SimpleIndex_Index = `SELECT * FROM @p_post WHERE visibility=0 ORDER BY is_top DESC, latest_replied_on DESC LIMIT ? OFFSET ?`
|
|
_SimpleIndex_IndexCount = `SELECT count(*) FROM @p_post WHERE visibility=0`
|
|
_TopicA_DecrTagsById = `UPDATE @tag SET quote_num=quote_num-1, modified_on=? WHERE id IN (?)`
|
|
_TopicA_HotTags = `SELECT t.id id, t.user_id user_id, t.tag tag, t.quote_num quote_num, u.id, u.nickname, u.username, u.status, u.avatar, u.is_admin FROM @tag t JOIN @user u ON t.user_id = u.id WHERE t.is_del = 0 AND t.quote_num > 0 ORDER BY t.quote_num DESC LIMIT ? OFFSET ?`
|
|
_TopicA_IncrTagsById = `UPDATE @tag SET quote_num=quote_num+1, is_del=0, modified_on=? WHERE id IN (?)`
|
|
_TopicA_InsertTag = `INSERT INTO @tag (user_id, tag, created_on, modified_on, quote_num) VALUES (?, ?, ?, ?, 1)`
|
|
_TopicA_NewestTags = `SELECT t.id id, t.user_id user_id, t.tag tag, t.quote_num quote_num, u.id, u.nickname, u.username, u.status, u.avatar, u.is_admin FROM @tag t JOIN @user u ON t.user_id = u.id WHERE t.is_del = 0 AND t.quote_num > 0 ORDER BY t.id DESC LIMIT ? OFFSET ?`
|
|
_TopicA_TagsByIdA = `SELECT id FROM @tag WHERE id IN (?) AND is_del = 0 AND quote_num > 0`
|
|
_TopicA_TagsByIdB = `SELECT id, user_id, tag, quote_num FROM @tag WHERE id IN (?)`
|
|
_TopicA_TagsByKeywordA = `SELECT id, user_id, tag, quote_num FROM @tag WHERE is_del = 0 ORDER BY quote_num DESC LIMIT 6`
|
|
_TopicA_TagsByKeywordB = `SELECT id, user_id, tag, quote_num FROM @tag WHERE is_del = 0 AND tag LIKE ? ORDER BY quote_num DESC LIMIT 6`
|
|
_TopicA_TagsForIncr = `SELECT id, user_id, tag, quote_num FROM @tag WHERE tag IN (?)`
|
|
_TweetA_AttachmentByTweetId = `SELECT * FROM @user WHERE username=?`
|
|
_TweetA_FavoriteByTweetId = `SELECT * FROM @user WHERE username=?`
|
|
_TweetA_ReactionByTweetId = `SELECT * FROM @user WHERE username=?`
|
|
_TweetA_TweetInfoById = `SELECT * FROM @user WHERE username=?`
|
|
_TweetA_TweetItemById = `SELECT * FROM @user WHERE username=?`
|
|
_TweetA_UserFavorites = `SELECT * FROM @user WHERE username=?`
|
|
_TweetA_UserInfo = `SELECT * FROM @user WHERE username=?`
|
|
_TweetA_UserReactions = `SELECT * FROM @user WHERE username=?`
|
|
_TweetA_UserTweetsByAdmin = `SELECT * FROM @user WHERE username=?`
|
|
_TweetA_UserTweetsByFriend = `SELECT * FROM @user WHERE username=?`
|
|
_TweetA_UserTweetsByGuest = `SELECT * FROM @user WHERE username=?`
|
|
_TweetA_UserTweetsBySelf = `SELECT * FROM @user WHERE username=?`
|
|
_Tweet_GetAnyPostCount = `SELECT count(*) FROM @post WHERE visibility IN (?)`
|
|
_Tweet_GetAnyPosts = `SELECT * FROM @post WHERE visibility IN (?) AND is_del=0 LIMIT ? OFFSET ?`
|
|
_Tweet_GetPostAttachmentBill = `SELECT * FROM @post_attachment_bill WHERE post_id=? AND user_id=? AND is_del=0`
|
|
_Tweet_GetPostById = `SELECT * FROM @post WHERE id=? AND is_del=0`
|
|
_Tweet_GetPostContentById = `SELECT * FROM @post_content WHERE id=? AND is_del=0`
|
|
_Tweet_GetPostContentsByIds = `SELECT * FROM @post_content WHERE post_id IN (?) AND is_del=0`
|
|
_Tweet_GetUserPostCollection = `SELECT s.*, P.ID "post.id", P.user_id "post.user_id", P.comment_count "post.comment_count", P.collection_count "post.collection_count", P.upvote_count "post.upvote_count", P.share_count "post.share_count", P.visibility "post.visibility", P.is_top "post.is_top", P.is_essence "post.is_essence", P.is_lock "post.is_lock", P.latest_replied_on "post.latest_replied_on", P.tags "post.tags", P.attachment_price "post.attachment_price", P.ip "post.ip", P.ip_loc "post.ip_loc", P.is_del "post.is_del", P.created_on "post.created_on", P.modified_on "post.modified_on", P.deleted_on "post.deleted_on" FROM @post_collection s JOIN @post P ON s.post_id = P.ID WHERE s.post_id = ? AND s.user_id = ? AND s.is_del = 0 AND ( visibility <> 1 OR ( visibility = 1 AND P.user_id = ? ) ) ORDER BY P.ID DESC`
|
|
_Tweet_GetUserPostCollectionCount = `SELECT count(*) FROM @post_collection s JOIN @post P ON s.post_id = P.ID WHERE s.user_id = ? AND s.is_del = 0 AND ( visibility <> 1 OR ( visibility = 1 AND P.user_id = ? ) )`
|
|
_Tweet_GetUserPostCollections = `SELECT s.*, P.ID "post.id", P.user_id "post.user_id", P.comment_count "post.comment_count", P.collection_count "post.collection_count", P.upvote_count "post.upvote_count", P.share_count "post.share_count", P.visibility "post.visibility", P.is_top "post.is_top", P.is_essence "post.is_essence", P.is_lock "post.is_lock", P.latest_replied_on "post.latest_replied_on", P.tags "post.tags", P.attachment_price "post.attachment_price", P.ip "post.ip", P.ip_loc "post.ip_loc", P.is_del "post.is_del", P.created_on "post.created_on", P.modified_on "post.modified_on", P.deleted_on "post.deleted_on" FROM @post_collection s JOIN @post P ON s.post_id = P.ID WHERE s.user_id = ? AND s.is_del = 0 AND ( visibility <> 1 OR ( visibility = 1 AND P.user_id = ? ) ) ORDER BY s.ID DESC, P.ID DESC LIMIT ? OFFSET ?`
|
|
_Tweet_GetUserPostCount = `SELECT count(*) FROM @post WHERE user_id=? AND visibility IN (?)`
|
|
_Tweet_GetUserPostStar = `SELECT s.*, P.ID "post.id", P.user_id "post.user_id", P.comment_count "post.comment_count", P.collection_count "post.collection_count", P.upvote_count "post.upvote_count", P.share_count "post.share_count", P.visibility "post.visibility", P.is_top "post.is_top", P.is_essence "post.is_essence", P.is_lock "post.is_lock", P.latest_replied_on "post.latest_replied_on", P.tags "post.tags", P.attachment_price "post.attachment_price", P.ip "post.ip", P.ip_loc "post.ip_loc", P.is_del "post.is_del", P.created_on "post.created_on", P.modified_on "post.modified_on", P.deleted_on "post.deleted_on" FROM @post_star s JOIN @post P ON s.post_id = P.ID WHERE s.post_id = ? AND s.user_id = ? AND s.is_del = 0 AND ( visibility <> 1 OR ( visibility = 1 AND P.user_id = ? ) ) ORDER BY P.ID DESC`
|
|
_Tweet_GetUserPostStarCount = `SELECT count(*) FROM @post_star s JOIN @post P ON s.post_id = P.ID WHERE s.user_id = ? AND s.is_del = 0 AND ( visibility <> 1 OR ( visibility = 1 AND P.user_id = ? ) )`
|
|
_Tweet_GetUserPostStars = `SELECT s.*, P.ID "post.id", P.user_id "post.user_id", P.comment_count "post.comment_count", P.collection_count "post.collection_count", P.upvote_count "post.upvote_count", P.share_count "post.share_count", P.visibility "post.visibility", P.is_top "post.is_top", P.is_essence "post.is_essence", P.is_lock "post.is_lock", P.latest_replied_on "post.latest_replied_on", P.tags "post.tags", P.attachment_price "post.attachment_price", P.ip "post.ip", P.ip_loc "post.ip_loc", P.is_del "post.is_del", P.created_on "post.created_on", P.modified_on "post.modified_on", P.deleted_on "post.deleted_on" FROM @post_star s JOIN @post P ON s.post_id = P.ID WHERE s.user_id = ? AND s.is_del = 0 AND ( visibility <> 1 OR ( visibility = 1 AND P.user_id = ? ) ) ORDER BY s.ID DESC, P.ID DESC LIMIT ? OFFSET ?`
|
|
_Tweet_GetUserPosts = `SELECT * FROM @post WHERE user_id=? AND visibility IN (?) ORDER BY latest_replies_on DESC LIMIT ? OFFSET ?`
|
|
_TweetHelpA_UserInfo = `SELECT * FROM @user WHERE username=?`
|
|
_TweetHelp_GetPostContentByIds = `SELECT id, post_id, content, type, sort FROM @post_content WHERE post_id IN (?) AND is_del=0`
|
|
_TweetHelp_GetUsersByIds = `SELECT id, username, nickname, status, avatar, is_admin FROM @user WHERE id IN (?) AND is_del=0`
|
|
_TweetManageA_UserInfo = `SELECT * FROM @user WHERE username=?`
|
|
_TweetManage_AddAttachment = `INSERT INTO @attachment (user_id, file_size, img_width, img_height, type, content, created_on) VALUES (?, ?, ?, ?, ?, ?, ?)`
|
|
_TweetManage_AddPost = `INSERT INTO @post (user_id, tags, ip, ip_loc, attachment_price, visibility, latest_replies_on, created_on) VALUES (:user_id, :tags, :ip, :ip_loc, :attachment_price, :visibility, :latest_replies_on, :created_on)`
|
|
_TweetManage_AddPostCollection = `INSERT INTO @post_collection (post_id, user_id, created_on) VALUES (?, ?, ?)`
|
|
_TweetManage_AddPostContent = `INSERT INTO @post_content (post_id, user_id, content, type, sort, created_on) VALUES (:post_id, :user_id, :content, :type, :sort, :created_on)`
|
|
_TweetManage_AddPostStar = `INSERT INTO @post_star (post_id, user_id, created_on) VALUES (?, ?, ?)`
|
|
_TweetManage_CommentIdsByPostId = `SELECT id FROM @comment WHERE post_id=? AND is_del=0`
|
|
_TweetManage_CommentMediaFromCommentIds = `SELECT content FROM @comment_content WHERE comment_id IN (?) AND type=3 AND is_del=0`
|
|
_TweetManage_DelCommentByPostId = `UPDATE @comment SET deleted_on=?, is_del=1 WHERE post_id=? AND is_del=0`
|
|
_TweetManage_DelCommentContentByCommentIds = `UPDATE @comment_content SET deleted_on=?, is_del=1 WHERE comment_id IN (?) AND is_del=0`
|
|
_TweetManage_DelPostById = `UPDATE @post SET is_del=1, deleted_on=? WHERE id=? AND is_del=0`
|
|
_TweetManage_DelPostCollection = `UPDATE @post_collection SET is_del=1, deleted_on=? WHERE id=? AND is_del=0`
|
|
_TweetManage_DelPostStar = `UPDATE @post_star SET is_del=1, deleted_on=? WHERE id=? AND is_del=0`
|
|
_TweetManage_DelReplyByCommentIds = `UPDATE @comment_reply SET deleted_on=?, is_del=1 WHERE comment_id IN (?) AND is_del=0`
|
|
_TweetManage_HighlightPost = `UPDATE @post SET is_essence=1-is_essence WHERE id=? AND is_del=0`
|
|
_TweetManage_LockPost = `UPDATE @post SET is_lock=1-is_lock, modified_on=? WHERE id=? AND is_del=0`
|
|
_TweetManage_MediaContentByPostId = `SELECT content FROM post_content WHERE post_id=? AND is_del=0 AND type IN (3, 4, 5, 7, 8)`
|
|
_TweetManage_PostHighlightStatus = `SELECT user_id, is_essence FROM @post WHERE id=? AND is_del=0`
|
|
_TweetManage_StickPost = `UPDATE @post SET is_top=1-is_top, modified_on=? WHERE id=? AND is_del=0`
|
|
_TweetManage_UpdatePost = `UPDATE @post SET comment_count=:comment_count, upvote_count=:upvote_count, collection_count=:collection_count, latest_replies_on=:latest_replies_on, modified_on=:modified_on WHERE id=:id AND is_del=0`
|
|
_TweetManage_VisiblePost = `UPDATE @post SET visibility=?, is_top=?, modified_on=? WHERE id=? AND is_del=0`
|
|
_Tweet_UserCommentTweetsByFriend = `SELECT * FROM @post_by_comment WHERE is_del=0 AND comment_user_id=? AND (visibility=0 OR visibility=2) ORDER BY latest_replied_on DESC LIMIT ? OFFSET ?`
|
|
_Tweet_UserCommentTweetsByGuest = `SELECT * FROM @post_by_comment WHERE is_del=0 AND comment_user_id=? AND visibility=0 ORDER BY latest_replied_on DESC LIMIT ? OFFSET ?`
|
|
_Tweet_UserCommentTweetsBySelf = `SELECT * FROM @post_by_comment WHERE is_del=0 AND comment_user_id=? ORDER BY latest_replied_on DESC LIMIT ? OFFSET ?`
|
|
_Tweet_UserCommentTweetsCountByFriend = `SELECT count(*) FROM @post_by_comment WHERE is_del=0 AND comment_user_id=? AND (visibility=0 OR visibility=2)`
|
|
_Tweet_UserCommentTweetsCountByGuest = `SELECT count(*) FROM @post_by_comment WHERE is_del=0 AND comment_user_id=? AND visibility=0`
|
|
_Tweet_UserCommentTweetsCountBySelf = `SELECT count(*) FROM @post_by_comment WHERE is_del=0 AND comment_user_id=?`
|
|
_Tweet_UserMediaTweetsByFriend = `SELECT * FROM @post_by_media WHERE is_del=0 AND user_id=? AND (visibility=0 OR visibility=2) ORDER BY latest_replied_on DESC LIMIT ? OFFSET ?`
|
|
_Tweet_UserMediaTweetsByGuest = `SELECT * FROM @post_by_media WHERE is_del=0 AND user_id=? AND visibility=0 ORDER BY latest_replied_on DESC LIMIT ? OFFSET ?`
|
|
_Tweet_UserMediaTweetsBySelf = `SELECT * FROM @post_by_media WHERE is_del=0 AND user_id=? ORDER BY latest_replied_on DESC LIMIT ? OFFSET ?`
|
|
_Tweet_UserMediaTweetsCountByFriend = `SELECT count(*) FROM @post_by_media WHERE is_del=0 AND user_id=? AND (visibility=0 OR visibility=2)`
|
|
_Tweet_UserMediaTweetsCountByGuest = `SELECT count(*) FROM @post_by_media WHERE is_del=0 AND user_id=? AND visibility=0`
|
|
_Tweet_UserMediaTweetsCountBySelf = `SELECT count(*) FROM @post_by_media WHERE is_del=0 AND user_id=?`
|
|
_Tweet_UserStarTweetsByAdmin = `SELECT star.*, post.ID "post.id", post.created_on "post.created_on", post.modified_on "post.modified_on", post.deleted_on "post.deleted_on", post.is_del "post.is_del", post.user_id "post.user_id", post.comment_count "post.comment_count", post.collection_count "post.collection_count", post.share_count "post.share_count", post.upvote_count "post.upvote_count", post.visibility "post.visibility", post.is_top "post.is_top", post.is_essence "post.is_essence", post.is_lock "post.is_lock", post.latest_replied_on "post.latest_replied_on", post.tags "post.tags", post.attachment_price "post.attachment_price", post.ip "post.ip", post.ip_loc "post.ip_loc" FROM @post_star star JOIN @post post ON star.post_id = post.ID WHERE star.is_del=0 AND star.user_id=? ORDER BY post.latest_replied_on DESC; LIMIT ? OFFSET ?`
|
|
_Tweet_UserStarTweetsByFriend = `SELECT star.*, post.ID "post.id", post.created_on "post.created_on", post.modified_on "post.modified_on", post.deleted_on "post.deleted_on", post.is_del "post.is_del", post.user_id "post.user_id", post.comment_count "post.comment_count", post.collection_count "post.collection_count", post.share_count "post.share_count", post.upvote_count "post.upvote_count", post.visibility "post.visibility", post.is_top "post.is_top", post.is_essence "post.is_essence", post.is_lock "post.is_lock", post.latest_replied_on "post.latest_replied_on", post.tags "post.tags", post.attachment_price "post.attachment_price", post.ip "post.ip", post.ip_loc "post.ip_loc" FROM @post_star star JOIN @post post ON star.post_id = post.ID WHERE star.is_del=0 AND star.user_id=? AND (post.visibility=0 OR post.visibility=2) ORDER BY post.latest_replied_on DESC LIMIT ? OFFSET ?`
|
|
_Tweet_UserStarTweetsByGuest = `SELECT star.*, post.ID "post.id", post.created_on "post.created_on", post.modified_on "post.modified_on", post.deleted_on "post.deleted_on", post.is_del "post.is_del", post.user_id "post.user_id", post.comment_count "post.comment_count", post.collection_count "post.collection_count", post.share_count "post.share_count", post.upvote_count "post.upvote_count", post.visibility "post.visibility", post.is_top "post.is_top", post.is_essence "post.is_essence", post.is_lock "post.is_lock", post.latest_replied_on "post.latest_replied_on", post.tags "post.tags", post.attachment_price "post.attachment_price", post.ip "post.ip", post.ip_loc "post.ip_loc" FROM @post_star star JOIN @post post ON star.post_id = post.ID WHERE star.is_del = 0 AND star.user_id =? AND post.visibility = 0 ORDER BY post.latest_replied_on DESC LIMIT ? OFFSET ?`
|
|
_Tweet_UserStarTweetsBySelf = `SELECT star.*, post.ID "post.id", post.created_on "post.created_on", post.modified_on "post.modified_on", post.deleted_on "post.deleted_on", post.is_del "post.is_del", post.user_id "post.user_id", post.comment_count "post.comment_count", post.collection_count "post.collection_count", post.share_count "post.share_count", post.upvote_count "post.upvote_count", post.visibility "post.visibility", post.is_top "post.is_top", post.is_essence "post.is_essence", post.is_lock "post.is_lock", post.latest_replied_on "post.latest_replied_on", post.tags "post.tags", post.attachment_price "post.attachment_price", post.ip "post.ip", post.ip_loc "post.ip_loc" FROM @post_star star JOIN @post post ON star.post_id = post.ID WHERE star.is_del=0 AND star.user_id=? AND (post.visibility<>0 (post.visibility=0 AND post.user_id=?)) ORDER BY post.latest_replied_on DESC; LIMIT ? OFFSET ?`
|
|
_Tweet_UserStarTweetsCountByAdmin = `SELECT count(*) FROM @post_star star JOIN @post post ON star.post_id = post.ID WHERE star.is_del=0 AND star.user_id=?`
|
|
_Tweet_UserStarTweetsCountByFriend = `SELECT count(*) FROM @post_star star JOIN @post post ON star.post_id = post.ID WHERE star.is_del=0 AND star.user_id=? AND (post.visibility=0 OR post.visibility=2)`
|
|
_Tweet_UserStarTweetsCountByGuest = `SELECT count(*) FROM @post_star star JOIN @post post ON star.post_id = post.ID WHERE star.is_del=0 AND star.user_id=? AND post.visibility=0`
|
|
_Tweet_UserStarTweetsCountBySelf = `SELECT count(*) FROM @post_star star JOIN @post post ON star.post_id = post.ID WHERE star.is_del=0 AND star.user_id=? AND (post.visibility<>0 (post.visibility=0 AND post.user_id=?))`
|
|
_UserManage_CreateUser = `INSERT INTO @user (username, nickname, password, salt, avatar, status, created_on) VALUES (:username, :nickname, :password, :salt, :avatar, :status, :created_on)`
|
|
_UserManage_GetAnyUsers = `SELECT * FROM @user WHERE is_del=0 ORDER BY id ASC limit 6`
|
|
_UserManage_GetUserById = `SELECT * FROM @user WHERE id=? AND is_del=0`
|
|
_UserManage_GetUserByPhone = `SELECT * FROM @user WHERE phone=? AND is_del=0`
|
|
_UserManage_GetUserByUsername = `SELECT * FROM @user WHERE username=? AND is_del=0`
|
|
_UserManage_GetUsersByIds = `SELECT * FROM @user WHERE id IN (?) AND is_del=0`
|
|
_UserManage_GetUsersByKeyword = `SELECT * FROM @user WHERE username LIKE ? AND is_del=0 limit 6`
|
|
_UserManage_UpdateUser = `UPDATE @user SET username=:username, nickname=:nickname, phone=:phone, password=:password, salt=:salt, status=:status, avatar=:avatar, balance=:balance, is_admin=:is_admin, modified_on=:modified_on WHERE id=? AND is_del=0`
|
|
_Wallet_AddUserBalance = `UPDATE @user SET balance=balance+?, modified_on=? WHERE id=? AND is_del=0`
|
|
_Wallet_CreateRecharge = `INSERT INTO @wallet_recharge (user_id, amount, created_on) VALUES (?, ?, ?)`
|
|
_Wallet_CreateWalletStatement = `INSERT INTO @wallet_statement (user_id, change_amount, balance_snapshot, reason, created_on) VALUES (?, ?, ?, ?, ?)`
|
|
_Wallet_GetRechargeById = `SELECT * FROM @wallet_recharge WHERE id=? AND is_del=?`
|
|
_Wallet_GetUserBalance = `SELECT balance FROM @user WHERE id=? AND is_del=0`
|
|
_Wallet_GetUserByUid = `SELECT * FROM @user WHERE id=? AND is_del=0`
|
|
_Wallet_GetUserWalletBillCount = `SELECT count(*) FROM @wallet_statement WHERE user_id=? AND is_del=0`
|
|
_Wallet_GetUserWalletBills = `SELECT * FROM @wallet_statement WHERE user_id=? AND is_del=0 ORDER BY id DESC LIMIT ? OFFSET ?`
|
|
_Wallet_MarkSuccessRecharge = `UPDATE @wallet_recharge SET trade_no=?, trade_status='TRADE_SUCCESS', modified_on=? WHERE id=? AND is_del=0`
|
|
_Wallet_MinusUserBalance = `UPDATE @user SET balance=balance-?, modified_on=? WHERE id=? AND is_del=0`
|
|
_Wallet_NewPostAttachmentBill = `INSERT INTO @post_attachment_bill (post_id, user_id, paid_amount, created_on) VALUES (?, ?, ?, ?)`
|
|
_Wallet_NewPostBill = `INSERT INTO @wallet_statement (post_id, user_id, change_amount, balance_snapshot, reason, created_on) VALUES (?, ?, ?, ?, ?, ?)`
|
|
)
|
|
|
|
// PreparexContext enhances the Conn interface with context.
|
|
type PreparexContext interface {
|
|
// PrepareContext prepares a statement.
|
|
// The provided context is used for the preparation of the statement, not for
|
|
// the execution of the statement.
|
|
PreparexContext(ctx context.Context, query string) (*sqlx.Stmt, error)
|
|
|
|
// PrepareNamedContext returns an sqlx.NamedStmt
|
|
PrepareNamedContext(ctx context.Context, query string) (*sqlx.NamedStmt, error)
|
|
|
|
// Rebind rebind query to adapte SQL Driver
|
|
Rebind(query string) string
|
|
}
|
|
|
|
// PreparexBuilder preparex builder interface for sqlx
|
|
type PreparexBuilder interface {
|
|
PreparexContext
|
|
QueryHook(query string) string
|
|
}
|
|
|
|
type Yesql struct {
|
|
TagsFromNames string `yesql:"tags_from_names"`
|
|
UpdateTagQuote *sqlx.Stmt `yesql:"update_tag_quote"`
|
|
}
|
|
|
|
type AuthorizationManage struct {
|
|
yesql.Namespace `yesql:"authorization_manage"`
|
|
BeFriendIds *sqlx.Stmt `yesql:"be_friend_ids"`
|
|
IsFriend *sqlx.Stmt `yesql:"is_friend"`
|
|
MyFriendSet *sqlx.Stmt `yesql:"my_friend_set"`
|
|
}
|
|
|
|
type Comment struct {
|
|
yesql.Namespace `yesql:"comment"`
|
|
GetCommentContentsByIds string `yesql:"get_comment_contents_by_ids"`
|
|
GetComments string `yesql:"get_comments"`
|
|
GetCommmentRepliesByIds string `yesql:"get_commment_replies_by_ids"`
|
|
GetUsersByIds string `yesql:"get_users_by_ids"`
|
|
GetCommentById *sqlx.Stmt `yesql:"get_comment_by_id"`
|
|
GetCommentReplyById *sqlx.Stmt `yesql:"get_comment_reply_by_id"`
|
|
GetCommentThumbs *sqlx.Stmt `yesql:"get_comment_thumbs"`
|
|
GetCommentCount *sqlx.NamedStmt `yesql:"get_comment_count"`
|
|
}
|
|
|
|
type CommentManage struct {
|
|
yesql.Namespace `yesql:"comment_manage"`
|
|
CreateComment *sqlx.Stmt `yesql:"create_comment"`
|
|
CreateCommentContent *sqlx.Stmt `yesql:"create_comment_content"`
|
|
CreateCommentReply *sqlx.Stmt `yesql:"create_comment_reply"`
|
|
DeleteComment *sqlx.Stmt `yesql:"delete_comment"`
|
|
DeleteCommentReply *sqlx.Stmt `yesql:"delete_comment_reply"`
|
|
DeleteCommentThumbs *sqlx.Stmt `yesql:"delete_comment_thumbs"`
|
|
DeleteReplyThumbs *sqlx.Stmt `yesql:"delete_reply_thumbs"`
|
|
GetCommentReplyThumb *sqlx.Stmt `yesql:"get_comment_reply_thumb"`
|
|
GetTweetCommentThumb *sqlx.Stmt `yesql:"get_tweet_comment_thumb"`
|
|
UpdateCommentThumbsCount *sqlx.Stmt `yesql:"update_comment_thumbs_count"`
|
|
UpdateReplyThumbsCount *sqlx.Stmt `yesql:"update_reply_thumbs_count"`
|
|
CreateThumbsUpdownComment *sqlx.NamedStmt `yesql:"create_thumbs_updown_comment"`
|
|
UpdateThumbsUpdownComment *sqlx.NamedStmt `yesql:"update_thumbs_updown_comment"`
|
|
}
|
|
|
|
type ContactManager struct {
|
|
yesql.Namespace `yesql:"contact_manager"`
|
|
AddFriendMsgsUpdate *sqlx.Stmt `yesql:"add_friend_msgs_update"`
|
|
CreateContact *sqlx.Stmt `yesql:"create_contact"`
|
|
DelFriend *sqlx.Stmt `yesql:"del_friend"`
|
|
FreshContactStatus *sqlx.Stmt `yesql:"fresh_contact_status"`
|
|
GetContact *sqlx.Stmt `yesql:"get_contact"`
|
|
GetContacts *sqlx.Stmt `yesql:"get_contacts"`
|
|
GetUserFriend *sqlx.Stmt `yesql:"get_user_friend"`
|
|
IsFriend *sqlx.Stmt `yesql:"is_friend"`
|
|
ListFriend *sqlx.Stmt `yesql:"list_friend"`
|
|
RejectFriendMsgsUpdate *sqlx.Stmt `yesql:"reject_friend_msgs_update"`
|
|
TotalFriendsById *sqlx.Stmt `yesql:"total_friends_by_id"`
|
|
CreateMessage *sqlx.NamedStmt `yesql:"create_message"`
|
|
}
|
|
|
|
type FollowingManager struct {
|
|
yesql.Namespace `yesql:"following_manager"`
|
|
CountFollowings *sqlx.Stmt `yesql:"count_followings"`
|
|
CountFollows *sqlx.Stmt `yesql:"count_follows"`
|
|
CreateFollowing *sqlx.Stmt `yesql:"create_following"`
|
|
DeleteFollowing *sqlx.Stmt `yesql:"delete_following"`
|
|
ExistFollowing *sqlx.Stmt `yesql:"exist_following"`
|
|
ListFollowings *sqlx.Stmt `yesql:"list_followings"`
|
|
ListFollows *sqlx.Stmt `yesql:"list_follows"`
|
|
}
|
|
|
|
type Message struct {
|
|
yesql.Namespace `yesql:"message"`
|
|
GetMessageById *sqlx.Stmt `yesql:"get_message_by_id"`
|
|
GetUnreadCount *sqlx.Stmt `yesql:"get_unread_count"`
|
|
ReadMessage *sqlx.Stmt `yesql:"read_message"`
|
|
CreateMessage *sqlx.NamedStmt `yesql:"create_message"`
|
|
GetMessageCount *sqlx.NamedStmt `yesql:"get_message_count"`
|
|
GetMessages *sqlx.NamedStmt `yesql:"get_messages"`
|
|
}
|
|
|
|
type Security struct {
|
|
yesql.Namespace `yesql:"security"`
|
|
GetLatestPhoneCaptcha *sqlx.Stmt `yesql:"get_latest_phone_captcha"`
|
|
UsePhoneCaptcha *sqlx.Stmt `yesql:"use_phone_captcha"`
|
|
CreatePhoneCaptcha *sqlx.NamedStmt `yesql:"create_phone_captcha"`
|
|
}
|
|
|
|
type ShipIndex struct {
|
|
yesql.Namespace `yesql:"ship_index"`
|
|
IndexBySelf string `yesql:"index_by_self"`
|
|
IndexCountBySelf string `yesql:"index_count_by_self"`
|
|
IndexByAdmin *sqlx.Stmt `yesql:"index_by_admin"`
|
|
IndexByGuest *sqlx.Stmt `yesql:"index_by_guest"`
|
|
IndexCountByAdmin *sqlx.Stmt `yesql:"index_count_by_admin"`
|
|
IndexCountByGuest *sqlx.Stmt `yesql:"index_count_by_guest"`
|
|
}
|
|
|
|
type ShipIndexA struct {
|
|
yesql.Namespace `yesql:"ship_index_a"`
|
|
UserInfo string `yesql:"user_info"`
|
|
}
|
|
|
|
type SimpleIndex struct {
|
|
yesql.Namespace `yesql:"simple_index"`
|
|
Index *sqlx.Stmt `yesql:"index"`
|
|
IndexCount *sqlx.Stmt `yesql:"index_count"`
|
|
}
|
|
|
|
type SimpleIndexA struct {
|
|
yesql.Namespace `yesql:"simple_index_a"`
|
|
UserInfo string `yesql:"user_info"`
|
|
}
|
|
|
|
type TopicA struct {
|
|
yesql.Namespace `yesql:"topic_a"`
|
|
DecrTagsById string `yesql:"decr_tags_by_id"`
|
|
IncrTagsById string `yesql:"incr_tags_by_id"`
|
|
TagsByIdA string `yesql:"tags_by_id_a"`
|
|
TagsByIdB string `yesql:"tags_by_id_b"`
|
|
TagsForIncr string `yesql:"tags_for_incr"`
|
|
HotTags *sqlx.Stmt `yesql:"hot_tags"`
|
|
InsertTag *sqlx.Stmt `yesql:"insert_tag"`
|
|
NewestTags *sqlx.Stmt `yesql:"newest_tags"`
|
|
TagsByKeywordA *sqlx.Stmt `yesql:"tags_by_keyword_a"`
|
|
TagsByKeywordB *sqlx.Stmt `yesql:"tags_by_keyword_b"`
|
|
}
|
|
|
|
type Tweet struct {
|
|
yesql.Namespace `yesql:"tweet"`
|
|
GetAnyPostCount string `yesql:"get_any_post_count"`
|
|
GetAnyPosts string `yesql:"get_any_posts"`
|
|
GetPostContentsByIds string `yesql:"get_post_contents_by_ids"`
|
|
GetUserPostCount string `yesql:"get_user_post_count"`
|
|
GetUserPosts string `yesql:"get_user_posts"`
|
|
GetPostAttachmentBill *sqlx.Stmt `yesql:"get_post_attachment_bill"`
|
|
GetPostById *sqlx.Stmt `yesql:"get_post_by_id"`
|
|
GetPostContentById *sqlx.Stmt `yesql:"get_post_content_by_id"`
|
|
GetUserPostCollection *sqlx.Stmt `yesql:"get_user_post_collection"`
|
|
GetUserPostCollectionCount *sqlx.Stmt `yesql:"get_user_post_collection_count"`
|
|
GetUserPostCollections *sqlx.Stmt `yesql:"get_user_post_collections"`
|
|
GetUserPostStar *sqlx.Stmt `yesql:"get_user_post_star"`
|
|
GetUserPostStarCount *sqlx.Stmt `yesql:"get_user_post_star_count"`
|
|
GetUserPostStars *sqlx.Stmt `yesql:"get_user_post_stars"`
|
|
UserCommentTweetsByFriend *sqlx.Stmt `yesql:"user_comment_tweets_by_friend"`
|
|
UserCommentTweetsByGuest *sqlx.Stmt `yesql:"user_comment_tweets_by_guest"`
|
|
UserCommentTweetsBySelf *sqlx.Stmt `yesql:"user_comment_tweets_by_self"`
|
|
UserCommentTweetsCountByFriend *sqlx.Stmt `yesql:"user_comment_tweets_count_by_friend"`
|
|
UserCommentTweetsCountByGuest *sqlx.Stmt `yesql:"user_comment_tweets_count_by_guest"`
|
|
UserCommentTweetsCountBySelf *sqlx.Stmt `yesql:"user_comment_tweets_count_by_self"`
|
|
UserMediaTweetsByFriend *sqlx.Stmt `yesql:"user_media_tweets_by_friend"`
|
|
UserMediaTweetsByGuest *sqlx.Stmt `yesql:"user_media_tweets_by_guest"`
|
|
UserMediaTweetsBySelf *sqlx.Stmt `yesql:"user_media_tweets_by_self"`
|
|
UserMediaTweetsCountByFriend *sqlx.Stmt `yesql:"user_media_tweets_count_by_friend"`
|
|
UserMediaTweetsCountByGuest *sqlx.Stmt `yesql:"user_media_tweets_count_by_guest"`
|
|
UserMediaTweetsCountBySelf *sqlx.Stmt `yesql:"user_media_tweets_count_by_self"`
|
|
UserStarTweetsByAdmin *sqlx.Stmt `yesql:"user_star_tweets_by_admin"`
|
|
UserStarTweetsByFriend *sqlx.Stmt `yesql:"user_star_tweets_by_friend"`
|
|
UserStarTweetsByGuest *sqlx.Stmt `yesql:"user_star_tweets_by_guest"`
|
|
UserStarTweetsBySelf *sqlx.Stmt `yesql:"user_star_tweets_by_self"`
|
|
UserStarTweetsCountByAdmin *sqlx.Stmt `yesql:"user_star_tweets_count_by_admin"`
|
|
UserStarTweetsCountByFriend *sqlx.Stmt `yesql:"user_star_tweets_count_by_friend"`
|
|
UserStarTweetsCountByGuest *sqlx.Stmt `yesql:"user_star_tweets_count_by_guest"`
|
|
UserStarTweetsCountBySelf *sqlx.Stmt `yesql:"user_star_tweets_count_by_self"`
|
|
}
|
|
|
|
type TweetA struct {
|
|
yesql.Namespace `yesql:"tweet_a"`
|
|
AttachmentByTweetId string `yesql:"attachment_by_tweet_id"`
|
|
FavoriteByTweetId string `yesql:"favorite_by_tweet_id"`
|
|
ReactionByTweetId string `yesql:"reaction_by_tweet_id"`
|
|
TweetInfoById string `yesql:"tweet_info_by_id"`
|
|
TweetItemById string `yesql:"tweet_item_by_id"`
|
|
UserFavorites string `yesql:"user_favorites"`
|
|
UserInfo string `yesql:"user_info"`
|
|
UserReactions string `yesql:"user_reactions"`
|
|
UserTweetsByAdmin string `yesql:"user_tweets_by_admin"`
|
|
UserTweetsByFriend string `yesql:"user_tweets_by_friend"`
|
|
UserTweetsByGuest string `yesql:"user_tweets_by_guest"`
|
|
UserTweetsBySelf string `yesql:"user_tweets_by_self"`
|
|
}
|
|
|
|
type TweetHelp struct {
|
|
yesql.Namespace `yesql:"tweet_help"`
|
|
GetPostContentByIds string `yesql:"get_post_content_by_ids"`
|
|
GetUsersByIds string `yesql:"get_users_by_ids"`
|
|
}
|
|
|
|
type TweetHelpA struct {
|
|
yesql.Namespace `yesql:"tweet_help_a"`
|
|
UserInfo string `yesql:"user_info"`
|
|
}
|
|
|
|
type TweetManage struct {
|
|
yesql.Namespace `yesql:"tweet_manage"`
|
|
CommentMediaFromCommentIds string `yesql:"comment_media_from_comment_ids"`
|
|
DelCommentContentByCommentIds string `yesql:"del_comment_content_by_comment_ids"`
|
|
DelReplyByCommentIds string `yesql:"del_reply_by_comment_ids"`
|
|
AddAttachment *sqlx.Stmt `yesql:"add_attachment"`
|
|
AddPostCollection *sqlx.Stmt `yesql:"add_post_collection"`
|
|
AddPostStar *sqlx.Stmt `yesql:"add_post_star"`
|
|
CommentIdsByPostId *sqlx.Stmt `yesql:"comment_ids_by_post_id"`
|
|
DelCommentByPostId *sqlx.Stmt `yesql:"del_comment_by_post_id"`
|
|
DelPostById *sqlx.Stmt `yesql:"del_post_by_id"`
|
|
DelPostCollection *sqlx.Stmt `yesql:"del_post_collection"`
|
|
DelPostStar *sqlx.Stmt `yesql:"del_post_star"`
|
|
HighlightPost *sqlx.Stmt `yesql:"highlight_post"`
|
|
LockPost *sqlx.Stmt `yesql:"lock_post"`
|
|
MediaContentByPostId *sqlx.Stmt `yesql:"media_content_by_post_id"`
|
|
PostHighlightStatus *sqlx.Stmt `yesql:"post_highlight_status"`
|
|
StickPost *sqlx.Stmt `yesql:"stick_post"`
|
|
VisiblePost *sqlx.Stmt `yesql:"visible_post"`
|
|
AddPost *sqlx.NamedStmt `yesql:"add_post"`
|
|
AddPostContent *sqlx.NamedStmt `yesql:"add_post_content"`
|
|
UpdatePost *sqlx.NamedStmt `yesql:"update_post"`
|
|
}
|
|
|
|
type TweetManageA struct {
|
|
yesql.Namespace `yesql:"tweet_manage_a"`
|
|
UserInfo string `yesql:"user_info"`
|
|
}
|
|
|
|
type UserManage struct {
|
|
yesql.Namespace `yesql:"user_manage"`
|
|
GetUsersByIds string `yesql:"get_users_by_ids"`
|
|
GetAnyUsers *sqlx.Stmt `yesql:"get_any_users"`
|
|
GetUserById *sqlx.Stmt `yesql:"get_user_by_id"`
|
|
GetUserByPhone *sqlx.Stmt `yesql:"get_user_by_phone"`
|
|
GetUserByUsername *sqlx.Stmt `yesql:"get_user_by_username"`
|
|
GetUsersByKeyword *sqlx.Stmt `yesql:"get_users_by_keyword"`
|
|
CreateUser *sqlx.NamedStmt `yesql:"create_user"`
|
|
UpdateUser *sqlx.NamedStmt `yesql:"update_user"`
|
|
}
|
|
|
|
type Wallet struct {
|
|
yesql.Namespace `yesql:"wallet"`
|
|
AddUserBalance *sqlx.Stmt `yesql:"add_user_balance"`
|
|
CreateRecharge *sqlx.Stmt `yesql:"create_recharge"`
|
|
CreateWalletStatement *sqlx.Stmt `yesql:"create_wallet_statement"`
|
|
GetRechargeById *sqlx.Stmt `yesql:"get_recharge_by_id"`
|
|
GetUserBalance *sqlx.Stmt `yesql:"get_user_balance"`
|
|
GetUserByUid *sqlx.Stmt `yesql:"get_user_by_uid"`
|
|
GetUserWalletBillCount *sqlx.Stmt `yesql:"get_user_wallet_bill_count"`
|
|
GetUserWalletBills *sqlx.Stmt `yesql:"get_user_wallet_bills"`
|
|
MarkSuccessRecharge *sqlx.Stmt `yesql:"mark_success_recharge"`
|
|
MinusUserBalance *sqlx.Stmt `yesql:"minus_user_balance"`
|
|
NewPostAttachmentBill *sqlx.Stmt `yesql:"new_post_attachment_bill"`
|
|
NewPostBill *sqlx.Stmt `yesql:"new_post_bill"`
|
|
}
|
|
|
|
func BuildYesql(p PreparexBuilder, ctx ...context.Context) (obj *Yesql, err error) {
|
|
var c context.Context
|
|
if len(ctx) > 0 && ctx[0] != nil {
|
|
c = ctx[0]
|
|
} else {
|
|
c = context.Background()
|
|
}
|
|
obj = &Yesql{
|
|
TagsFromNames: p.QueryHook(_TagsFromNames),
|
|
}
|
|
if obj.UpdateTagQuote, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_UpdateTagQuote))); err != nil {
|
|
return
|
|
}
|
|
return
|
|
}
|
|
|
|
func BuildAuthorizationManage(p PreparexBuilder, ctx ...context.Context) (obj *AuthorizationManage, err error) {
|
|
var c context.Context
|
|
if len(ctx) > 0 && ctx[0] != nil {
|
|
c = ctx[0]
|
|
} else {
|
|
c = context.Background()
|
|
}
|
|
obj = &AuthorizationManage{}
|
|
if obj.BeFriendIds, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_AuthorizationManage_BeFriendIds))); err != nil {
|
|
return
|
|
}
|
|
if obj.IsFriend, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_AuthorizationManage_IsFriend))); err != nil {
|
|
return
|
|
}
|
|
if obj.MyFriendSet, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_AuthorizationManage_MyFriendSet))); err != nil {
|
|
return
|
|
}
|
|
return
|
|
}
|
|
|
|
func BuildComment(p PreparexBuilder, ctx ...context.Context) (obj *Comment, err error) {
|
|
var c context.Context
|
|
if len(ctx) > 0 && ctx[0] != nil {
|
|
c = ctx[0]
|
|
} else {
|
|
c = context.Background()
|
|
}
|
|
obj = &Comment{
|
|
GetCommentContentsByIds: p.QueryHook(_Comment_GetCommentContentsByIds),
|
|
GetComments: p.QueryHook(_Comment_GetComments),
|
|
GetCommmentRepliesByIds: p.QueryHook(_Comment_GetCommmentRepliesByIds),
|
|
GetUsersByIds: p.QueryHook(_Comment_GetUsersByIds),
|
|
}
|
|
if obj.GetCommentById, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_Comment_GetCommentById))); err != nil {
|
|
return
|
|
}
|
|
if obj.GetCommentReplyById, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_Comment_GetCommentReplyById))); err != nil {
|
|
return
|
|
}
|
|
if obj.GetCommentThumbs, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_Comment_GetCommentThumbs))); err != nil {
|
|
return
|
|
}
|
|
if obj.GetCommentCount, err = p.PrepareNamedContext(c, p.Rebind(p.QueryHook(_Comment_GetCommentCount))); err != nil {
|
|
return
|
|
}
|
|
return
|
|
}
|
|
|
|
func BuildCommentManage(p PreparexBuilder, ctx ...context.Context) (obj *CommentManage, err error) {
|
|
var c context.Context
|
|
if len(ctx) > 0 && ctx[0] != nil {
|
|
c = ctx[0]
|
|
} else {
|
|
c = context.Background()
|
|
}
|
|
obj = &CommentManage{}
|
|
if obj.CreateComment, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_CommentManage_CreateComment))); err != nil {
|
|
return
|
|
}
|
|
if obj.CreateCommentContent, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_CommentManage_CreateCommentContent))); err != nil {
|
|
return
|
|
}
|
|
if obj.CreateCommentReply, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_CommentManage_CreateCommentReply))); err != nil {
|
|
return
|
|
}
|
|
if obj.DeleteComment, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_CommentManage_DeleteComment))); err != nil {
|
|
return
|
|
}
|
|
if obj.DeleteCommentReply, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_CommentManage_DeleteCommentReply))); err != nil {
|
|
return
|
|
}
|
|
if obj.DeleteCommentThumbs, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_CommentManage_DeleteCommentThumbs))); err != nil {
|
|
return
|
|
}
|
|
if obj.DeleteReplyThumbs, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_CommentManage_DeleteReplyThumbs))); err != nil {
|
|
return
|
|
}
|
|
if obj.GetCommentReplyThumb, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_CommentManage_GetCommentReplyThumb))); err != nil {
|
|
return
|
|
}
|
|
if obj.GetTweetCommentThumb, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_CommentManage_GetTweetCommentThumb))); err != nil {
|
|
return
|
|
}
|
|
if obj.UpdateCommentThumbsCount, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_CommentManage_UpdateCommentThumbsCount))); err != nil {
|
|
return
|
|
}
|
|
if obj.UpdateReplyThumbsCount, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_CommentManage_UpdateReplyThumbsCount))); err != nil {
|
|
return
|
|
}
|
|
if obj.CreateThumbsUpdownComment, err = p.PrepareNamedContext(c, p.Rebind(p.QueryHook(_CommentManage_CreateThumbsUpdownComment))); err != nil {
|
|
return
|
|
}
|
|
if obj.UpdateThumbsUpdownComment, err = p.PrepareNamedContext(c, p.Rebind(p.QueryHook(_CommentManage_UpdateThumbsUpdownComment))); err != nil {
|
|
return
|
|
}
|
|
return
|
|
}
|
|
|
|
func BuildContactManager(p PreparexBuilder, ctx ...context.Context) (obj *ContactManager, err error) {
|
|
var c context.Context
|
|
if len(ctx) > 0 && ctx[0] != nil {
|
|
c = ctx[0]
|
|
} else {
|
|
c = context.Background()
|
|
}
|
|
obj = &ContactManager{}
|
|
if obj.AddFriendMsgsUpdate, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_ContactManager_AddFriendMsgsUpdate))); err != nil {
|
|
return
|
|
}
|
|
if obj.CreateContact, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_ContactManager_CreateContact))); err != nil {
|
|
return
|
|
}
|
|
if obj.DelFriend, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_ContactManager_DelFriend))); err != nil {
|
|
return
|
|
}
|
|
if obj.FreshContactStatus, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_ContactManager_FreshContactStatus))); err != nil {
|
|
return
|
|
}
|
|
if obj.GetContact, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_ContactManager_GetContact))); err != nil {
|
|
return
|
|
}
|
|
if obj.GetContacts, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_ContactManager_GetContacts))); err != nil {
|
|
return
|
|
}
|
|
if obj.GetUserFriend, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_ContactManager_GetUserFriend))); err != nil {
|
|
return
|
|
}
|
|
if obj.IsFriend, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_ContactManager_IsFriend))); err != nil {
|
|
return
|
|
}
|
|
if obj.ListFriend, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_ContactManager_ListFriend))); err != nil {
|
|
return
|
|
}
|
|
if obj.RejectFriendMsgsUpdate, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_ContactManager_RejectFriendMsgsUpdate))); err != nil {
|
|
return
|
|
}
|
|
if obj.TotalFriendsById, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_ContactManager_TotalFriendsById))); err != nil {
|
|
return
|
|
}
|
|
if obj.CreateMessage, err = p.PrepareNamedContext(c, p.Rebind(p.QueryHook(_ContactManager_CreateMessage))); err != nil {
|
|
return
|
|
}
|
|
return
|
|
}
|
|
|
|
func BuildFollowingManager(p PreparexBuilder, ctx ...context.Context) (obj *FollowingManager, err error) {
|
|
var c context.Context
|
|
if len(ctx) > 0 && ctx[0] != nil {
|
|
c = ctx[0]
|
|
} else {
|
|
c = context.Background()
|
|
}
|
|
obj = &FollowingManager{}
|
|
if obj.CountFollowings, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_FollowingManager_CountFollowings))); err != nil {
|
|
return
|
|
}
|
|
if obj.CountFollows, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_FollowingManager_CountFollows))); err != nil {
|
|
return
|
|
}
|
|
if obj.CreateFollowing, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_FollowingManager_CreateFollowing))); err != nil {
|
|
return
|
|
}
|
|
if obj.DeleteFollowing, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_FollowingManager_DeleteFollowing))); err != nil {
|
|
return
|
|
}
|
|
if obj.ExistFollowing, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_FollowingManager_ExistFollowing))); err != nil {
|
|
return
|
|
}
|
|
if obj.ListFollowings, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_FollowingManager_ListFollowings))); err != nil {
|
|
return
|
|
}
|
|
if obj.ListFollows, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_FollowingManager_ListFollows))); err != nil {
|
|
return
|
|
}
|
|
return
|
|
}
|
|
|
|
func BuildMessage(p PreparexBuilder, ctx ...context.Context) (obj *Message, err error) {
|
|
var c context.Context
|
|
if len(ctx) > 0 && ctx[0] != nil {
|
|
c = ctx[0]
|
|
} else {
|
|
c = context.Background()
|
|
}
|
|
obj = &Message{}
|
|
if obj.GetMessageById, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_Message_GetMessageById))); err != nil {
|
|
return
|
|
}
|
|
if obj.GetUnreadCount, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_Message_GetUnreadCount))); err != nil {
|
|
return
|
|
}
|
|
if obj.ReadMessage, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_Message_ReadMessage))); err != nil {
|
|
return
|
|
}
|
|
if obj.CreateMessage, err = p.PrepareNamedContext(c, p.Rebind(p.QueryHook(_Message_CreateMessage))); err != nil {
|
|
return
|
|
}
|
|
if obj.GetMessageCount, err = p.PrepareNamedContext(c, p.Rebind(p.QueryHook(_Message_GetMessageCount))); err != nil {
|
|
return
|
|
}
|
|
if obj.GetMessages, err = p.PrepareNamedContext(c, p.Rebind(p.QueryHook(_Message_GetMessages))); err != nil {
|
|
return
|
|
}
|
|
return
|
|
}
|
|
|
|
func BuildSecurity(p PreparexBuilder, ctx ...context.Context) (obj *Security, err error) {
|
|
var c context.Context
|
|
if len(ctx) > 0 && ctx[0] != nil {
|
|
c = ctx[0]
|
|
} else {
|
|
c = context.Background()
|
|
}
|
|
obj = &Security{}
|
|
if obj.GetLatestPhoneCaptcha, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_Security_GetLatestPhoneCaptcha))); err != nil {
|
|
return
|
|
}
|
|
if obj.UsePhoneCaptcha, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_Security_UsePhoneCaptcha))); err != nil {
|
|
return
|
|
}
|
|
if obj.CreatePhoneCaptcha, err = p.PrepareNamedContext(c, p.Rebind(p.QueryHook(_Security_CreatePhoneCaptcha))); err != nil {
|
|
return
|
|
}
|
|
return
|
|
}
|
|
|
|
func BuildShipIndex(p PreparexBuilder, ctx ...context.Context) (obj *ShipIndex, err error) {
|
|
var c context.Context
|
|
if len(ctx) > 0 && ctx[0] != nil {
|
|
c = ctx[0]
|
|
} else {
|
|
c = context.Background()
|
|
}
|
|
obj = &ShipIndex{
|
|
IndexBySelf: p.QueryHook(_ShipIndex_IndexBySelf),
|
|
IndexCountBySelf: p.QueryHook(_ShipIndex_IndexCountBySelf),
|
|
}
|
|
if obj.IndexByAdmin, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_ShipIndex_IndexByAdmin))); err != nil {
|
|
return
|
|
}
|
|
if obj.IndexByGuest, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_ShipIndex_IndexByGuest))); err != nil {
|
|
return
|
|
}
|
|
if obj.IndexCountByAdmin, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_ShipIndex_IndexCountByAdmin))); err != nil {
|
|
return
|
|
}
|
|
if obj.IndexCountByGuest, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_ShipIndex_IndexCountByGuest))); err != nil {
|
|
return
|
|
}
|
|
return
|
|
}
|
|
|
|
func BuildShipIndexA(p PreparexBuilder) (obj *ShipIndexA, err error) {
|
|
obj = &ShipIndexA{
|
|
UserInfo: p.QueryHook(_ShipIndexA_UserInfo),
|
|
}
|
|
return
|
|
}
|
|
|
|
func BuildSimpleIndex(p PreparexBuilder, ctx ...context.Context) (obj *SimpleIndex, err error) {
|
|
var c context.Context
|
|
if len(ctx) > 0 && ctx[0] != nil {
|
|
c = ctx[0]
|
|
} else {
|
|
c = context.Background()
|
|
}
|
|
obj = &SimpleIndex{}
|
|
if obj.Index, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_SimpleIndex_Index))); err != nil {
|
|
return
|
|
}
|
|
if obj.IndexCount, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_SimpleIndex_IndexCount))); err != nil {
|
|
return
|
|
}
|
|
return
|
|
}
|
|
|
|
func BuildSimpleIndexA(p PreparexBuilder) (obj *SimpleIndexA, err error) {
|
|
obj = &SimpleIndexA{
|
|
UserInfo: p.QueryHook(_SimpleIndexA_UserInfo),
|
|
}
|
|
return
|
|
}
|
|
|
|
func BuildTopicA(p PreparexBuilder, ctx ...context.Context) (obj *TopicA, err error) {
|
|
var c context.Context
|
|
if len(ctx) > 0 && ctx[0] != nil {
|
|
c = ctx[0]
|
|
} else {
|
|
c = context.Background()
|
|
}
|
|
obj = &TopicA{
|
|
DecrTagsById: p.QueryHook(_TopicA_DecrTagsById),
|
|
IncrTagsById: p.QueryHook(_TopicA_IncrTagsById),
|
|
TagsByIdA: p.QueryHook(_TopicA_TagsByIdA),
|
|
TagsByIdB: p.QueryHook(_TopicA_TagsByIdB),
|
|
TagsForIncr: p.QueryHook(_TopicA_TagsForIncr),
|
|
}
|
|
if obj.HotTags, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_TopicA_HotTags))); err != nil {
|
|
return
|
|
}
|
|
if obj.InsertTag, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_TopicA_InsertTag))); err != nil {
|
|
return
|
|
}
|
|
if obj.NewestTags, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_TopicA_NewestTags))); err != nil {
|
|
return
|
|
}
|
|
if obj.TagsByKeywordA, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_TopicA_TagsByKeywordA))); err != nil {
|
|
return
|
|
}
|
|
if obj.TagsByKeywordB, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_TopicA_TagsByKeywordB))); err != nil {
|
|
return
|
|
}
|
|
return
|
|
}
|
|
|
|
func BuildTweet(p PreparexBuilder, ctx ...context.Context) (obj *Tweet, err error) {
|
|
var c context.Context
|
|
if len(ctx) > 0 && ctx[0] != nil {
|
|
c = ctx[0]
|
|
} else {
|
|
c = context.Background()
|
|
}
|
|
obj = &Tweet{
|
|
GetAnyPostCount: p.QueryHook(_Tweet_GetAnyPostCount),
|
|
GetAnyPosts: p.QueryHook(_Tweet_GetAnyPosts),
|
|
GetPostContentsByIds: p.QueryHook(_Tweet_GetPostContentsByIds),
|
|
GetUserPostCount: p.QueryHook(_Tweet_GetUserPostCount),
|
|
GetUserPosts: p.QueryHook(_Tweet_GetUserPosts),
|
|
}
|
|
if obj.GetPostAttachmentBill, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_Tweet_GetPostAttachmentBill))); err != nil {
|
|
return
|
|
}
|
|
if obj.GetPostById, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_Tweet_GetPostById))); err != nil {
|
|
return
|
|
}
|
|
if obj.GetPostContentById, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_Tweet_GetPostContentById))); err != nil {
|
|
return
|
|
}
|
|
if obj.GetUserPostCollection, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_Tweet_GetUserPostCollection))); err != nil {
|
|
return
|
|
}
|
|
if obj.GetUserPostCollectionCount, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_Tweet_GetUserPostCollectionCount))); err != nil {
|
|
return
|
|
}
|
|
if obj.GetUserPostCollections, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_Tweet_GetUserPostCollections))); err != nil {
|
|
return
|
|
}
|
|
if obj.GetUserPostStar, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_Tweet_GetUserPostStar))); err != nil {
|
|
return
|
|
}
|
|
if obj.GetUserPostStarCount, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_Tweet_GetUserPostStarCount))); err != nil {
|
|
return
|
|
}
|
|
if obj.GetUserPostStars, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_Tweet_GetUserPostStars))); err != nil {
|
|
return
|
|
}
|
|
if obj.UserCommentTweetsByFriend, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_Tweet_UserCommentTweetsByFriend))); err != nil {
|
|
return
|
|
}
|
|
if obj.UserCommentTweetsByGuest, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_Tweet_UserCommentTweetsByGuest))); err != nil {
|
|
return
|
|
}
|
|
if obj.UserCommentTweetsBySelf, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_Tweet_UserCommentTweetsBySelf))); err != nil {
|
|
return
|
|
}
|
|
if obj.UserCommentTweetsCountByFriend, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_Tweet_UserCommentTweetsCountByFriend))); err != nil {
|
|
return
|
|
}
|
|
if obj.UserCommentTweetsCountByGuest, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_Tweet_UserCommentTweetsCountByGuest))); err != nil {
|
|
return
|
|
}
|
|
if obj.UserCommentTweetsCountBySelf, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_Tweet_UserCommentTweetsCountBySelf))); err != nil {
|
|
return
|
|
}
|
|
if obj.UserMediaTweetsByFriend, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_Tweet_UserMediaTweetsByFriend))); err != nil {
|
|
return
|
|
}
|
|
if obj.UserMediaTweetsByGuest, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_Tweet_UserMediaTweetsByGuest))); err != nil {
|
|
return
|
|
}
|
|
if obj.UserMediaTweetsBySelf, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_Tweet_UserMediaTweetsBySelf))); err != nil {
|
|
return
|
|
}
|
|
if obj.UserMediaTweetsCountByFriend, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_Tweet_UserMediaTweetsCountByFriend))); err != nil {
|
|
return
|
|
}
|
|
if obj.UserMediaTweetsCountByGuest, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_Tweet_UserMediaTweetsCountByGuest))); err != nil {
|
|
return
|
|
}
|
|
if obj.UserMediaTweetsCountBySelf, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_Tweet_UserMediaTweetsCountBySelf))); err != nil {
|
|
return
|
|
}
|
|
if obj.UserStarTweetsByAdmin, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_Tweet_UserStarTweetsByAdmin))); err != nil {
|
|
return
|
|
}
|
|
if obj.UserStarTweetsByFriend, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_Tweet_UserStarTweetsByFriend))); err != nil {
|
|
return
|
|
}
|
|
if obj.UserStarTweetsByGuest, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_Tweet_UserStarTweetsByGuest))); err != nil {
|
|
return
|
|
}
|
|
if obj.UserStarTweetsBySelf, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_Tweet_UserStarTweetsBySelf))); err != nil {
|
|
return
|
|
}
|
|
if obj.UserStarTweetsCountByAdmin, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_Tweet_UserStarTweetsCountByAdmin))); err != nil {
|
|
return
|
|
}
|
|
if obj.UserStarTweetsCountByFriend, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_Tweet_UserStarTweetsCountByFriend))); err != nil {
|
|
return
|
|
}
|
|
if obj.UserStarTweetsCountByGuest, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_Tweet_UserStarTweetsCountByGuest))); err != nil {
|
|
return
|
|
}
|
|
if obj.UserStarTweetsCountBySelf, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_Tweet_UserStarTweetsCountBySelf))); err != nil {
|
|
return
|
|
}
|
|
return
|
|
}
|
|
|
|
func BuildTweetA(p PreparexBuilder) (obj *TweetA, err error) {
|
|
obj = &TweetA{
|
|
AttachmentByTweetId: p.QueryHook(_TweetA_AttachmentByTweetId),
|
|
FavoriteByTweetId: p.QueryHook(_TweetA_FavoriteByTweetId),
|
|
ReactionByTweetId: p.QueryHook(_TweetA_ReactionByTweetId),
|
|
TweetInfoById: p.QueryHook(_TweetA_TweetInfoById),
|
|
TweetItemById: p.QueryHook(_TweetA_TweetItemById),
|
|
UserFavorites: p.QueryHook(_TweetA_UserFavorites),
|
|
UserInfo: p.QueryHook(_TweetA_UserInfo),
|
|
UserReactions: p.QueryHook(_TweetA_UserReactions),
|
|
UserTweetsByAdmin: p.QueryHook(_TweetA_UserTweetsByAdmin),
|
|
UserTweetsByFriend: p.QueryHook(_TweetA_UserTweetsByFriend),
|
|
UserTweetsByGuest: p.QueryHook(_TweetA_UserTweetsByGuest),
|
|
UserTweetsBySelf: p.QueryHook(_TweetA_UserTweetsBySelf),
|
|
}
|
|
return
|
|
}
|
|
|
|
func BuildTweetHelp(p PreparexBuilder) (obj *TweetHelp, err error) {
|
|
obj = &TweetHelp{
|
|
GetPostContentByIds: p.QueryHook(_TweetHelp_GetPostContentByIds),
|
|
GetUsersByIds: p.QueryHook(_TweetHelp_GetUsersByIds),
|
|
}
|
|
return
|
|
}
|
|
|
|
func BuildTweetHelpA(p PreparexBuilder) (obj *TweetHelpA, err error) {
|
|
obj = &TweetHelpA{
|
|
UserInfo: p.QueryHook(_TweetHelpA_UserInfo),
|
|
}
|
|
return
|
|
}
|
|
|
|
func BuildTweetManage(p PreparexBuilder, ctx ...context.Context) (obj *TweetManage, err error) {
|
|
var c context.Context
|
|
if len(ctx) > 0 && ctx[0] != nil {
|
|
c = ctx[0]
|
|
} else {
|
|
c = context.Background()
|
|
}
|
|
obj = &TweetManage{
|
|
CommentMediaFromCommentIds: p.QueryHook(_TweetManage_CommentMediaFromCommentIds),
|
|
DelCommentContentByCommentIds: p.QueryHook(_TweetManage_DelCommentContentByCommentIds),
|
|
DelReplyByCommentIds: p.QueryHook(_TweetManage_DelReplyByCommentIds),
|
|
}
|
|
if obj.AddAttachment, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_TweetManage_AddAttachment))); err != nil {
|
|
return
|
|
}
|
|
if obj.AddPostCollection, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_TweetManage_AddPostCollection))); err != nil {
|
|
return
|
|
}
|
|
if obj.AddPostStar, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_TweetManage_AddPostStar))); err != nil {
|
|
return
|
|
}
|
|
if obj.CommentIdsByPostId, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_TweetManage_CommentIdsByPostId))); err != nil {
|
|
return
|
|
}
|
|
if obj.DelCommentByPostId, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_TweetManage_DelCommentByPostId))); err != nil {
|
|
return
|
|
}
|
|
if obj.DelPostById, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_TweetManage_DelPostById))); err != nil {
|
|
return
|
|
}
|
|
if obj.DelPostCollection, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_TweetManage_DelPostCollection))); err != nil {
|
|
return
|
|
}
|
|
if obj.DelPostStar, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_TweetManage_DelPostStar))); err != nil {
|
|
return
|
|
}
|
|
if obj.HighlightPost, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_TweetManage_HighlightPost))); err != nil {
|
|
return
|
|
}
|
|
if obj.LockPost, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_TweetManage_LockPost))); err != nil {
|
|
return
|
|
}
|
|
if obj.MediaContentByPostId, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_TweetManage_MediaContentByPostId))); err != nil {
|
|
return
|
|
}
|
|
if obj.PostHighlightStatus, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_TweetManage_PostHighlightStatus))); err != nil {
|
|
return
|
|
}
|
|
if obj.StickPost, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_TweetManage_StickPost))); err != nil {
|
|
return
|
|
}
|
|
if obj.VisiblePost, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_TweetManage_VisiblePost))); err != nil {
|
|
return
|
|
}
|
|
if obj.AddPost, err = p.PrepareNamedContext(c, p.Rebind(p.QueryHook(_TweetManage_AddPost))); err != nil {
|
|
return
|
|
}
|
|
if obj.AddPostContent, err = p.PrepareNamedContext(c, p.Rebind(p.QueryHook(_TweetManage_AddPostContent))); err != nil {
|
|
return
|
|
}
|
|
if obj.UpdatePost, err = p.PrepareNamedContext(c, p.Rebind(p.QueryHook(_TweetManage_UpdatePost))); err != nil {
|
|
return
|
|
}
|
|
return
|
|
}
|
|
|
|
func BuildTweetManageA(p PreparexBuilder) (obj *TweetManageA, err error) {
|
|
obj = &TweetManageA{
|
|
UserInfo: p.QueryHook(_TweetManageA_UserInfo),
|
|
}
|
|
return
|
|
}
|
|
|
|
func BuildUserManage(p PreparexBuilder, ctx ...context.Context) (obj *UserManage, err error) {
|
|
var c context.Context
|
|
if len(ctx) > 0 && ctx[0] != nil {
|
|
c = ctx[0]
|
|
} else {
|
|
c = context.Background()
|
|
}
|
|
obj = &UserManage{
|
|
GetUsersByIds: p.QueryHook(_UserManage_GetUsersByIds),
|
|
}
|
|
if obj.GetAnyUsers, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_UserManage_GetAnyUsers))); err != nil {
|
|
return
|
|
}
|
|
if obj.GetUserById, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_UserManage_GetUserById))); err != nil {
|
|
return
|
|
}
|
|
if obj.GetUserByPhone, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_UserManage_GetUserByPhone))); err != nil {
|
|
return
|
|
}
|
|
if obj.GetUserByUsername, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_UserManage_GetUserByUsername))); err != nil {
|
|
return
|
|
}
|
|
if obj.GetUsersByKeyword, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_UserManage_GetUsersByKeyword))); err != nil {
|
|
return
|
|
}
|
|
if obj.CreateUser, err = p.PrepareNamedContext(c, p.Rebind(p.QueryHook(_UserManage_CreateUser))); err != nil {
|
|
return
|
|
}
|
|
if obj.UpdateUser, err = p.PrepareNamedContext(c, p.Rebind(p.QueryHook(_UserManage_UpdateUser))); err != nil {
|
|
return
|
|
}
|
|
return
|
|
}
|
|
|
|
func BuildWallet(p PreparexBuilder, ctx ...context.Context) (obj *Wallet, err error) {
|
|
var c context.Context
|
|
if len(ctx) > 0 && ctx[0] != nil {
|
|
c = ctx[0]
|
|
} else {
|
|
c = context.Background()
|
|
}
|
|
obj = &Wallet{}
|
|
if obj.AddUserBalance, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_Wallet_AddUserBalance))); err != nil {
|
|
return
|
|
}
|
|
if obj.CreateRecharge, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_Wallet_CreateRecharge))); err != nil {
|
|
return
|
|
}
|
|
if obj.CreateWalletStatement, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_Wallet_CreateWalletStatement))); err != nil {
|
|
return
|
|
}
|
|
if obj.GetRechargeById, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_Wallet_GetRechargeById))); err != nil {
|
|
return
|
|
}
|
|
if obj.GetUserBalance, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_Wallet_GetUserBalance))); err != nil {
|
|
return
|
|
}
|
|
if obj.GetUserByUid, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_Wallet_GetUserByUid))); err != nil {
|
|
return
|
|
}
|
|
if obj.GetUserWalletBillCount, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_Wallet_GetUserWalletBillCount))); err != nil {
|
|
return
|
|
}
|
|
if obj.GetUserWalletBills, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_Wallet_GetUserWalletBills))); err != nil {
|
|
return
|
|
}
|
|
if obj.MarkSuccessRecharge, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_Wallet_MarkSuccessRecharge))); err != nil {
|
|
return
|
|
}
|
|
if obj.MinusUserBalance, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_Wallet_MinusUserBalance))); err != nil {
|
|
return
|
|
}
|
|
if obj.NewPostAttachmentBill, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_Wallet_NewPostAttachmentBill))); err != nil {
|
|
return
|
|
}
|
|
if obj.NewPostBill, err = p.PreparexContext(c, p.Rebind(p.QueryHook(_Wallet_NewPostBill))); err != nil {
|
|
return
|
|
}
|
|
return
|
|
}
|