hngprojects / hng_boilerplate_nestjs

Description
Apache License 2.0
182 stars 105 forks source link

[FEAT] NOTIFICATION API ENDPOINT #178

Closed kennie-larkson closed 1 month ago

kennie-larkson commented 1 month ago

Description

This issue provides a set of API endpoints needed to manage Notifications. These are CRUD endpoints to manage the creation, retrieval and delete operations on Notifications records in the database.

Acceptance Criteria

Purpose

Implement a Notification API endpoint to manage user notifications. This endpoint will handle creating, retrieving, and deleting notifications, ensuring users receive timely and relevant updates within the application.

Requirements

Expected Outcome

Database Schema

Table name: notifications_table

- id: 
     - constraints: string(uuid), unique, primary-key, not null
- user_id:
     - constraints: string(uuid), unique
- title:
     - constraints: string
-  message:
    - constraints: string, not null, text
- type:
    - constraints: (string, e.g., 'info', 'warning', 'error', required)
- isRead:
    - constraints: (boolean, e.g 'true')
- createdAt:
    - constraints: datetime
- updatedAt:
    - constraints: datetime  

Database Diagram

An image of the database model

kennie-larkson commented 1 month ago

TEAM Backenders @KennieLarkson

markessien commented 1 month ago

how do you mark notifications as read

markessien commented 1 month ago

what about the ticket to send notification emails (in aggregate and singly)? How does one bulk notify all users in an org?