entity

package
v0.0.0-...-8cdc3bd Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2021 License: MIT Imports: 1 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Box

type Box struct {
	ID       int `gorm:"primary_key" yaml:"-"`
	PhotoID  int
	FaceID   int
	FilePath string
	MinX     int
	MinY     int
	MaxX     int
	MaxY     int
	Photo    Photo
	Face     Face
}

Box is a rectangular region within a photo containing a Face. A box belongs to exactly one photo, and one person's face One photo can contain many boxes (faces), and a person/face can contain many boxes

type Face

type Face struct {
	ID    int `gorm:"primary_key" yaml:"-"`
	Name  string
	Boxes []Box
}

Face contains information about a Face (ie. a person)

type Joke

type Joke struct {
	ID    int    `json:"id" binding:"required"`
	Likes int    `json:"likes"`
	Joke  string `json:"joke" binding:"required"`
}

Joke contains information about a single Joke

type Label

type Label struct {
	ID        int `gorm:"primary_key" yaml:"-"`
	LabelName string
	Photos    []Photo `gorm:"many2many:photo_labels;"`
}

Label is used for photo categorization

type Photo

type Photo struct {
	ID                int `gorm:"primary_key" yaml:"-"`
	FilePath          string
	ThumbnailFilePath string
	MediaType         string
	CameraModel       string
	Latitude          float64
	Longitude         float64
	LocationString    string
	Timestamp         time.Time
	FocalLength       float64
	ApertureFStop     float64
	OriginalFilename  string
	Labels            []Label `gorm:"many2many:photo_labels;"`
	Boxes             []Box
}

Photo contains information about a single photo

Jump to

Keyboard shortcuts

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