32 lines
955 B
Go
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
|
|
}
|