Giter VIP home page Giter VIP logo

Comments (8)

blackmann avatar blackmann commented on July 19, 2024

Thanks for this. Some comments:

  1. entity_id only captures the entity's id. But we can't tell what entity that is.
  2. We need to be able to know if a notification has been read by its recipient.
  3. What will be the purpose of the events table?
  4. We need to know when the notification was added.

from compa.

auxibee avatar auxibee commented on July 19, 2024
  1. We could add entity_type to capture if its a post/comment etc.
  2. Yeah a read field will be added to the notification subscribers.
  3. Yeah I think it is redundant
  4. Yeah sure a createdAtDate will be added.

from compa.

auxibee avatar auxibee commented on July 19, 2024

What about making it modular by separating the type of notifications ?
We have have a different table for each type of notifications like comments notifications, post notification, community notifications etc.
In this case each notification table will store its actor id and the comment/post /etc id
We will fetch from notification subscribers and join all the notification tables.

from compa.

blackmann avatar blackmann commented on July 19, 2024

What benefits do we get from doing it like this?

from compa.

auxibee avatar auxibee commented on July 19, 2024

i was confused with how we will fetch the post/comment/etc of the notification with the initial approach and hence this new suggestion.

from compa.

blackmann avatar blackmann commented on July 19, 2024

You need to update the issue with the new fields, etc.

from compa.

auxibee avatar auxibee commented on July 19, 2024

Schema design

Notification {
id
message
actor_id
entity_id
entity_type
dateCreated
}

NotificationSuscribers{
id
notification_id
user_id
read
}

from compa.

blackmann avatar blackmann commented on July 19, 2024

Completed with #64

from compa.

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.