voucher

package
v0.0.0-...-20f649f Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2023 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the voucher type in the database.
	Label = "voucher"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldName holds the string denoting the name field in the database.
	FieldName = "name"
	// FieldDescription holds the string denoting the description field in the database.
	FieldDescription = "description"
	// FieldPointsRequired holds the string denoting the points_required field in the database.
	FieldPointsRequired = "points_required"
	// EdgeRedemptions holds the string denoting the redemptions edge name in mutations.
	EdgeRedemptions = "redemptions"
	// EdgeInstitution holds the string denoting the institution edge name in mutations.
	EdgeInstitution = "institution"
	// Table holds the table name of the voucher in the database.
	Table = "vouchers"
	// RedemptionsTable is the table that holds the redemptions relation/edge.
	RedemptionsTable = "redemptions"
	// RedemptionsInverseTable is the table name for the Redemption entity.
	// It exists in this package in order to avoid circular dependency with the "redemption" package.
	RedemptionsInverseTable = "redemptions"
	// RedemptionsColumn is the table column denoting the redemptions relation/edge.
	RedemptionsColumn = "voucher_redemptions"
	// InstitutionTable is the table that holds the institution relation/edge.
	InstitutionTable = "vouchers"
	// InstitutionInverseTable is the table name for the Institution entity.
	// It exists in this package in order to avoid circular dependency with the "entinstitution" package.
	InstitutionInverseTable = "institutions"
	// InstitutionColumn is the table column denoting the institution relation/edge.
	InstitutionColumn = "institution_vouchers"
)

Variables

View Source
var (
	// NameValidator is a validator for the "name" field. It is called by the builders before save.
	NameValidator func(string) error
	// PointsRequiredValidator is a validator for the "points_required" field. It is called by the builders before save.
	PointsRequiredValidator func(int) error
)

Columns holds all SQL columns for voucher fields.

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

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

Functions

func And

func And(predicates ...predicate.Voucher) predicate.Voucher

And groups predicates with the AND operator between them.

func Description

func Description(v string) predicate.Voucher

Description applies equality check predicate on the "description" field. It's identical to DescriptionEQ.

func DescriptionContains

func DescriptionContains(v string) predicate.Voucher

DescriptionContains applies the Contains predicate on the "description" field.

func DescriptionContainsFold

func DescriptionContainsFold(v string) predicate.Voucher

DescriptionContainsFold applies the ContainsFold predicate on the "description" field.

func DescriptionEQ

func DescriptionEQ(v string) predicate.Voucher

DescriptionEQ applies the EQ predicate on the "description" field.

func DescriptionEqualFold

func DescriptionEqualFold(v string) predicate.Voucher

DescriptionEqualFold applies the EqualFold predicate on the "description" field.

func DescriptionGT

func DescriptionGT(v string) predicate.Voucher

DescriptionGT applies the GT predicate on the "description" field.

func DescriptionGTE

func DescriptionGTE(v string) predicate.Voucher

DescriptionGTE applies the GTE predicate on the "description" field.

func DescriptionHasPrefix

func DescriptionHasPrefix(v string) predicate.Voucher

DescriptionHasPrefix applies the HasPrefix predicate on the "description" field.

func DescriptionHasSuffix

func DescriptionHasSuffix(v string) predicate.Voucher

DescriptionHasSuffix applies the HasSuffix predicate on the "description" field.

func DescriptionIn

func DescriptionIn(vs ...string) predicate.Voucher

DescriptionIn applies the In predicate on the "description" field.

func DescriptionLT

func DescriptionLT(v string) predicate.Voucher

DescriptionLT applies the LT predicate on the "description" field.

func DescriptionLTE

func DescriptionLTE(v string) predicate.Voucher

DescriptionLTE applies the LTE predicate on the "description" field.

func DescriptionNEQ

func DescriptionNEQ(v string) predicate.Voucher

DescriptionNEQ applies the NEQ predicate on the "description" field.

func DescriptionNotIn

func DescriptionNotIn(vs ...string) predicate.Voucher

DescriptionNotIn applies the NotIn predicate on the "description" field.

func HasInstitution

func HasInstitution() predicate.Voucher

HasInstitution applies the HasEdge predicate on the "institution" edge.

func HasInstitutionWith

func HasInstitutionWith(preds ...predicate.Institution) predicate.Voucher

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

func HasRedemptions

func HasRedemptions() predicate.Voucher

HasRedemptions applies the HasEdge predicate on the "redemptions" edge.

func HasRedemptionsWith

