Skip to content

Create database models for notifications #70

@ayush-goyal

Description

@ayush-goyal

Currently, for the notifications service, there is no record of which messages were sent out on which date. As such, for this issue, please create two new database models for email and text messages. Each of the two routes, email and text should have two routes, one for getting all the documents in the database (GET /), and one route for sending a message (POST /send) that will create a database entry (or multiple) for each recipient.

The database formats should store the following information, but will be different for each messaging type

  • the user who sent the message
  • the text of the email or message of the text message
  • subject of email
  • where the message was sent from (like from: email or sending number for text)
  • who the recipient was as far as their email or phone number
  • success - boolean value of whether or not the message was sent successfully
  • errorMessage - error message if notification failed to send

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions