coupon

package
v1.0.21 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2025 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the coupon type in the database.
	Label = "coupon"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldTenantID holds the string denoting the tenant_id field in the database.
	FieldTenantID = "tenant_id"
	// FieldStatus holds the string denoting the status field in the database.
	FieldStatus = "status"
	// FieldCreatedAt holds the string denoting the created_at field in the database.
	FieldCreatedAt = "created_at"
	// FieldUpdatedAt holds the string denoting the updated_at field in the database.
	FieldUpdatedAt = "updated_at"
	// FieldCreatedBy holds the string denoting the created_by field in the database.
	FieldCreatedBy = "created_by"
	// FieldUpdatedBy holds the string denoting the updated_by field in the database.
	FieldUpdatedBy = "updated_by"
	// FieldEnvironmentID holds the string denoting the environment_id field in the database.
	FieldEnvironmentID = "environment_id"
	// FieldName holds the string denoting the name field in the database.
	FieldName = "name"
	// FieldRedeemAfter holds the string denoting the redeem_after field in the database.
	FieldRedeemAfter = "redeem_after"
	// FieldRedeemBefore holds the string denoting the redeem_before field in the database.
	FieldRedeemBefore = "redeem_before"
	// FieldMaxRedemptions holds the string denoting the max_redemptions field in the database.
	FieldMaxRedemptions = "max_redemptions"
	// FieldTotalRedemptions holds the string denoting the total_redemptions field in the database.
	FieldTotalRedemptions = "total_redemptions"
	// FieldRules holds the string denoting the rules field in the database.
	FieldRules = "rules"
	// FieldAmountOff holds the string denoting the amount_off field in the database.
	FieldAmountOff = "amount_off"
	// FieldPercentageOff holds the string denoting the percentage_off field in the database.
	FieldPercentageOff = "percentage_off"
	// FieldType holds the string denoting the type field in the database.
	FieldType = "type"
	// FieldCadence holds the string denoting the cadence field in the database.
	FieldCadence = "cadence"
	// FieldDurationInPeriods holds the string denoting the duration_in_periods field in the database.
	FieldDurationInPeriods = "duration_in_periods"
	// FieldCurrency holds the string denoting the currency field in the database.
	FieldCurrency = "currency"
	// FieldMetadata holds the string denoting the metadata field in the database.
	FieldMetadata = "metadata"
	// EdgeCouponAssociations holds the string denoting the coupon_associations edge name in mutations.
	EdgeCouponAssociations = "coupon_associations"
	// EdgeCouponApplications holds the string denoting the coupon_applications edge name in mutations.
	EdgeCouponApplications = "coupon_applications"
	// Table holds the table name of the coupon in the database.
	Table = "coupons"
	// CouponAssociationsTable is the table that holds the coupon_associations relation/edge.
	CouponAssociationsTable = "coupon_associations"
	// CouponAssociationsInverseTable is the table name for the CouponAssociation entity.
	// It exists in this package in order to avoid circular dependency with the "couponassociation" package.
	CouponAssociationsInverseTable = "coupon_associations"
	// CouponAssociationsColumn is the table column denoting the coupon_associations relation/edge.
	CouponAssociationsColumn = "coupon_id"
	// CouponApplicationsTable is the table that holds the coupon_applications relation/edge.
	CouponApplicationsTable = "coupon_applications"
	// CouponApplicationsInverseTable is the table name for the CouponApplication entity.
	// It exists in this package in order to avoid circular dependency with the "couponapplication" package.
	CouponApplicationsInverseTable = "coupon_applications"
	// CouponApplicationsColumn is the table column denoting the coupon_applications relation/edge.
	CouponApplicationsColumn = "coupon_id"
)

Variables

View Source
var (
	// TenantIDValidator is a validator for the "tenant_id" field. It is called by the builders before save.
	TenantIDValidator func(string) error
	// DefaultStatus holds the default value on creation for the "status" field.
	DefaultStatus string
	// DefaultCreatedAt holds the default value on creation for the "created_at" field.
	DefaultCreatedAt func() time.Time
	// DefaultUpdatedAt holds the default value on creation for the "updated_at" field.
	DefaultUpdatedAt func() time.Time
	// UpdateDefaultUpdatedAt holds the default value on update for the "updated_at" field.
	UpdateDefaultUpdatedAt func() time.Time
	// DefaultEnvironmentID holds the default value on creation for the "environment_id" field.
	DefaultEnvironmentID string
	// NameValidator is a validator for the "name" field. It is called by the builders before save.
	NameValidator func(string) error
	// DefaultTotalRedemptions holds the default value on creation for the "total_redemptions" field.
	DefaultTotalRedemptions int
	// DefaultAmountOff holds the default value on creation for the "amount_off" field.
	DefaultAmountOff decimal.Decimal
	// DefaultPercentageOff holds the default value on creation for the "percentage_off" field.
	DefaultPercentageOff decimal.Decimal
	// DefaultType holds the default value on creation for the "type" field.
	DefaultType string
	// TypeValidator is a validator for the "type" field. It is called by the builders before save.
	TypeValidator func(string) error
	// DefaultCadence holds the default value on creation for the "cadence" field.
	DefaultCadence string
	// CadenceValidator is a validator for the "cadence" field. It is called by the builders before save.
	CadenceValidator func(string) error
)

Columns holds all SQL columns for coupon fields.

Functions

func AmountOff

func AmountOff(v decimal.Decimal) predicate.Coupon

AmountOff applies equality check predicate on the "amount_off" field. It's identical to AmountOffEQ.

func AmountOffEQ

func AmountOffEQ(v decimal.Decimal) predicate.Coupon

