entity

package
v0.0.0-...-422268b Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrLikedItem            = errors.New("already like this item")
	ErrUnlikedItem          = errors.New("already unlike this item")
	ErrDidNotLikeItem       = errors.New("you have not liked this item")
	ErrItemIDInvalid        = errors.New("invalid TODO id")
	ErrCannotListLikedUsers = errors.New("cannot list users liked item")
	ErrCannotGetItemLikes   = errors.New("cannot get item likes")
)

Functions

This section is empty.

Types

type Like

type Like struct {
	UserID    int              `json:"user_id" gorm:"column:user_id;"`
	ItemID    int              `json:"item_id" gorm:"column:item_id;"`
	CreatedAt *time.Time       `json:"created_at" gorm:"column:created_at;"`
	User      *core.SimpleUser `json:"-" gorm:"foreignKey:UserID;"`
}

func (*Like) GetItemID

func (l *Like) GetItemID() int

func (*Like) GetUserID

func (l *Like) GetUserID() int

func (Like) TableName

func (Like) TableName() string

Jump to

Keyboard shortcuts

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