Comments (8)
👍
from ictsc-score-server.
Notification モデルを新しく作って、コメントの作成/編集等があったらそこへどんどん突っ込んでいけばいいかなと思っています。
/api/notifications
で全件取得
/api/notifications/unread
で未読のもののみ
/api/notifications/mark_as_read
で現在時刻までのものを全件既読にする
といった感じの API が必要かなと。
どこまで読んだか、というのは Member のモデルに紐づくべきかと考えています。
from ictsc-score-server.
プッシュ通知については一先ず後回しでよくて、ポーリング(コメット) での実装を行えばよいかなと思います。
from ictsc-score-server.
権限周り考えるのが難しい。
現行の Permission モデルと組み合わせると query が複雑になりそう
from ictsc-score-server.
通知について考えた
GET /notifications
通知全件
GET /notifications/unread
そのメンバーがまだ既読にしていない通知全て
POST /notifications/mark_as_read
パラメータで指定した時刻までの通知を既読にする
{
id: 12345
type: "new_comment_to_problem",
text: "問題へ補足が追加されました",
resouce: "Problem",
resouce_id: "2",
sub_resource: "Comment",
sub_resource_id: 5,
created_at: ...
}
from ictsc-score-server.
これ、resource や sub_resource というのを Notification がもつ必要はないですね。
(該当するリソースが削除されたら、それに関連する Notification も消えるべきなので)
Nofitication が持つべきなのは、
id: integer
type: string
notificatable_type: string
notificatable_id: integer
created_at: datetime
updated_at: datetime
だと思う
from ictsc-score-server.
ICTSC6 でやってた
from ictsc-score-server.
Ref: ce088ca
from ictsc-score-server.
Related Issues (20)
- ActiveRecordのエラー仕様変更対応
- rails_best_practices消す
- APIの細かい依存更新
- Rails6.1へアップデート
- zeitwerk:checkの失敗を治す
- binstubsを整理してパスを通す
- UIのelvisを置き換えて消し去る
- mutationのrequired: falseなargumentにdefault_valueをつける
- graphql-ruby最新にする
- graphql controllerでやってる例外ハンドリングをまともにする
- sessionsで500が発生したときのハンドリングをする
- Gemfieで明示していない依存の更新
- graphqlのrspecのクエリ生成コードのモンキーパッチを摘出する
- rails generate graphql:install で最新の構成に追いつく
- have_gq_errorをhave_gql_errorsにする
- penaltiesのorder by消す
- lib/graphql_query_builder.rbのspecを書く
- ib/graphql_query_builder.rbを作り直す
- graphql-ruby標準のlazy executionでgraphql-batchを置き換えられるかもしれない
- graphql-ruby用のARのモンキーパッチ摘出
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ictsc-score-server.