AmountOffEQ applies the EQ predicate on the "amount_off" field.

func AmountOffGT

func AmountOffGT(v decimal.Decimal) predicate.Coupon

AmountOffGT applies the GT predicate on the "amount_off" field.

func AmountOffGTE

func AmountOffGTE(v decimal.Decimal) predicate.Coupon

AmountOffGTE applies the GTE predicate on the "amount_off" field.

func AmountOffIn

func AmountOffIn(vs ...decimal.Decimal) predicate.Coupon

AmountOffIn applies the In predicate on the "amount_off" field.

func AmountOffIsNil

func AmountOffIsNil() predicate.Coupon

AmountOffIsNil applies the IsNil predicate on the "amount_off" field.

func AmountOffLT

func AmountOffLT(v decimal.Decimal) predicate.Coupon

AmountOffLT applies the LT predicate on the "amount_off" field.

func AmountOffLTE

func AmountOffLTE(v decimal.Decimal) predicate.Coupon

AmountOffLTE applies the LTE predicate on the "amount_off" field.

func AmountOffNEQ

func AmountOffNEQ(v decimal.Decimal) predicate.Coupon

AmountOffNEQ applies the NEQ predicate on the "amount_off" field.

func AmountOffNotIn

func AmountOffNotIn(vs ...decimal.Decimal) predicate.Coupon

AmountOffNotIn applies the NotIn predicate on the "amount_off" field.

func AmountOffNotNil

func AmountOffNotNil() predicate.Coupon

AmountOffNotNil applies the NotNil predicate on the "amount_off" field.

func And

func And(predicates ...predicate.Coupon) predicate.Coupon

And groups predicates with the AND operator between them.

func Cadence

func Cadence(v string) predicate.Coupon

Cadence applies equality check predicate on the "cadence" field. It's identical to CadenceEQ.

func CadenceContains

func CadenceContains(v string) predicate.Coupon

CadenceContains applies the Contains predicate on the "cadence" field.

func CadenceContainsFold

func CadenceContainsFold(v string) predicate.Coupon

CadenceContainsFold applies the ContainsFold predicate on the "cadence" field.

func CadenceEQ

func CadenceEQ(v string) predicate.Coupon

CadenceEQ applies the EQ predicate on the "cadence" field.

func CadenceEqualFold

func CadenceEqualFold(v string) predicate.Coupon

CadenceEqualFold applies the EqualFold predicate on the "cadence" field.

func CadenceGT

func CadenceGT(v string) predicate.Coupon

CadenceGT applies the GT predicate on the "cadence" field.

func CadenceGTE

func CadenceGTE(v string) predicate.Coupon

CadenceGTE applies the GTE predicate on the "cadence" field.

func CadenceHasPrefix

func CadenceHasPrefix(v string) predicate.Coupon

CadenceHasPrefix applies the HasPrefix predicate on the "cadence" field.

func CadenceHasSuffix

func CadenceHasSuffix(v string) predicate.Coupon

CadenceHasSuffix applies the HasSuffix predicate on the "cadence" field.

func CadenceIn

func CadenceIn(vs ...string) predicate.Coupon

CadenceIn applies the In predicate on the "cadence" field.

func CadenceLT

func CadenceLT(v string) predicate.Coupon

CadenceLT applies the LT predicate on the "cadence" field.

func CadenceLTE

func CadenceLTE(v string) predicate.Coupon

CadenceLTE applies the LTE predicate on the "cadence" field.

func CadenceNEQ

func CadenceNEQ(v string) predicate.Coupon

CadenceNEQ applies the NEQ predicate on the "cadence" field.

func CadenceNotIn

func CadenceNotIn(vs ...string) predicate.Coupon

CadenceNotIn applies the NotIn predicate on the "cadence" field.

func CreatedAt

func CreatedAt(v time.Time) predicate.Coupon

CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.

func CreatedAtEQ

func CreatedAtEQ(v time.Time) predicate.Coupon

CreatedAtEQ applies the EQ predicate on the "created_at" field.

func CreatedAtGT

func CreatedAtGT(v time.Time) predicate.Coupon

CreatedAtGT applies the GT predicate on the "created_at" field.

func CreatedAtGTE

func CreatedAtGTE(v time.Time) predicate.Coupon

CreatedAtGTE applies the GTE predicate on the "created_at" field.

func CreatedAtIn

func CreatedAtIn(vs ...time.Time) predicate.Coupon

CreatedAtIn applies the In predicate on the "created_at" field.

func CreatedAtLT

func CreatedAtLT(v time.Time) predicate.Coupon

CreatedAtLT applies the LT predicate on the "created_at" field.

func CreatedAtLTE

func CreatedAtLTE(v time.Time) predicate.Coupon

CreatedAtLTE applies the LTE predicate on the "created_at" field.

func CreatedAtNEQ

func CreatedAtNEQ(v time.Time) predicate.Coupon

CreatedAtNEQ applies the NEQ predicate on the "created_at" field.

func CreatedAtNotIn

func CreatedAtNotIn(vs ...time.Time) predicate.Coupon

CreatedAtNotIn applies the NotIn predicate on the "created_at" field.

func CreatedBy

func CreatedBy(v string) predicate.Coupon

CreatedBy applies equality check predicate on the "created_by" field. It's identical to CreatedByEQ.

func CreatedByContains

func CreatedByContains(v string) predicate.Coupon

CreatedByContains applies the Contains predicate on the "created_by" field.

func CreatedByContainsFold

func CreatedByContainsFold(v string) predicate.Coupon

CreatedByContainsFold applies the ContainsFold predicate on the "created_by" field.

func CreatedByEQ

