Hayden Hargreaves d2835c636c (DB/FEAT): Began the implementation of the user engagement!
The database requirements have been added, as well as the service/repo
architecture. A few small functions have been created, but the system is
not complete by any means. More work is required to mark this task
complete.
2025-07-13 21:34:54 -07:00

29 lines
815 B
Go

package domain
import "time"
// EngagementType is the database enum E_ENGAGEMENT which defines the type of a user engagement
// of a recipe. Postgres enums are case sensitive so these must match the values in the database
// exactly.
type EngagementType string
const (
EngagementMade EngagementType = "made"
EngagementLiked EngagementType = "liked"
EngagementViewed EngagementType = "viewed"
EngagementShared EngagementType = "shared"
EngagementReviewed EngagementType = "reviewed"
EngagementRated EngagementType = "rated"
)
// Engagement is the database model of a user engagement. There is no need to map to a different
// model so this will remain in the domain.
type Engagement struct {
Id int
Type EngagementType
Message string
Entity int
UserId int
Created time.Time
}