request

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2026 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the request type in the database.
	Label = "request"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldCreateTime holds the string denoting the create_time field in the database.
	FieldCreateTime = "create_time"
	// FieldUpdateTime holds the string denoting the update_time field in the database.
	FieldUpdateTime = "update_time"
	// FieldMediaType holds the string denoting the media_type field in the database.
	FieldMediaType = "media_type"
	// FieldMediaID holds the string denoting the media_id field in the database.
	FieldMediaID = "media_id"
	// FieldTitle holds the string denoting the title field in the database.
	FieldTitle = "title"
	// FieldStatus holds the string denoting the status field in the database.
	FieldStatus = "status"
	// FieldReason holds the string denoting the reason field in the database.
	FieldReason = "reason"
	// EdgeRequester holds the string denoting the requester edge name in mutations.
	EdgeRequester = "requester"
	// EdgeApprovedBy holds the string denoting the approved_by edge name in mutations.
	EdgeApprovedBy = "approved_by"
	// Table holds the table name of the request in the database.
	Table = "requests"
	// RequesterTable is the table that holds the requester relation/edge.
	RequesterTable = "requests"
	// RequesterInverseTable is the table name for the User entity.
	// It exists in this package in order to avoid circular dependency with the "user" package.
	RequesterInverseTable = "users"
	// RequesterColumn is the table column denoting the requester relation/edge.
	RequesterColumn = "user_requests"
	// ApprovedByTable is the table that holds the approved_by relation/edge.
	ApprovedByTable = "requests"
	// ApprovedByInverseTable is the table name for the User entity.
	// It exists in this package in order to avoid circular dependency with the "user" package.
	ApprovedByInverseTable = "users"
	// ApprovedByColumn is the table column denoting the approved_by relation/edge.
	ApprovedByColumn = "request_approved_by"
)
View Source
const DefaultStatus = StatusPending

StatusPending is the default value of the Status enum.

Variables

View Source
var (
	// DefaultCreateTime holds the default value on creation for the "create_time" field.
	DefaultCreateTime func() time.Time
	// DefaultUpdateTime holds the default value on creation for the "update_time" field.
	DefaultUpdateTime func() time.Time
	// UpdateDefaultUpdateTime holds the default value on update for the "update_time" field.
	UpdateDefaultUpdateTime func() time.Time
	// TitleValidator is a validator for the "title" field. It is called by the builders before save.
	TitleValidator func(string) error
)

Columns holds all SQL columns for request fields.

View Source
var ForeignKeys = []string{
	"request_approved_by",
	"user_requests",
}

ForeignKeys holds the SQL foreign-keys that are owned by the "requests" table and are not defined as standalone fields in the schema.

Functions

func And

func And(predicates ...predicate.Request) predicate.Request

And groups predicates with the AND operator between them.

func CreateTime

func CreateTime(v time.Time) predicate.Request

CreateTime applies equality check predicate on the "create_time" field. It's identical to CreateTimeEQ.

func CreateTimeEQ

func CreateTimeEQ(v time.Time) predicate.Request

CreateTimeEQ applies the EQ predicate on the "create_time" field.

func CreateTimeGT

func CreateTimeGT(v time.Time) predicate.Request

CreateTimeGT applies the GT predicate on the "create_time" field.

func CreateTimeGTE

func CreateTimeGTE(v time.Time) predicate.Request

CreateTimeGTE applies the GTE predicate on the "create_time" field.

func CreateTimeIn

func CreateTimeIn(vs ...time.Time) predicate.Request

CreateTimeIn applies the In predicate on the "create_time" field.

func CreateTimeLT

func CreateTimeLT(v time.Time) predicate.Request

CreateTimeLT applies the LT predicate on the "create_time" field.

func CreateTimeLTE

func CreateTimeLTE(v time.Time) predicate.Request

CreateTimeLTE applies the LTE predicate on the "create_time" field.

func CreateTimeNEQ

func CreateTimeNEQ(v time.Time) predicate.Request