func CreatedByEQ(v string) predicate.Coupon

CreatedByEQ applies the EQ predicate on the "created_by" field.

func CreatedByEqualFold

func CreatedByEqualFold(v string) predicate.Coupon

CreatedByEqualFold applies the EqualFold predicate on the "created_by" field.

func CreatedByGT

func CreatedByGT(v string) predicate.Coupon

CreatedByGT applies the GT predicate on the "created_by" field.

func CreatedByGTE

func CreatedByGTE(v string) predicate.Coupon

CreatedByGTE applies the GTE predicate on the "created_by" field.

func CreatedByHasPrefix

func CreatedByHasPrefix(v string) predicate.Coupon

CreatedByHasPrefix applies the HasPrefix predicate on the "created_by" field.

func CreatedByHasSuffix

func CreatedByHasSuffix(v string) predicate.Coupon

CreatedByHasSuffix applies the HasSuffix predicate on the "created_by" field.

func CreatedByIn

func CreatedByIn(vs ...string) predicate.Coupon

CreatedByIn applies the In predicate on the "created_by" field.

func CreatedByIsNil

func CreatedByIsNil() predicate.Coupon

CreatedByIsNil applies the IsNil predicate on the "created_by" field.

func CreatedByLT

func CreatedByLT(v string) predicate.Coupon

CreatedByLT applies the LT predicate on the "created_by" field.

func CreatedByLTE

func CreatedByLTE(v string) predicate.Coupon

CreatedByLTE applies the LTE predicate on the "created_by" field.

func CreatedByNEQ

func CreatedByNEQ(v string) predicate.Coupon

CreatedByNEQ applies the NEQ predicate on the "created_by" field.

func CreatedByNotIn

func CreatedByNotIn(vs ...string) predicate.Coupon

CreatedByNotIn applies the NotIn predicate on the "created_by" field.

func CreatedByNotNil

func CreatedByNotNil() predicate.Coupon

CreatedByNotNil applies the NotNil predicate on the "created_by" field.

func Currency

func Currency(v string) predicate.Coupon

Currency applies equality check predicate on the "currency" field. It's identical to CurrencyEQ.

func CurrencyContains

func CurrencyContains(v string) predicate.Coupon

CurrencyContains applies the Contains predicate on the "currency" field.

func CurrencyContainsFold

func CurrencyContainsFold(v string) predicate.Coupon

CurrencyContainsFold applies the ContainsFold predicate on the "currency" field.

func CurrencyEQ

func CurrencyEQ(v string) predicate.Coupon

CurrencyEQ applies the EQ predicate on the "currency" field.

func CurrencyEqualFold

func CurrencyEqualFold(v string) predicate.Coupon

CurrencyEqualFold applies the EqualFold predicate on the "currency" field.

func CurrencyGT

func CurrencyGT(v string) predicate.Coupon

CurrencyGT applies the GT predicate on the "currency" field.

func CurrencyGTE

func CurrencyGTE(v string) predicate.Coupon

CurrencyGTE applies the GTE predicate on the "currency" field.

func CurrencyHasPrefix

func CurrencyHasPrefix(v string) predicate.Coupon

CurrencyHasPrefix applies the HasPrefix predicate on the "currency" field.

func CurrencyHasSuffix

func CurrencyHasSuffix(v string) predicate.Coupon

CurrencyHasSuffix applies the HasSuffix predicate on the "currency" field.

func CurrencyIn

func CurrencyIn(vs ...string) predicate.Coupon

CurrencyIn applies the In predicate on the "currency" field.

func CurrencyIsNil

func CurrencyIsNil() predicate.Coupon

CurrencyIsNil applies the IsNil predicate on the "currency" field.

func CurrencyLT

func CurrencyLT(v string) predicate.Coupon

CurrencyLT applies the LT predicate on the "currency" field.

func CurrencyLTE

func CurrencyLTE(v string) predicate.Coupon

CurrencyLTE applies the LTE predicate on the "currency" field.

func CurrencyNEQ

func CurrencyNEQ(v string) predicate.Coupon

CurrencyNEQ applies the NEQ predicate on the "currency" field.

func CurrencyNotIn

func CurrencyNotIn(vs ...string) predicate.Coupon

CurrencyNotIn applies the NotIn predicate on the "currency" field.

func CurrencyNotNil

func CurrencyNotNil() predicate.Coupon

CurrencyNotNil applies the NotNil predicate on the "currency" field.

func DurationInPeriods

func DurationInPeriods(v int) predicate.Coupon

DurationInPeriods applies equality check predicate on the "duration_in_periods" field. It's identical to DurationInPeriodsEQ.

func DurationInPeriodsEQ

func DurationInPeriodsEQ(v int) predicate.Coupon

DurationInPeriodsEQ applies the EQ predicate on the "duration_in_periods" field.

func DurationInPeriodsGT

func DurationInPeriodsGT(v int) predicate.Coupon

DurationInPeriodsGT applies the GT predicate on the "duration_in_periods" field.

func DurationInPeriodsGTE

func DurationInPeriodsGTE(v int) predicate.Coupon

DurationInPeriodsGTE applies the GTE predicate on the "duration_in_periods" field.

func DurationInPeriodsIn

func DurationInPeriodsIn(vs ...int) predicate.Coupon

DurationInPeriodsIn applies the In predicate on the "duration_in_periods" field.

func DurationInPeriodsIsNil

func DurationInPeriodsIsNil() predicate.Coupon

DurationInPeriodsIsNil applies the IsNil predicate on the "duration_in_periods" field.

func DurationInPeriodsLT

func DurationInPeriodsLT(v int) predicate.Coupon

