Hayden Hargreaves 7951945c3b (FEAT): Recipe editing is complete!
This will be deployed for testing!
2026-02-01 00:30:13 -07:00

32 lines
955 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"
EngagementCreated EngagementType = "created"
EngagementDeleted EngagementType = "deleted"
EngagementEdited EngagementType = "edited"
)
// 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
}