2026-01-10 12:44:04 -07:00

31 lines
909 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"
)
// 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
}