DurationInPeriodsLT applies the LT predicate on the "duration_in_periods" field.

func DurationInPeriodsLTE

func DurationInPeriodsLTE(v int) predicate.Coupon

DurationInPeriodsLTE applies the LTE predicate on the "duration_in_periods" field.

func DurationInPeriodsNEQ

func DurationInPeriodsNEQ(v int) predicate.Coupon

DurationInPeriodsNEQ applies the NEQ predicate on the "duration_in_periods" field.

func DurationInPeriodsNotIn

func DurationInPeriodsNotIn(vs ...int) predicate.Coupon

DurationInPeriodsNotIn applies the NotIn predicate on the "duration_in_periods" field.

func DurationInPeriodsNotNil

func DurationInPeriodsNotNil() predicate.Coupon

DurationInPeriodsNotNil applies the NotNil predicate on the "duration_in_periods" field.

func EnvironmentID

func EnvironmentID(v string) predicate.Coupon

EnvironmentID applies equality check predicate on the "environment_id" field. It's identical to EnvironmentIDEQ.

func EnvironmentIDContains

func EnvironmentIDContains(v string) predicate.Coupon

EnvironmentIDContains applies the Contains predicate on the "environment_id" field.

func EnvironmentIDContainsFold

func EnvironmentIDContainsFold(v string) predicate.Coupon

EnvironmentIDContainsFold applies the ContainsFold predicate on the "environment_id" field.

func EnvironmentIDEQ

func EnvironmentIDEQ(v string) predicate.Coupon

EnvironmentIDEQ applies the EQ predicate on the "environment_id" field.

func EnvironmentIDEqualFold

func EnvironmentIDEqualFold(v string) predicate.Coupon

EnvironmentIDEqualFold applies the EqualFold predicate on the "environment_id" field.

func EnvironmentIDGT

func EnvironmentIDGT(v string) predicate.Coupon

EnvironmentIDGT applies the GT predicate on the "environment_id" field.

func EnvironmentIDGTE

func EnvironmentIDGTE(v string) predicate.Coupon

EnvironmentIDGTE applies the GTE predicate on the "environment_id" field.

func EnvironmentIDHasPrefix

func EnvironmentIDHasPrefix(v string) predicate.Coupon

EnvironmentIDHasPrefix applies the HasPrefix predicate on the "environment_id" field.

func EnvironmentIDHasSuffix

func EnvironmentIDHasSuffix(v string) predicate.Coupon

EnvironmentIDHasSuffix applies the HasSuffix predicate on the "environment_id" field.

func EnvironmentIDIn

func EnvironmentIDIn(vs ...string) predicate.Coupon

EnvironmentIDIn applies the In predicate on the "environment_id" field.

func EnvironmentIDIsNil

func EnvironmentIDIsNil() predicate.Coupon

EnvironmentIDIsNil applies the IsNil predicate on the "environment_id" field.

func EnvironmentIDLT

func EnvironmentIDLT(v string) predicate.Coupon

EnvironmentIDLT applies the LT predicate on the "environment_id" field.

func EnvironmentIDLTE

func EnvironmentIDLTE(v string) predicate.Coupon

EnvironmentIDLTE applies the LTE predicate on the "environment_id" field.

func EnvironmentIDNEQ

func EnvironmentIDNEQ(v string) predicate.Coupon

EnvironmentIDNEQ applies the NEQ predicate on the "environment_id" field.

func EnvironmentIDNotIn

func EnvironmentIDNotIn(vs ...string) predicate.Coupon

EnvironmentIDNotIn applies the NotIn predicate on the "environment_id" field.

func EnvironmentIDNotNil

func EnvironmentIDNotNil() predicate.Coupon

EnvironmentIDNotNil applies the NotNil predicate on the "environment_id" field.

func HasCouponApplications

func HasCouponApplications() predicate.Coupon

HasCouponApplications applies the HasEdge predicate on the "coupon_applications" edge.

func HasCouponApplicationsWith

func HasCouponApplicationsWith(preds ...predicate.CouponApplication) predicate.Coupon

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

func HasCouponAssociations

func HasCouponAssociations() predicate.Coupon

HasCouponAssociations applies the HasEdge predicate on the "coupon_associations" edge.

func HasCouponAssociationsWith

func HasCouponAssociationsWith(preds ...predicate.CouponAssociation) predicate.Coupon

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

func ID

func ID(id string) predicate.Coupon

ID filters vertices based on their ID field.

func IDContainsFold

func IDContainsFold(id string) predicate.Coupon

IDContainsFold applies the ContainsFold predicate on the ID field.

func IDEQ

func IDEQ(id string) predicate.Coupon

IDEQ applies the EQ predicate on the ID field.

func IDEqualFold

func IDEqualFold(id string) predicate.Coupon

IDEqualFold applies the EqualFold predicate on the ID field.

func IDGT

func IDGT(id string) predicate.Coupon

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id string) predicate.Coupon

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...string) predicate.Coupon

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id string) predicate.Coupon

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id string) predicate.Coupon

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id string) predicate.Coupon

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...string) predicate.Coupon

IDNotIn applies the NotIn predicate on the ID field.

func MaxRedemptions

func MaxRedemptions(v int) predicate.Coupon

MaxRedemptions applies equality check predicate on the "max_redemptions" field. It's identical to MaxRedemptionsEQ.

func MaxRedemptionsEQ

func MaxRedemptionsEQ(v int) predicate.Coupon

MaxRedemptionsEQ applies the EQ predicate on the "max_redemptions" field.

func MaxRedemptionsGT

func MaxRedemptionsGT(v int) predicate.Coupon

