Giter VIP home page Giter VIP logo

Comments (8)

whywaita avatar whywaita commented on August 21, 2024

👍

from ictsc-score-server.

kyontan avatar kyontan commented on August 21, 2024

Notification モデルを新しく作って、コメントの作成/編集等があったらそこへどんどん突っ込んでいけばいいかなと思っています。

/api/notifications で全件取得
/api/notifications/unread で未読のもののみ
/api/notifications/mark_as_read で現在時刻までのものを全件既読にする
といった感じの API が必要かなと。
どこまで読んだか、というのは Member のモデルに紐づくべきかと考えています。

from ictsc-score-server.

kyontan avatar kyontan commented on August 21, 2024

プッシュ通知については一先ず後回しでよくて、ポーリング(コメット) での実装を行えばよいかなと思います。

from ictsc-score-server.

kyontan avatar kyontan commented on August 21, 2024

権限周り考えるのが難しい。
現行の Permission モデルと組み合わせると query が複雑になりそう

from ictsc-score-server.

kyontan avatar kyontan commented on August 21, 2024

通知について考えた

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.

kyontan avatar kyontan commented on August 21, 2024

これ、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.

kyontan avatar kyontan commented on August 21, 2024

ICTSC6 でやってた

from ictsc-score-server.

kyontan avatar kyontan commented on August 21, 2024

Ref: ce088ca

from ictsc-score-server.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.