func HasRedemptionsWith(preds ...predicate.Redemption) predicate.Voucher

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

func ID

func ID(id int) predicate.Voucher

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int) predicate.Voucher

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int) predicate.Voucher

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int) predicate.Voucher

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...int) predicate.Voucher

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int) predicate.Voucher

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int) predicate.Voucher

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int) predicate.Voucher

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...int) predicate.Voucher

IDNotIn applies the NotIn predicate on the ID field.

func Name

func Name(v string) predicate.Voucher

Name applies equality check predicate on the "name" field. It's identical to NameEQ.

func NameContains

func NameContains(v string) predicate.Voucher

NameContains applies the Contains predicate on the "name" field.

func NameContainsFold

func NameContainsFold(v string) predicate.Voucher

NameContainsFold applies the ContainsFold predicate on the "name" field.

func NameEQ

func NameEQ(v string) predicate.Voucher

NameEQ applies the EQ predicate on the "name" field.

func NameEqualFold

func NameEqualFold(v string) predicate.Voucher

NameEqualFold applies the EqualFold predicate on the "name" field.

func NameGT

func NameGT(v string) predicate.Voucher

NameGT applies the GT predicate on the "name" field.

func NameGTE

func NameGTE(v string) predicate.Voucher

NameGTE applies the GTE predicate on the "name" field.

func NameHasPrefix

func NameHasPrefix(v string) predicate.Voucher

NameHasPrefix applies the HasPrefix predicate on the "name" field.

func NameHasSuffix

func NameHasSuffix(v string) predicate.Voucher

NameHasSuffix applies the HasSuffix predicate on the "name" field.

func NameIn

func NameIn(vs ...string) predicate.Voucher

NameIn applies the In predicate on the "name" field.

func NameLT

func NameLT(v string) predicate.Voucher

NameLT applies the LT predicate on the "name" field.

func NameLTE

func NameLTE(v string) predicate.Voucher

NameLTE applies the LTE predicate on the "name" field.

func NameNEQ

func NameNEQ(v string) predicate.Voucher

NameNEQ applies the NEQ predicate on the "name" field.

func NameNotIn

func NameNotIn(vs ...string) predicate.Voucher

NameNotIn applies the NotIn predicate on the "name" field.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.Voucher) predicate.Voucher

Or groups predicates with the OR operator between them.

func PointsRequired

func PointsRequired(v int) predicate.Voucher

PointsRequired applies equality check predicate on the "points_required" field. It's identical to PointsRequiredEQ.

func PointsRequiredEQ

func PointsRequiredEQ(v int) predicate.Voucher

PointsRequiredEQ applies the EQ predicate on the "points_required" field.

func PointsRequiredGT

func PointsRequiredGT(v int) predicate.Voucher

PointsRequiredGT applies the GT predicate on the "points_required" field.

func PointsRequiredGTE

func PointsRequiredGTE(v int) predicate.Voucher

PointsRequiredGTE applies the GTE predicate on the "points_required" field.

func PointsRequiredIn

func PointsRequiredIn(vs ...int) predicate.Voucher

PointsRequiredIn applies the In predicate on the "points_required" field.

func PointsRequiredLT

func PointsRequiredLT(v int) predicate.Voucher

PointsRequiredLT applies the LT predicate on the "points_required" field.

func PointsRequiredLTE

func PointsRequiredLTE(v int) predicate.Voucher

PointsRequiredLTE applies the LTE predicate on the "points_required" field.

func PointsRequiredNEQ

func PointsRequiredNEQ(v int) predicate.Voucher

PointsRequiredNEQ applies the NEQ predicate on the "points_required" field.

func PointsRequiredNotIn

func PointsRequiredNotIn(vs ...int) predicate.Voucher

PointsRequiredNotIn applies the NotIn predicate on the "points_required" field.

func ValidColumn

func ValidColumn(column string) bool

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

Types

type OrderOption

type OrderOption func(*sql.Selector)

OrderOption defines the ordering options for the Voucher queries.

func ByDescription

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

ByDescription orders the results by the description field.

func ByID

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

ByID orders the results by the id field.

func ByInstitutionField

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

ByInstitutionField orders the results by institution field.

func ByName

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

ByName orders the results by the name field.

func ByPointsRequired

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

ByPointsRequired orders the results by the points_required field.

func ByRedemptions

func ByRedemptions(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption

ByRedemptions orders the results by redemptions terms.

func ByRedemptionsCount

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

ByRedemptionsCount orders the results by redemptions count.

Jump to

Keyboard shortcuts

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