MaxRedemptionsGT applies the GT predicate on the "max_redemptions" field.

func MaxRedemptionsGTE

func MaxRedemptionsGTE(v int) predicate.Coupon

MaxRedemptionsGTE applies the GTE predicate on the "max_redemptions" field.

func MaxRedemptionsIn

func MaxRedemptionsIn(vs ...int) predicate.Coupon

MaxRedemptionsIn applies the In predicate on the "max_redemptions" field.

func MaxRedemptionsIsNil

func MaxRedemptionsIsNil() predicate.Coupon

MaxRedemptionsIsNil applies the IsNil predicate on the "max_redemptions" field.

func MaxRedemptionsLT

func MaxRedemptionsLT(v int) predicate.Coupon

MaxRedemptionsLT applies the LT predicate on the "max_redemptions" field.

func MaxRedemptionsLTE

func MaxRedemptionsLTE(v int) predicate.Coupon

MaxRedemptionsLTE applies the LTE predicate on the "max_redemptions" field.

func MaxRedemptionsNEQ

func MaxRedemptionsNEQ(v int) predicate.Coupon

MaxRedemptionsNEQ applies the NEQ predicate on the "max_redemptions" field.

func MaxRedemptionsNotIn

func MaxRedemptionsNotIn(vs ...int) predicate.Coupon

MaxRedemptionsNotIn applies the NotIn predicate on the "max_redemptions" field.

func MaxRedemptionsNotNil

func MaxRedemptionsNotNil() predicate.Coupon

MaxRedemptionsNotNil applies the NotNil predicate on the "max_redemptions" field.

func MetadataIsNil

func MetadataIsNil() predicate.Coupon

MetadataIsNil applies the IsNil predicate on the "metadata" field.

func MetadataNotNil

func MetadataNotNil() predicate.Coupon

MetadataNotNil applies the NotNil predicate on the "metadata" field.

func Name

func Name(v string) predicate.Coupon

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

func NameContains

func NameContains(v string) predicate.Coupon

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

func NameContainsFold

func NameContainsFold(v string) predicate.Coupon

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

func NameEQ

func NameEQ(v string) predicate.Coupon

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

func NameEqualFold

func NameEqualFold(v string) predicate.Coupon

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

func NameGT

func NameGT(v string) predicate.Coupon

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

func NameGTE

func NameGTE(v string) predicate.Coupon

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

func NameHasPrefix

func NameHasPrefix(v string) predicate.Coupon

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

func NameHasSuffix

func NameHasSuffix(v string) predicate.Coupon

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

func NameIn

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

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

func NameLT

func NameLT(v string) predicate.Coupon

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

func NameLTE

func NameLTE(v string) predicate.Coupon

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

func NameNEQ

func NameNEQ(v string) predicate.Coupon

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

func NameNotIn

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

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.Coupon) predicate.Coupon

Or groups predicates with the OR operator between them.

func PercentageOff

func PercentageOff(v decimal.Decimal) predicate.Coupon

PercentageOff applies equality check predicate on the "percentage_off" field. It's identical to PercentageOffEQ.

func PercentageOffEQ

func PercentageOffEQ(v decimal.Decimal) predicate.Coupon

PercentageOffEQ applies the EQ predicate on the "percentage_off" field.

func PercentageOffGT

func PercentageOffGT(v decimal.Decimal) predicate.Coupon

PercentageOffGT applies the GT predicate on the "percentage_off" field.

func PercentageOffGTE

func PercentageOffGTE(v decimal.Decimal) predicate.Coupon

PercentageOffGTE applies the GTE predicate on the "percentage_off" field.

func PercentageOffIn

func PercentageOffIn(vs ...decimal.Decimal) predicate.Coupon

PercentageOffIn applies the In predicate on the "percentage_off" field.

func PercentageOffIsNil

func PercentageOffIsNil() predicate.Coupon

PercentageOffIsNil applies the IsNil predicate on the "percentage_off" field.

func PercentageOffLT

func PercentageOffLT(v decimal.Decimal) predicate.Coupon

PercentageOffLT applies the LT predicate on the "percentage_off" field.

func PercentageOffLTE

func PercentageOffLTE(v decimal.Decimal) predicate.Coupon

PercentageOffLTE applies the LTE predicate on the "percentage_off" field.

func PercentageOffNEQ

func PercentageOffNEQ(v decimal.Decimal) predicate.Coupon

PercentageOffNEQ applies the NEQ predicate on the "percentage_off" field.

func PercentageOffNotIn

func PercentageOffNotIn(vs ...decimal.Decimal) predicate.Coupon

PercentageOffNotIn applies the NotIn predicate on the "percentage_off" field.

func PercentageOffNotNil

func PercentageOffNotNil() predicate.Coupon

PercentageOffNotNil applies the NotNil predicate on the "percentage_off" field.

func RedeemAfter

func RedeemAfter(v time.Time) predicate.Coupon

RedeemAfter applies equality check predicate on the "redeem_after" field. It's identical to RedeemAfterEQ.

func RedeemAfterEQ

func RedeemAfterEQ(v time.Time) predicate.Coupon

RedeemAfterEQ applies the EQ predicate on the "redeem_after" field.

func RedeemAfterGT

func RedeemAfterGT(v time.Time) predicate.Coupon

RedeemAfterGT applies the GT predicate on the "redeem_after" field.

func RedeemAfterGTE

func RedeemAfterGTE(v time.Time) predicate.Coupon

RedeemAfterGTE applies the GTE predicate on the "redeem_after" field.

func RedeemAfterIn

func RedeemAfterIn(vs ...time.Time) predicate.Coupon

RedeemAfterIn applies the In predicate on the "redeem_after" field.

func RedeemAfterIsNil

func RedeemAfterIsNil() predicate.Coupon

RedeemAfterIsNil applies the IsNil predicate on the "redeem_after" field.

func RedeemAfterLT

func RedeemAfterLT(v time.Time) predicate.Coupon

RedeemAfterLT applies the LT predicate on the "redeem_after" field.

func RedeemAfterLTE

func RedeemAfterLTE(v time.Time) predicate.Coupon

RedeemAfterLTE applies the LTE predicate on the "redeem_after" field.

func RedeemAfterNEQ

func RedeemAfterNEQ(v time.Time) predicate.Coupon

RedeemAfterNEQ applies the NEQ predicate on the "redeem_after" field.

func RedeemAfterNotIn

func RedeemAfterNotIn(vs ...time.Time) predicate.Coupon

RedeemAfterNotIn applies the NotIn predicate on the "redeem_after" field.

func RedeemAfterNotNil

func RedeemAfterNotNil() predicate.Coupon

RedeemAfterNotNil applies the NotNil predicate on the "redeem_after" field.

func RedeemBefore

func RedeemBefore(v time.Time) predicate.Coupon

RedeemBefore applies equality check predicate on the "redeem_before" field. It's identical to RedeemBeforeEQ.

func RedeemBeforeEQ

func RedeemBeforeEQ(v time.Time) predicate.Coupon

RedeemBeforeEQ applies the EQ predicate on the "redeem_before" field.

func RedeemBeforeGT

func RedeemBeforeGT(v time.Time) predicate.Coupon

RedeemBeforeGT applies the GT predicate on the "redeem_before" field.

func RedeemBeforeGTE

func RedeemBeforeGTE(v time.Time) predicate.Coupon

RedeemBeforeGTE applies the GTE predicate on the "redeem_before" field.

func RedeemBeforeIn

func RedeemBeforeIn(vs ...time.Time) predicate.Coupon

RedeemBeforeIn applies the In predicate on the "redeem_before" field.

func RedeemBeforeIsNil

func RedeemBeforeIsNil() predicate.Coupon

RedeemBeforeIsNil applies the IsNil predicate on the "redeem_before" field.

func RedeemBeforeLT

func RedeemBeforeLT(v time.Time) predicate.Coupon

RedeemBeforeLT applies the LT predicate on the "redeem_before" field.

func RedeemBeforeLTE

func RedeemBeforeLTE(v time.Time) predicate.Coupon

RedeemBeforeLTE applies the LTE predicate on the "redeem_before" field.

func RedeemBeforeNEQ

func RedeemBeforeNEQ(v time.Time) predicate.Coupon

RedeemBeforeNEQ applies the NEQ predicate on the "redeem_before" field.

func RedeemBeforeNotIn

func RedeemBeforeNotIn(vs ...time.Time) predicate.Coupon

RedeemBeforeNotIn applies the NotIn predicate on the "redeem_before" field.

func RedeemBeforeNotNil

func RedeemBeforeNotNil() predicate.Coupon

RedeemBeforeNotNil applies the NotNil predicate on the "redeem_before" field.

func RulesIsNil

func RulesIsNil() predicate.Coupon

RulesIsNil applies the IsNil predicate on the "rules" field.

func RulesNotNil

func RulesNotNil() predicate.Coupon

RulesNotNil applies the NotNil predicate on the "rules" field.

func Status

func Status(v string) predicate.Coupon

Status applies equality check predicate on the "status" field. It's identical to StatusEQ.

func StatusContains

func StatusContains(v string) predicate.Coupon

StatusContains applies the Contains predicate on the "status" field.

func StatusContainsFold

func StatusContainsFold(v string) predicate.Coupon

StatusContainsFold applies the ContainsFold predicate on the "status" field.

func StatusEQ

func StatusEQ(v string) predicate.Coupon

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

func StatusEqualFold

func StatusEqualFold(v string) predicate.Coupon

StatusEqualFold applies the EqualFold predicate on the "status" field.

func StatusGT

func StatusGT(v string) predicate.Coupon

StatusGT applies the GT predicate on the "status" field.

func StatusGTE

func StatusGTE(v string) predicate.Coupon

StatusGTE applies the GTE predicate on the "status" field.

func StatusHasPrefix

func StatusHasPrefix(v string) predicate.Coupon

StatusHasPrefix applies the HasPrefix predicate on the "status" field.

func StatusHasSuffix

func StatusHasSuffix(v string) predicate.Coupon

StatusHasSuffix applies the HasSuffix predicate on the "status" field.

func StatusIn

func StatusIn(vs ...string) predicate.Coupon

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

func StatusLT

func StatusLT(v string) predicate.Coupon

StatusLT applies the LT predicate on the "status" field.

func StatusLTE

func StatusLTE(v string) predicate.Coupon

StatusLTE applies the LTE predicate on the "status" field.

func StatusNEQ

func StatusNEQ(v string) predicate.Coupon

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

func StatusNotIn

func StatusNotIn(vs ...string) predicate.Coupon

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

func TenantID

func TenantID(v string) predicate.Coupon

TenantID applies equality check predicate on the "tenant_id" field. It's identical to TenantIDEQ.

func TenantIDContains

func TenantIDContains(v string) predicate.Coupon

TenantIDContains applies the Contains predicate on the "tenant_id" field.

func TenantIDContainsFold

func TenantIDContainsFold(v string) predicate.Coupon

TenantIDContainsFold applies the ContainsFold predicate on the "tenant_id" field.

func TenantIDEQ

func TenantIDEQ(v string) predicate.Coupon

