entity

package
v0.0.0-...-51e95d8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 25, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mission

type Mission struct {
	ID           uuid.UUID
	Name         string
	Description  string
	Reward       int
	MinimumLevel int
}

func NewMission

func NewMission(name string, description string, reward int, minimumLevel int) *Mission

type Photo

type Photo struct {
	Id          uuid.UUID
	Data        []byte
	Description string
}

func NewPhoto

func NewPhoto(data []byte, description string) *Photo

type Place

type Place struct {
	ID               uuid.UUID
	GooglePlaceId    string
	Name             string
	FormattedAddress string
	Lat              float64
	Lng              float64
	Icon             string
	Types            []string
	OpeningPeriods   []string
	Photos           []Photo
	Rating           float64
	CreatedAt        time.Time
	UpdatedAt        time.Time
}

func NewPlace

func NewPlace(googlePlaceId string, name string, formatedAddress string, lat float64, lng float64, icon string, types []string, openingPeriods []string) *Place

func (*Place) GetRating

func (p *Place) GetRating() float64

type Reaction

type Reaction struct {
	React  ReactionEnum
	UserID string
}

func NewReaction

func NewReaction(react ReactionEnum, userID string) *Reaction

type ReactionEnum

type ReactionEnum string
const (
	Like   ReactionEnum = "Like"
	Love   ReactionEnum = "Love"
	Thanks ReactionEnum = "Thanks"
)

type Review

type Review struct {
	ID                    uuid.UUID
	PlaceID               string
	UserID                string
	Content               string
	Photos                []Photo
	Rating                float64
	Reactions             []Reaction
	AccessibilityFeatures []string
	CreatedAt             time.Time
	UpdatedAt             time.Time
}

func NewReview

func NewReview(placeID string, userID string, content string, photos []Photo, rating float64, accessibilityFeatures []string) *Review

type User

type User struct {
	ID        uuid.UUID
	Email     string
	Avatar    []byte
	Username  string
	Password  string
	Points    int
	Missions  []Mission
	CreatedAt time.Time
	UpdatedAt time.Time
}

func NewUser

func NewUser(email, username, password string) (*User, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL