redemption

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: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the redemption type in the database.
	Label = "redemption"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldRedeemedAt holds the string denoting the redeemed_at field in the database.
	FieldRedeemedAt = "redeemed_at"
	// EdgeVoucher holds the string denoting the voucher edge name in mutations.
	EdgeVoucher = "voucher"
	// EdgeAccessory holds the string denoting the accessory edge name in mutations.
	EdgeAccessory = "accessory"
	// EdgeUser holds the string denoting the user edge name in mutations.
	EdgeUser = "user"
	// Table holds the table name of the redemption in the database.
	Table = "redemptions"
	// VoucherTable is the table that holds the voucher relation/edge.
	VoucherTable = "redemptions"
	// VoucherInverseTable is the table name for the Voucher entity.
	// It exists in this package in order to avoid circular dependency with the "voucher" package.
	VoucherInverseTable = "vouchers"
	// VoucherColumn is the table column denoting the voucher relation/edge.
	VoucherColumn = "voucher_redemptions"
	// AccessoryTable is the table that holds the accessory relation/edge.
	AccessoryTable = "redemptions"
	// AccessoryInverseTable is the table name for the Accessory entity.
	// It exists in this package in order to avoid circular dependency with the "accessory" package.
	AccessoryInverseTable = "accessories"
	// AccessoryColumn is the table column denoting the accessory relation/edge.
	AccessoryColumn = "accessory_redemptions"
	// UserTable is the table that holds the user relation/edge.
	UserTable = "redemptions"
	// UserInverseTable is the table name for the User entity.
	// It exists in this package in order to avoid circular dependency with the "user" package.
	UserInverseTable = "users"
	// UserColumn is the table column denoting the user relation/edge.
	UserColumn = "redemption_user"
)

Variables

View Source
var Columns = []string{
	FieldID,
	FieldRedeemedAt,
}

Columns holds all SQL columns for redemption fields.

View Source
var ForeignKeys = []string{
	"accessory_redemptions",
	"redemption_user",
	"voucher_redemptions",
}

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

Functions

func And

func And(predicates ...predicate.Redemption) predicate.Redemption

And groups predicates with the AND operator between them.

func HasAccessory

func HasAccessory() predicate.Redemption

HasAccessory applies the HasEdge predicate on the "accessory" edge.

func HasAccessoryWith

func HasAccessoryWith(preds ...predicate.Accessory) predicate.Redemption

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

func HasUser

func HasUser() predicate.Redemption

HasUser applies the HasEdge predicate on the "user" edge.

func HasUserWith

func HasUserWith(preds ...predicate.User) predicate.Redemption

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

func HasVoucher

func HasVoucher() predicate.Redemption

HasVoucher applies the HasEdge predicate on the "voucher" edge.

func HasVoucherWith

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

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

func ID

func ID(id int) predicate.Redemption

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int) predicate.Redemption

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int) predicate.Redemption

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int) predicate.Redemption

IDGTE applies the GTE predicate on the ID field.

func IDIn

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

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int) predicate.Redemption

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int) predicate.Redemption

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int) predicate.Redemption

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

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

IDNotIn applies the NotIn predicate on the ID field.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.Redemption) predicate.Redemption

Or groups predicates with the OR operator between them.

func RedeemedAt

func RedeemedAt(v time.Time) predicate.Redemption

RedeemedAt applies equality check predicate on the "redeemed_at" field. It's identical to RedeemedAtEQ.

func RedeemedAtEQ

func RedeemedAtEQ(v time.Time) predicate.Redemption

RedeemedAtEQ applies the EQ predicate on the "redeemed_at" field.

func RedeemedAtGT

func RedeemedAtGT(v time.Time) predicate.Redemption

RedeemedAtGT applies the GT predicate on the "redeemed_at" field.

func RedeemedAtGTE

func RedeemedAtGTE(v time.Time) predicate.Redemption

RedeemedAtGTE applies the GTE predicate on the "redeemed_at" field.

func RedeemedAtIn

func RedeemedAtIn(vs ...time.Time) predicate.Redemption

RedeemedAtIn applies the In predicate on the "redeemed_at" field.

func RedeemedAtLT

func RedeemedAtLT(v time.Time) predicate.Redemption

RedeemedAtLT applies the LT predicate on the "redeemed_at" field.

func RedeemedAtLTE

func RedeemedAtLTE(v time.Time) predicate.Redemption

RedeemedAtLTE applies the LTE predicate on the "redeemed_at" field.

func RedeemedAtNEQ

func RedeemedAtNEQ(v time.Time) predicate.Redemption

RedeemedAtNEQ applies the NEQ predicate on the "redeemed_at" field.

func RedeemedAtNotIn

func RedeemedAtNotIn(vs ...time.Time) predicate.Redemption

RedeemedAtNotIn applies the NotIn predicate on the "redeemed_at" 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 Redemption queries.

func ByAccessoryField

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

ByAccessoryField orders the results by accessory field.

func ByID

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

ByID orders the results by the id field.

func ByRedeemedAt

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

ByRedeemedAt orders the results by the redeemed_at field.

func ByUserField

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

ByUserField orders the results by user field.

func ByVoucherField

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

ByVoucherField orders the results by voucher field.

Jump to

Keyboard shortcuts

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