CreateTimeNEQ applies the NEQ predicate on the "create_time" field.

func CreateTimeNotIn

func CreateTimeNotIn(vs ...time.Time) predicate.Request

CreateTimeNotIn applies the NotIn predicate on the "create_time" field.

func HasApprovedBy

func HasApprovedBy() predicate.Request

HasApprovedBy applies the HasEdge predicate on the "approved_by" edge.

func HasApprovedByWith

func HasApprovedByWith(preds ...predicate.User) predicate.Request

HasApprovedByWith applies the HasEdge predicate on the "approved_by" edge with a given conditions (other predicates).

func HasRequester

func HasRequester() predicate.Request

HasRequester applies the HasEdge predicate on the "requester" edge.

func HasRequesterWith

func HasRequesterWith(preds ...predicate.User) predicate.Request

HasRequesterWith applies the HasEdge predicate on the "requester" edge with a given conditions (other predicates).

func ID

func ID(id uint32) predicate.Request

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id uint32) predicate.Request

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id uint32) predicate.Request

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id uint32) predicate.Request

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...uint32) predicate.Request

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id uint32) predicate.Request

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id uint32) predicate.Request

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id uint32) predicate.Request

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...uint32) predicate.Request

IDNotIn applies the NotIn predicate on the ID field.

func MediaID

func MediaID(v uint32) predicate.Request

MediaID applies equality check predicate on the "media_id" field. It's identical to MediaIDEQ.

func MediaIDEQ

func MediaIDEQ(v uint32) predicate.Request

MediaIDEQ applies the EQ predicate on the "media_id" field.

func MediaIDGT

func MediaIDGT(v uint32) predicate.Request

MediaIDGT applies the GT predicate on the "media_id" field.

func MediaIDGTE

func MediaIDGTE(v uint32) predicate.Request

MediaIDGTE applies the GTE predicate on the "media_id" field.

func MediaIDIn

func MediaIDIn(vs ...uint32) predicate.Request

MediaIDIn applies the In predicate on the "media_id" field.

func MediaIDLT

func MediaIDLT(v uint32) predicate.Request

MediaIDLT applies the LT predicate on the "media_id" field.

func MediaIDLTE

func MediaIDLTE(v uint32) predicate.Request

MediaIDLTE applies the LTE predicate on the "media_id" field.

func MediaIDNEQ

func MediaIDNEQ(v uint32) predicate.Request

MediaIDNEQ applies the NEQ predicate on the "media_id" field.

func MediaIDNotIn

func MediaIDNotIn(vs ...uint32) predicate.Request

MediaIDNotIn applies the NotIn predicate on the "media_id" field.

func MediaTypeEQ

func MediaTypeEQ(v MediaType) predicate.Request

MediaTypeEQ applies the EQ predicate on the "media_type" field.

func MediaTypeIn

func MediaTypeIn(vs ...MediaType) predicate.Request

MediaTypeIn applies the In predicate on the "media_type" field.

func MediaTypeNEQ

func MediaTypeNEQ(v MediaType) predicate.Request

MediaTypeNEQ applies the NEQ predicate on the "media_type" field.

func MediaTypeNotIn

func MediaTypeNotIn(vs ...MediaType) predicate.Request

MediaTypeNotIn applies the NotIn predicate on the "media_type" field.

func MediaTypeValidator

func MediaTypeValidator(mt MediaType) error

MediaTypeValidator is a validator for the "media_type" field enum values. It is called by the builders before save.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.Request) predicate.Request

Or groups predicates with the OR operator between them.

func Reason

func Reason(v string) predicate.Request

Reason applies equality check predicate on the "reason" field. It's identical to ReasonEQ.

func ReasonContains

func ReasonContains(v string) predicate.Request

ReasonContains applies the Contains predicate on the "reason" field.

func ReasonContainsFold

func ReasonContainsFold(v string) predicate.Request

ReasonContainsFold applies the ContainsFold predicate on the "reason" field.

func ReasonEQ

func ReasonEQ(v string) predicate.Request

ReasonEQ applies the EQ predicate on the "reason" field.

func ReasonEqualFold

func ReasonEqualFold(v string) predicate.Request

ReasonEqualFold applies the EqualFold predicate on the "reason" field.

func ReasonGT

func ReasonGT(v string) predicate.Request

ReasonGT applies the GT predicate on the "reason" field.

func ReasonGTE

func ReasonGTE(v string) predicate.Request

ReasonGTE applies the GTE predicate on the "reason" field.

func ReasonHasPrefix

func ReasonHasPrefix(v string) predicate.Request

ReasonHasPrefix applies the HasPrefix predicate on the "reason" field.

func ReasonHasSuffix

func ReasonHasSuffix(v string) predicate.Request

ReasonHasSuffix applies the HasSuffix predicate on the "reason" field.

func ReasonIn

func ReasonIn(vs ...string) predicate.Request

ReasonIn applies the In predicate on the "reason" field.

func ReasonIsNil

func ReasonIsNil() predicate.Request

ReasonIsNil applies the IsNil predicate on the "reason" field.

func ReasonLT

func ReasonLT(v string) predicate.Request

ReasonLT applies the LT predicate on the "reason" field.

func ReasonLTE

func ReasonLTE(v string) predicate.Request

ReasonLTE applies the LTE predicate on the "reason" field.

func ReasonNEQ

func ReasonNEQ(v string) predicate.Request

ReasonNEQ applies the NEQ predicate on the "reason" field.

func ReasonNotIn

func ReasonNotIn(vs ...string) predicate.Request

ReasonNotIn applies the NotIn predicate on the "reason" field.

func ReasonNotNil

func ReasonNotNil() predicate.Request

ReasonNotNil applies the NotNil predicate on the "reason" field.

func StatusEQ

func StatusEQ(v Status) predicate.Request

StatusEQ applies the EQ predicate on the "status" field.

func StatusIn

func StatusIn(vs ...Status) predicate.Request

StatusIn applies the In predicate on the "status" field.

func StatusNEQ

func StatusNEQ(v Status) predicate.Request

StatusNEQ applies the NEQ predicate on the "status" field.

func StatusNotIn

func StatusNotIn(vs ...Status) predicate.Request

StatusNotIn applies the NotIn predicate on the "status" field.

func StatusValidator

func StatusValidator(s Status) error

StatusValidator is a validator for the "status" field enum values. It is called by the builders before save.

func Title

func Title(v string) predicate.Request

Title applies equality check predicate on the "title" field. It's identical to TitleEQ.

func TitleContains

func TitleContains(v string) predicate.Request

TitleContains applies the Contains predicate on the "title" field.

func TitleContainsFold

func TitleContainsFold(v string) predicate.Request

TitleContainsFold applies the ContainsFold predicate on the "title" field.

func TitleEQ

func TitleEQ(v string) predicate.Request

TitleEQ applies the EQ predicate on the "title" field.

func TitleEqualFold

func TitleEqualFold(v string) predicate.Request

TitleEqualFold applies the EqualFold predicate on the "title" field.

func TitleGT

func TitleGT(v string) predicate.Request

TitleGT applies the GT predicate on the "title" field.

func TitleGTE

func TitleGTE(v string) predicate.Request

TitleGTE applies the GTE predicate on the "title" field.

func TitleHasPrefix

func TitleHasPrefix(v string) predicate.Request

TitleHasPrefix applies the HasPrefix predicate on the "title" field.

func TitleHasSuffix

func TitleHasSuffix(v string) predicate.Request

TitleHasSuffix applies the HasSuffix predicate on the "title" field.

func TitleIn

func TitleIn(vs ...string) predicate.Request

TitleIn applies the In predicate on the "title" field.

func TitleLT

func TitleLT(v string) predicate.Request

TitleLT applies the LT predicate on the "title" field.

func TitleLTE

func TitleLTE(v string) predicate.Request

TitleLTE applies the LTE predicate on the "title" field.

func TitleNEQ

func TitleNEQ(v string) predicate.Request

TitleNEQ applies the NEQ predicate on the "title" field.

func TitleNotIn

func TitleNotIn(vs ...string) predicate.Request

TitleNotIn applies the NotIn predicate on the "title" field.

func UpdateTime

func UpdateTime(v time.Time) predicate.Request

UpdateTime applies equality check predicate on the "update_time" field. It's identical to UpdateTimeEQ.

func UpdateTimeEQ

func UpdateTimeEQ(v time.Time) predicate.Request

UpdateTimeEQ applies the EQ predicate on the "update_time" field.

func UpdateTimeGT

func UpdateTimeGT(v time.Time) predicate.Request

UpdateTimeGT applies the GT predicate on the "update_time" field.

func UpdateTimeGTE

func UpdateTimeGTE(v time.Time) predicate.Request

UpdateTimeGTE applies the GTE predicate on the "update_time" field.

func UpdateTimeIn

func UpdateTimeIn(vs ...time.Time) predicate.Request

UpdateTimeIn applies the In predicate on the "update_time" field.

func UpdateTimeLT

func UpdateTimeLT(v time.Time) predicate.Request

UpdateTimeLT applies the LT predicate on the "update_time" field.

func UpdateTimeLTE

func UpdateTimeLTE(v time.Time) predicate.Request

UpdateTimeLTE applies the LTE predicate on the "update_time" field.

func UpdateTimeNEQ

func UpdateTimeNEQ(v time.Time) predicate.Request

UpdateTimeNEQ applies the NEQ predicate on the "update_time" field.

func UpdateTimeNotIn

func UpdateTimeNotIn(vs ...time.Time) predicate.Request

UpdateTimeNotIn applies the NotIn predicate on the "update_time" field.

func ValidColumn

func ValidColumn(column string) bool

ValidColumn reports if the column name is valid (part of the table columns).

Types

type MediaType

type MediaType string

MediaType defines the type for the "media_type" enum field.

const (
	MediaTypeMovie  MediaType = "movie"
	MediaTypeTvshow MediaType = "tvshow"
)

MediaType values.

func (MediaType) String

func (mt MediaType) String() string

type OrderOption

type OrderOption func(*sql.Selector)

OrderOption defines the ordering options for the Request queries.

func ByApprovedByField

func ByApprovedByField(field string, opts ...sql.OrderTermOption) OrderOption

ByApprovedByField orders the results by approved_by field.

func ByCreateTime

func ByCreateTime(opts ...sql.OrderTermOption) OrderOption

ByCreateTime orders the results by the create_time field.

func ByID

func ByID(opts ...sql.OrderTermOption) OrderOption

ByID orders the results by the id field.

func ByMediaID

func ByMediaID(opts ...sql.OrderTermOption) OrderOption

ByMediaID orders the results by the media_id field.

func ByMediaType

func ByMediaType(opts ...sql.OrderTermOption) OrderOption

ByMediaType orders the results by the media_type field.

func ByReason

func ByReason(opts ...sql.OrderTermOption) OrderOption

ByReason orders the results by the reason field.

func ByRequesterField

func ByRequesterField(field string, opts ...sql.OrderTermOption) OrderOption

ByRequesterField orders the results by requester field.

func ByStatus

func ByStatus(opts ...sql.OrderTermOption) OrderOption

ByStatus orders the results by the status field.

func ByTitle

func ByTitle(opts ...sql.OrderTermOption) OrderOption

ByTitle orders the results by the title field.

func ByUpdateTime

func ByUpdateTime(opts ...sql.OrderTermOption) OrderOption

ByUpdateTime orders the results by the update_time field.

type Status

type Status string

Status defines the type for the "status" enum field.

const (
	StatusPending   Status = "pending"
	StatusApproved  Status = "approved"
	StatusDenied    Status = "denied"
	StatusAvailable Status = "available"
)

Status values.

func (Status) String

func (s Status) String() string

Jump to

Keyboard shortcuts

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