entities

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2025 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Category

type Category struct {
	ID          int
	Name        string
	Description string
}

type CredentialIdentifier

type CredentialIdentifier string

type CredentialMethod

type CredentialMethod string
const (
	CredentialMethodPhone CredentialMethod = "phone"
	CredentialMethodEmail CredentialMethod = "email"
	CredentialMethodOAuth CredentialMethod = "oauth"
)

type Language

type Language string
const (
	LanguageEnglish Language = "en"
	LanguagePersian Language = "fa"

	LanguageDefault Language = LanguageEnglish
)

func ToLanguage

func ToLanguage(rawLanguage string) Language

type ListOptions

type ListOptions struct {
	PageSize   int
	LastId     int
	Page       int
	WithCounts bool
	Search     string
}

func QueryParamsToListOptions

func QueryParamsToListOptions(queryParams map[string]string) *ListOptions

func (*ListOptions) DoPaginate

func (p *ListOptions) DoPaginate() bool

func (*ListOptions) DoSearch

func (p *ListOptions) DoSearch() bool

type Phone

type Phone string

func (Phone) Uniform

func (p Phone) Uniform() Phone

func (Phone) Validate

func (p Phone) Validate() bool

type Product

type Product struct {
	ID          uint64
	Name        string
	Price       string
	Description string
	CategoryID  uint64
	Inventory   int
}

Jump to

Keyboard shortcuts

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