models

package
v0.0.0-...-39a0b88 Latest Latest
Warning

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

Go to latest
Published: May 27, 2022 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	UUID     string          `json:"uuid,omitempty"`
	Personal *Personal       `json:"personal,omitempty"`
	Criteria *SearchCriteria `json:"criteria,omitempty"`
	Settings *Settings       `json:"settings,omitempty"`
}

func (*Config) SetUUID

func (c *Config) SetUUID(uuid string)

type Gender

type Gender int8
const (
	Any Gender = iota
	Male
	Female
)

func (*Gender) Scan

func (g *Gender) Scan(src interface{}) error

func (*Gender) Value

func (g *Gender) Value() (driver.Value, error)

type Personal

type Personal struct {
	UUID       string `json:"uuid,omitempty"`
	Username   string `json:"username"`
	AvatarLink string `json:"avatar_link"`
	Gender     Gender `json:"gender"`
	Age        int8   `json:"age"`
}

type Profile

type Profile struct {
	UUID     string          `json:"uuid,omitempty"`
	Personal *Personal       `json:"personal,omitempty"`
	Criteria *SearchCriteria `json:"criteria,omitempty"`
}

type Range

type Range struct {
	From *float64 `json:"from,omitempty"`
	To   *float64 `json:"to,omitempty"`
}

func NewRange

func NewRange(from, to float64) Range

type Region

type Region struct {
	ID          int64  `json:"id"`
	Name        string `json:"name"`
	Description string `json:"description"`
}

type Relation

type Relation struct {
	UUID     string
	Target   string
	Relation int8
}

type SearchCriteria

type SearchCriteria struct {
	UUID       string  `json:"uuid,omitempty"`
	Regions    []int64 `json:"regions"`
	PriceRange Range   `json:"price_range"`
	Gender     Gender  `json:"gender"`
	AgeRange   Range   `json:"age_range"`
}

type Settings

type Settings struct {
	UUID  string `json:"uuid,omitempty"`
	Theme int64  `json:"theme"`
}

Jump to

Keyboard shortcuts

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