This includes backend updates as well as frontend changes! The backend also includes a new repository to get a list of jobs via their IDs, which does respect order! The list displays for users that are logged in and a small message when the user is not logged in. The last piece is the recipe of the week segment, which can be as simple as a DB cron-job. But that will require stored procedures. Need to learn those next. Though I want to deploy the application soon, so I need to begin working on that.
12 lines
673 B
Go
12 lines
673 B
Go
package domain
|
|
|
|
type EngagementRepository interface {
|
|
AddUserEngagement(userId int, message string, engagementType EngagementType) (Engagement, error)
|
|
AddUserEntityEngagement(userId, entityId int, message string, engagementType EngagementType) (Engagement, error)
|
|
AddEngagement(message string, engagementType EngagementType) (Engagement, error)
|
|
AddEntityEngagement(entityId int, message string, engagementType EngagementType) (Engagement, error)
|
|
GetUserEngagement(userId, limit int) ([]Engagement, error)
|
|
GetUserEngagementFiltered(userId, limit int, engagementType EngagementType) ([]Engagement, error)
|
|
UserFavoriteRecipeToggle(userId, recipeId int) (bool, error)
|
|
}
|