TenantIDEQ applies the EQ predicate on the "tenant_id" field.

func TenantIDEqualFold

func TenantIDEqualFold(v string) predicate.Coupon

TenantIDEqualFold applies the EqualFold predicate on the "tenant_id" field.

func TenantIDGT

func TenantIDGT(v string) predicate.Coupon

TenantIDGT applies the GT predicate on the "tenant_id" field.

func TenantIDGTE

func TenantIDGTE(v string) predicate.Coupon

TenantIDGTE applies the GTE predicate on the "tenant_id" field.

func TenantIDHasPrefix

func TenantIDHasPrefix(v string) predicate.Coupon

TenantIDHasPrefix applies the HasPrefix predicate on the "tenant_id" field.

func TenantIDHasSuffix

func TenantIDHasSuffix(v string) predicate.Coupon

TenantIDHasSuffix applies the HasSuffix predicate on the "tenant_id" field.

func TenantIDIn

func TenantIDIn(vs ...string) predicate.Coupon

TenantIDIn applies the In predicate on the "tenant_id" field.

func TenantIDLT

func TenantIDLT(v string) predicate.Coupon

TenantIDLT applies the LT predicate on the "tenant_id" field.

func TenantIDLTE

func TenantIDLTE(v string) predicate.Coupon

TenantIDLTE applies the LTE predicate on the "tenant_id" field.

func TenantIDNEQ

func TenantIDNEQ(v string) predicate.Coupon

TenantIDNEQ applies the NEQ predicate on the "tenant_id" field.

func TenantIDNotIn

func TenantIDNotIn(vs ...string) predicate.Coupon

TenantIDNotIn applies the NotIn predicate on the "tenant_id" field.

func TotalRedemptions

func TotalRedemptions(v int) predicate.Coupon

TotalRedemptions applies equality check predicate on the "total_redemptions" field. It's identical to TotalRedemptionsEQ.

func TotalRedemptionsEQ

func TotalRedemptionsEQ(v int) predicate.Coupon

TotalRedemptionsEQ applies the EQ predicate on the "total_redemptions" field.

func TotalRedemptionsGT

func TotalRedemptionsGT(v int) predicate.Coupon

TotalRedemptionsGT applies the GT predicate on the "total_redemptions" field.

func TotalRedemptionsGTE

func TotalRedemptionsGTE(v int) predicate.Coupon

TotalRedemptionsGTE applies the GTE predicate on the "total_redemptions" field.

func TotalRedemptionsIn

func TotalRedemptionsIn(vs ...int) predicate.Coupon

TotalRedemptionsIn applies the In predicate on the "total_redemptions" field.

func TotalRedemptionsLT

func TotalRedemptionsLT(v int) predicate.Coupon

TotalRedemptionsLT applies the LT predicate on the "total_redemptions" field.

func TotalRedemptionsLTE

func TotalRedemptionsLTE(v int) predicate.Coupon

TotalRedemptionsLTE applies the LTE predicate on the "total_redemptions" field.

func TotalRedemptionsNEQ

func TotalRedemptionsNEQ(v int) predicate.Coupon

TotalRedemptionsNEQ applies the NEQ predicate on the "total_redemptions" field.

func TotalRedemptionsNotIn

func TotalRedemptionsNotIn(vs ...int) predicate.Coupon

TotalRedemptionsNotIn applies the NotIn predicate on the "total_redemptions" field.

func Type

func Type(v string) predicate.Coupon

Type applies equality check predicate on the "type" field. It's identical to TypeEQ.

func TypeContains

func TypeContains(v string) predicate.Coupon

TypeContains applies the Contains predicate on the "type" field.

func TypeContainsFold

func TypeContainsFold(v string) predicate.Coupon

TypeContainsFold applies the ContainsFold predicate on the "type" field.

func TypeEQ

func TypeEQ(v string) predicate.Coupon

TypeEQ applies the EQ predicate on the "type" field.

func TypeEqualFold

func TypeEqualFold(v string) predicate.Coupon

TypeEqualFold applies the EqualFold predicate on the "type" field.

func TypeGT

func TypeGT(v string) predicate.Coupon

TypeGT applies the GT predicate on the "type" field.

func TypeGTE

func TypeGTE(v string) predicate.Coupon

TypeGTE applies the GTE predicate on the "type" field.

func TypeHasPrefix

func TypeHasPrefix(v string) predicate.Coupon

TypeHasPrefix applies the HasPrefix predicate on the "type" field.

func TypeHasSuffix

func TypeHasSuffix(v string) predicate.Coupon

TypeHasSuffix applies the HasSuffix predicate on the "type" field.

func TypeIn

func TypeIn(vs ...string) predicate.Coupon

TypeIn applies the In predicate on the "type" field.

func TypeLT

func TypeLT(v string) predicate.Coupon

TypeLT applies the LT predicate on the "type" field.

func TypeLTE

func TypeLTE(v string) predicate.Coupon

TypeLTE applies the LTE predicate on the "type" field.

func TypeNEQ

func TypeNEQ(v string) predicate.Coupon

TypeNEQ applies the NEQ predicate on the "type" field.

func TypeNotIn

func TypeNotIn(vs ...string) predicate.Coupon

TypeNotIn applies the NotIn predicate on the "type" field.

func UpdatedAt

func UpdatedAt(v time.Time) predicate.Coupon

UpdatedAt applies equality check predicate on the "updated_at" field. It's identical to UpdatedAtEQ.

func UpdatedAtEQ

func UpdatedAtEQ(v time.Time) predicate.Coupon

UpdatedAtEQ applies the EQ predicate on the "updated_at" field.

func UpdatedAtGT

