-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
25 changed files
with
2,553 additions
and
168 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
CREATE TYPE getstronger.notification_type AS ENUM ('Follow', 'WorkoutComment'); | ||
|
||
CREATE TABLE getstronger.notifications | ||
( | ||
id UUID PRIMARY KEY NOT NULL DEFAULT uuid_generate_v4(), | ||
user_id UUID NOT NULL REFERENCES getstronger.users (id), | ||
"type" getstronger.notification_type NOT NULL, | ||
payload JSONB NOT NULL, | ||
read_at TIMESTAMP NULL, | ||
created_at TIMESTAMP NOT NULL DEFAULT (NOW() AT TIME ZONE 'UTC') | ||
); | ||
|
||
CREATE INDEX idx_notifications_user_id_created_at ON getstronger.notifications (user_id, read_at); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
package events | ||
|
||
const RequestTraced = "request:traced" | ||
const ( | ||
RequestTraced = "request:traced" | ||
WorkoutCommentPosted = "workout_comment:posted" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,7 @@ type RequestTraced struct { | |
DurationMS int | ||
StatusCode int | ||
} | ||
|
||
type WorkoutCommentPosted struct { | ||
CommentID string | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.