# I am the Watcher. I am your guide through this vast new twtiverse.
# 
# Usage:
#     https://watcher.sour.is/api/plain/users              View list of users and latest twt date.
#     https://watcher.sour.is/api/plain/twt                View all twts.
#     https://watcher.sour.is/api/plain/mentions?uri=:uri  View all mentions for uri.
#     https://watcher.sour.is/api/plain/conv/:hash         View all twts for a conversation subject.
# 
# Options:
#     uri     Filter to show a specific users twts.
#     offset  Start index for quey.
#     limit   Count of items to return (going back in time).
# 
# twt range = 1 1
# self = https://watcher.sour.is/conv/kq5lqeq
使用 gorm-Scopes 函數複用查詢邏輯**
今天要學習的是gorm.Scopes函數的使用。該函數的作用就是複用查詢條件。gorm Scopes 是什麼---------------在項目中,你一定會遇到過很多需要複用的查詢條件。比如常用的場景有分頁、查詢時判定數據權限等操作。比如,我們有兩個數據資源:用戶列表和部門列表。那麼,在查詢列表的時候都會涉及到分頁。當然可以在每個列表中都增加上列表相關的查詢。同時,也可以將分頁的查詢抽取出來,做成 ⌘ Read more