func UpdatedAtGT(v time.Time) predicate.Coupon

UpdatedAtGT applies the GT predicate on the "updated_at" field.

func UpdatedAtGTE

func UpdatedAtGTE(v time.Time) predicate.Coupon

UpdatedAtGTE applies the GTE predicate on the "updated_at" field.

func UpdatedAtIn

func UpdatedAtIn(vs ...time.Time) predicate.Coupon

UpdatedAtIn applies the In predicate on the "updated_at" field.

func UpdatedAtLT

func UpdatedAtLT(v time.Time) predicate.Coupon

UpdatedAtLT applies the LT predicate on the "updated_at" field.

func UpdatedAtLTE

func UpdatedAtLTE(v time.Time) predicate.Coupon

UpdatedAtLTE applies the LTE predicate on the "updated_at" field.

func UpdatedAtNEQ

func UpdatedAtNEQ(v time.Time) predicate.Coupon

UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.

func UpdatedAtNotIn

func UpdatedAtNotIn(vs ...time.Time) predicate.Coupon

UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field.

func UpdatedBy

func UpdatedBy(v string) predicate.Coupon

UpdatedBy applies equality check predicate on the "updated_by" field. It's identical to UpdatedByEQ.

func UpdatedByContains

func UpdatedByContains(v string) predicate.Coupon

UpdatedByContains applies the Contains predicate on the "updated_by" field.

func UpdatedByContainsFold

func UpdatedByContainsFold(v string) predicate.Coupon

UpdatedByContainsFold applies the ContainsFold predicate on the "updated_by" field.

func UpdatedByEQ

func UpdatedByEQ(v string) predicate.Coupon

UpdatedByEQ applies the EQ predicate on the "updated_by" field.

func UpdatedByEqualFold

func UpdatedByEqualFold(v string) predicate.Coupon

UpdatedByEqualFold applies the EqualFold predicate on the "updated_by" field.

func UpdatedByGT

func UpdatedByGT(v string) predicate.Coupon

UpdatedByGT applies the GT predicate on the "updated_by" field.

func UpdatedByGTE

func UpdatedByGTE(v string) predicate.Coupon

UpdatedByGTE applies the GTE predicate on the "updated_by" field.

func UpdatedByHasPrefix

func UpdatedByHasPrefix(v string) predicate.Coupon

UpdatedByHasPrefix applies the HasPrefix predicate on the "updated_by" field.

func UpdatedByHasSuffix

func UpdatedByHasSuffix(v string) predicate.Coupon

UpdatedByHasSuffix applies the HasSuffix predicate on the "updated_by" field.

func UpdatedByIn

func UpdatedByIn(vs ...string) predicate.Coupon

UpdatedByIn applies the In predicate on the "updated_by" field.

func UpdatedByIsNil

func UpdatedByIsNil() predicate.Coupon

UpdatedByIsNil applies the IsNil predicate on the "updated_by" field.

func UpdatedByLT

func UpdatedByLT(v string) predicate.Coupon

UpdatedByLT applies the LT predicate on the "updated_by" field.

func UpdatedByLTE

func UpdatedByLTE(v string) predicate.Coupon

UpdatedByLTE applies the LTE predicate on the "updated_by" field.

func UpdatedByNEQ

func UpdatedByNEQ(v string) predicate.Coupon

UpdatedByNEQ applies the NEQ predicate on the "updated_by" field.

func UpdatedByNotIn

func UpdatedByNotIn(vs ...string) predicate.Coupon

UpdatedByNotIn applies the NotIn predicate on the "updated_by" field.

func UpdatedByNotNil

func UpdatedByNotNil() predicate.Coupon

UpdatedByNotNil applies the NotNil predicate on the "updated_by" 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 Coupon queries.

func ByAmountOff

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

ByAmountOff orders the results by the amount_off field.

func ByCadence

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

ByCadence orders the results by the cadence field.

func ByCouponApplications

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

ByCouponApplications orders the results by coupon_applications terms.

func ByCouponApplicationsCount

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

ByCouponApplicationsCount orders the results by coupon_applications count.

func ByCouponAssociations

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

ByCouponAssociations orders the results by coupon_associations terms.

func ByCouponAssociationsCount

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

ByCouponAssociationsCount orders the results by coupon_associations count.

func ByCreatedAt

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

ByCreatedAt orders the results by the created_at field.

func ByCreatedBy

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

ByCreatedBy orders the results by the created_by field.

func ByCurrency

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

ByCurrency orders the results by the currency field.

func ByDurationInPeriods

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

ByDurationInPeriods orders the results by the duration_in_periods field.

func ByEnvironmentID

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

ByEnvironmentID orders the results by the environment_id field.

func ByID

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

ByID orders the results by the id field.

func ByMaxRedemptions

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

ByMaxRedemptions orders the results by the max_redemptions field.

func ByName

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

ByName orders the results by the name field.

func ByPercentageOff

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

ByPercentageOff orders the results by the percentage_off field.

func ByRedeemAfter

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

ByRedeemAfter orders the results by the redeem_after field.

func ByRedeemBefore

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

ByRedeemBefore orders the results by the redeem_before field.

func ByStatus

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

ByStatus orders the results by the status field.

func ByTenantID

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

ByTenantID orders the results by the tenant_id field.

func ByTotalRedemptions

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

ByTotalRedemptions orders the results by the total_redemptions field.

func ByType

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

ByType orders the results by the type field.

func ByUpdatedAt

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

ByUpdatedAt orders the results by the updated_at field.

func ByUpdatedBy

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

ByUpdatedBy orders the results by the updated_by field.

Jump to

Keyboard shortcuts

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