models

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApproveStatus

type ApproveStatus int

ApproveStatus of the model

const (
	UndefinedApproveStatus   ApproveStatus = 0
	PendingApproveStatus     ApproveStatus = 0
	ApprovedApproveStatus    ApproveStatus = 1
	DisapprovedApproveStatus ApproveStatus = 2
	BannedApproveStatus      ApproveStatus = 3
)

ApproveStatus option constants...

func (ApproveStatus) IsApproved

func (s ApproveStatus) IsApproved() bool

func (ApproveStatus) IsRejected

func (s ApproveStatus) IsRejected() bool

func (ApproveStatus) IsUndefined

func (s ApproveStatus) IsUndefined() bool

func (ApproveStatus) String

func (s ApproveStatus) String() string

type AvailableStatus

type AvailableStatus int

AvailableStatus type

const (
	UndefinedAvailableStatus   AvailableStatus = 0
	AvailableAvailableStatus   AvailableStatus = 1
	UnavailableAvailableStatus AvailableStatus = 2
)

AvailableStatus option constants...

type Order

type Order int8
const (
	OrderUndefined Order = 0
	OrderAsc       Order = 1
	OrderDesc      Order = -1
)

func OrderFromStr

func OrderFromStr(s string) Order

PrepareQuery returns the query with applied order

func (*Order) IsAsc

func (ord *Order) IsAsc() bool

IsAsc returns true if the order is ascending

func (*Order) IsDefined

func (ord *Order) IsDefined() bool

IsDefined returns true if the order is defined

func (*Order) IsDesc

func (ord *Order) IsDesc() bool

IsDesc returns true if the order is descending

func (*Order) PrepareQuery

func (ord *Order) PrepareQuery(q *gorm.DB, column string) *gorm.DB

PrepareQuery returns the query with applied order

func (*Order) Set

func (ord *Order) Set(s string) *Order

Set sets the order value from string

Jump to

Keyboard shortcuts

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