_FollowingManager_ListFollows=`SELECT u.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_GetMessageById=`SELECT * FROM @message WHERE id=? AND is_del=0`
_Message_GetMessageCount=`SELECT count(*) FROM @message WHERE receiver_user_id=:receiver_user_id AND is_del=0`
_Message_GetMessages=`SELECT * FROM @message WHERE receiver_user_id=:receiver_user_id AND is_del=0 ORDER BY id DESC LIMIT :limit OFFSET :offset`
_Message_GetMessageCount=`SELECT count(*) FROM @message WHERE (receiver_user_id=? OR (sender_user_id=? AND type=4)) AND is_del=0`
_Message_GetMessages=`SELECT * FROM @message WHERE (receiver_user_id=? OR (sender_user_id=? AND type=4)) AND is_del=0 ORDER BY id DESC LIMIT ? 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=?`