credit

package
v0.0.0-...-d236baf Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2025 License: MIT Imports: 5 Imported by: 2

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the credit type in the database.
	Label = "credit"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldRemainingAmount holds the string denoting the remaining_amount field in the database.
	FieldRemainingAmount = "remaining_amount"
	// FieldStartsAt holds the string denoting the starts_at field in the database.
	FieldStartsAt = "starts_at"
	// FieldExpiresAt holds the string denoting the expires_at field in the database.
	FieldExpiresAt = "expires_at"
	// FieldPeriod holds the string denoting the period field in the database.
	FieldPeriod = "period"
	// FieldStripeLineItemID holds the string denoting the stripe_line_item_id field in the database.
	FieldStripeLineItemID = "stripe_line_item_id"
	// FieldReplenishedAt holds the string denoting the replenished_at field in the database.
	FieldReplenishedAt = "replenished_at"
	// FieldUserID holds the string denoting the user_id field in the database.
	FieldUserID = "user_id"
	// FieldCreditTypeID holds the string denoting the credit_type_id field in the database.
	FieldCreditTypeID = "credit_type_id"
	// 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"
	// EdgeUsers holds the string denoting the users edge name in mutations.
	EdgeUsers = "users"
	// EdgeCreditType holds the string denoting the credit_type edge name in mutations.
	EdgeCreditType = "credit_type"
	// Table holds the table name of the credit in the database.
	Table = "credits"
	// UsersTable is the table that holds the users relation/edge.
	UsersTable = "credits"
	// UsersInverseTable is the table name for the User entity.
	// It exists in this package in order to avoid circular dependency with the "user" package.
	UsersInverseTable = "users"
	// UsersColumn is the table column denoting the users relation/edge.
	UsersColumn = "user_id"
	// CreditTypeTable is the table that holds the credit_type relation/edge.
	CreditTypeTable = "credits"
	// CreditTypeInverseTable is the table name for the CreditType entity.
	// It exists in this package in order to avoid circular dependency with the "credittype" package.
	CreditTypeInverseTable = "credit_types"
	// CreditTypeColumn is the table column denoting the credit_type relation/edge.
	CreditTypeColumn = "credit_type_id"
)

Variables

View Source
var (
	// DefaultStartsAt holds the default value on creation for the "starts_at" field.
	DefaultStartsAt time.Time
	// DefaultPeriod holds the default value on creation for the "period" field.
	DefaultPeriod int
	// DefaultReplenishedAt holds the default value on creation for the "replenished_at" field.
	DefaultReplenishedAt func() time.Time
	// 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
	// DefaultID holds the default value on creation for the "id" field.
	DefaultID func() uuid.UUID
)

Columns holds all SQL columns for credit fields.

Functions

func And

func And(predicates ...predicate.Credit) predicate.Credit

And groups predicates with the AND operator between them.

func CreatedAt

func CreatedAt(v time.Time) predicate.Credit

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

func CreatedAtEQ

func CreatedAtEQ(v time.Time) predicate.Credit

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

func CreatedAtGT

func CreatedAtGT(v time.Time) predicate.Credit

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

func CreatedAtGTE

func CreatedAtGTE(v time.Time) predicate.Credit

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

func CreatedAtIn

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

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

func CreatedAtLT

func CreatedAtLT(v time.Time) predicate.Credit

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

func CreatedAtLTE

func CreatedAtLTE(v time.Time) predicate.Credit

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

func CreatedAtNEQ

func CreatedAtNEQ(v time.Time) predicate.Credit

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

func CreatedAtNotIn

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

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

func CreditTypeID

func CreditTypeID(v uuid.UUID) predicate.Credit

CreditTypeID applies equality check predicate on the "credit_type_id" field. It's identical to CreditTypeIDEQ.

func CreditTypeIDEQ

func CreditTypeIDEQ(v uuid.UUID) predicate.Credit

CreditTypeIDEQ applies the EQ predicate on the "credit_type_id" field.

func CreditTypeIDIn

func CreditTypeIDIn(vs ...uuid.UUID) predicate.Credit

CreditTypeIDIn applies the In predicate on the "credit_type_id" field.

func CreditTypeIDNEQ

func CreditTypeIDNEQ(v uuid.UUID) predicate.Credit

CreditTypeIDNEQ applies the NEQ predicate on the "credit_type_id" field.

func CreditTypeIDNotIn

func CreditTypeIDNotIn(vs ...uuid.UUID) predicate.Credit

CreditTypeIDNotIn applies the NotIn predicate on the "credit_type_id" field.

func ExpiresAt

func ExpiresAt(v time.Time) predicate.Credit

ExpiresAt applies equality check predicate on the "expires_at" field. It's identical to ExpiresAtEQ.

func ExpiresAtEQ

func ExpiresAtEQ(v time.Time) predicate.Credit

ExpiresAtEQ applies the EQ predicate on the "expires_at" field.

func ExpiresAtGT

func ExpiresAtGT(v time.Time) predicate.Credit

ExpiresAtGT applies the GT predicate on the "expires_at" field.

func ExpiresAtGTE

func ExpiresAtGTE(v time.Time) predicate.Credit

ExpiresAtGTE applies the GTE predicate on the "expires_at" field.

func ExpiresAtIn

func ExpiresAtIn(vs ...time.Time) predicate.Credit

ExpiresAtIn applies the In predicate on the "expires_at" field.

func ExpiresAtLT

func ExpiresAtLT(v time.Time) predicate.Credit

ExpiresAtLT applies the LT predicate on the "expires_at" field.

func ExpiresAtLTE

func ExpiresAtLTE(v time.Time) predicate.Credit

ExpiresAtLTE applies the LTE predicate on the "expires_at" field.

func ExpiresAtNEQ

func ExpiresAtNEQ(v time.Time) predicate.Credit

ExpiresAtNEQ applies the NEQ predicate on the "expires_at" field.

func ExpiresAtNotIn

func ExpiresAtNotIn(vs ...time.Time) predicate.Credit

ExpiresAtNotIn applies the NotIn predicate on the "expires_at" field.

func HasCreditType

func HasCreditType() predicate.Credit

HasCreditType applies the HasEdge predicate on the "credit_type" edge.

func HasCreditTypeWith

func HasCreditTypeWith(preds ...predicate.CreditType) predicate.Credit

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

func HasUsers

func HasUsers() predicate.Credit

HasUsers applies the HasEdge predicate on the "users" edge.

func HasUsersWith

func HasUsersWith(preds ...predicate.User) predicate.Credit

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

func ID

func ID(id uuid.UUID) predicate.Credit

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id uuid.UUID) predicate.Credit

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id uuid.UUID) predicate.Credit

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id uuid.UUID) predicate.Credit

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...uuid.UUID) predicate.Credit

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id uuid.UUID) predicate.Credit

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id uuid.UUID) predicate.Credit

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id uuid.UUID) predicate.Credit

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...uuid.UUID) predicate.Credit

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

Or groups predicates with the OR operator between them.

func Period

func Period(v int) predicate.Credit

Period applies equality check predicate on the "period" field. It's identical to PeriodEQ.

func PeriodEQ

func PeriodEQ(v int) predicate.Credit

PeriodEQ applies the EQ predicate on the "period" field.

func PeriodGT

func PeriodGT(v int) predicate.Credit

PeriodGT applies the GT predicate on the "period" field.

func PeriodGTE

func PeriodGTE(v int) predicate.Credit

PeriodGTE applies the GTE predicate on the "period" field.

func PeriodIn

func PeriodIn(vs ...int) predicate.Credit

PeriodIn applies the In predicate on the "period" field.

func PeriodLT

func PeriodLT(v int) predicate.Credit

PeriodLT applies the LT predicate on the "period" field.

func PeriodLTE

func PeriodLTE(v int) predicate.Credit

PeriodLTE applies the LTE predicate on the "period" field.

func PeriodNEQ

func PeriodNEQ(v int) predicate.Credit

PeriodNEQ applies the NEQ predicate on the "period" field.

func PeriodNotIn

func PeriodNotIn(vs ...int) predicate.Credit

PeriodNotIn applies the NotIn predicate on the "period" field.

func RemainingAmount

func RemainingAmount(v int32) predicate.Credit

RemainingAmount applies equality check predicate on the "remaining_amount" field. It's identical to RemainingAmountEQ.

func RemainingAmountEQ

func RemainingAmountEQ(v int32) predicate.Credit

RemainingAmountEQ applies the EQ predicate on the "remaining_amount" field.

func RemainingAmountGT

func RemainingAmountGT(v int32) predicate.Credit

RemainingAmountGT applies the GT predicate on the "remaining_amount" field.

func RemainingAmountGTE

func RemainingAmountGTE(v int32) predicate.Credit

RemainingAmountGTE applies the GTE predicate on the "remaining_amount" field.

func RemainingAmountIn

func RemainingAmountIn(vs ...int32) predicate.Credit

RemainingAmountIn applies the In predicate on the "remaining_amount" field.

func RemainingAmountLT

func RemainingAmountLT(v int32) predicate.Credit

RemainingAmountLT applies the LT predicate on the "remaining_amount" field.

func RemainingAmountLTE

func RemainingAmountLTE(v int32) predicate.Credit

RemainingAmountLTE applies the LTE predicate on the "remaining_amount" field.

func RemainingAmountNEQ

func RemainingAmountNEQ(v int32) predicate.Credit

RemainingAmountNEQ applies the NEQ predicate on the "remaining_amount" field.

func RemainingAmountNotIn

func RemainingAmountNotIn(vs ...int32) predicate.Credit

RemainingAmountNotIn applies the NotIn predicate on the "remaining_amount" field.

func ReplenishedAt

func ReplenishedAt(v time.Time) predicate.Credit

ReplenishedAt applies equality check predicate on the "replenished_at" field. It's identical to ReplenishedAtEQ.

func ReplenishedAtEQ

func ReplenishedAtEQ(v time.Time) predicate.Credit

ReplenishedAtEQ applies the EQ predicate on the "replenished_at" field.

func ReplenishedAtGT

func ReplenishedAtGT(v time.Time) predicate.Credit

ReplenishedAtGT applies the GT predicate on the "replenished_at" field.

func ReplenishedAtGTE

func ReplenishedAtGTE(v time.Time) predicate.Credit

ReplenishedAtGTE applies the GTE predicate on the "replenished_at" field.

func ReplenishedAtIn

func ReplenishedAtIn(vs ...time.Time) predicate.Credit

ReplenishedAtIn applies the In predicate on the "replenished_at" field.

func ReplenishedAtLT

func ReplenishedAtLT(v time.Time) predicate.Credit

ReplenishedAtLT applies the LT predicate on the "replenished_at" field.

func ReplenishedAtLTE

func ReplenishedAtLTE(v time.Time) predicate.Credit

ReplenishedAtLTE applies the LTE predicate on the "replenished_at" field.

func ReplenishedAtNEQ

func ReplenishedAtNEQ(v time.Time) predicate.Credit

ReplenishedAtNEQ applies the NEQ predicate on the "replenished_at" field.

func ReplenishedAtNotIn

func ReplenishedAtNotIn(vs ...time.Time) predicate.Credit

ReplenishedAtNotIn applies the NotIn predicate on the "replenished_at" field.

func StartsAt

func StartsAt(v time.Time) predicate.Credit

StartsAt applies equality check predicate on the "starts_at" field. It's identical to StartsAtEQ.

func StartsAtEQ

func StartsAtEQ(v time.Time) predicate.Credit

StartsAtEQ applies the EQ predicate on the "starts_at" field.

func StartsAtGT

func StartsAtGT(v time.Time) predicate.Credit

StartsAtGT applies the GT predicate on the "starts_at" field.

func StartsAtGTE

func StartsAtGTE(v time.Time) predicate.Credit

StartsAtGTE applies the GTE predicate on the "starts_at" field.

func StartsAtIn

func StartsAtIn(vs ...time.Time) predicate.Credit

StartsAtIn applies the In predicate on the "starts_at" field.

func StartsAtLT

func StartsAtLT(v time.Time) predicate.Credit

StartsAtLT applies the LT predicate on the "starts_at" field.

func StartsAtLTE

func StartsAtLTE(v time.Time) predicate.Credit

StartsAtLTE applies the LTE predicate on the "starts_at" field.

func StartsAtNEQ

func StartsAtNEQ(v time.Time) predicate.Credit

StartsAtNEQ applies the NEQ predicate on the "starts_at" field.

func StartsAtNotIn

func StartsAtNotIn(vs ...time.Time) predicate.Credit

StartsAtNotIn applies the NotIn predicate on the "starts_at" field.

func StripeLineItemID

func StripeLineItemID(v string) predicate.Credit

StripeLineItemID applies equality check predicate on the "stripe_line_item_id" field. It's identical to StripeLineItemIDEQ.

func StripeLineItemIDContains

func StripeLineItemIDContains(v string) predicate.Credit

StripeLineItemIDContains applies the Contains predicate on the "stripe_line_item_id" field.

func StripeLineItemIDContainsFold

func StripeLineItemIDContainsFold(v string) predicate.Credit

StripeLineItemIDContainsFold applies the ContainsFold predicate on the "stripe_line_item_id" field.

func StripeLineItemIDEQ

func StripeLineItemIDEQ(v string) predicate.Credit

StripeLineItemIDEQ applies the EQ predicate on the "stripe_line_item_id" field.

func StripeLineItemIDEqualFold

func StripeLineItemIDEqualFold(v string) predicate.Credit

StripeLineItemIDEqualFold applies the EqualFold predicate on the "stripe_line_item_id" field.

func StripeLineItemIDGT

func StripeLineItemIDGT(v string) predicate.Credit

StripeLineItemIDGT applies the GT predicate on the "stripe_line_item_id" field.

func StripeLineItemIDGTE

func StripeLineItemIDGTE(v string) predicate.Credit

StripeLineItemIDGTE applies the GTE predicate on the "stripe_line_item_id" field.

func StripeLineItemIDHasPrefix

func StripeLineItemIDHasPrefix(v string) predicate.Credit

StripeLineItemIDHasPrefix applies the HasPrefix predicate on the "stripe_line_item_id" field.

func StripeLineItemIDHasSuffix

func StripeLineItemIDHasSuffix(v string) predicate.Credit

StripeLineItemIDHasSuffix applies the HasSuffix predicate on the "stripe_line_item_id" field.

func StripeLineItemIDIn

func StripeLineItemIDIn(vs ...string) predicate.Credit

StripeLineItemIDIn applies the In predicate on the "stripe_line_item_id" field.

func StripeLineItemIDIsNil

func StripeLineItemIDIsNil() predicate.Credit

StripeLineItemIDIsNil applies the IsNil predicate on the "stripe_line_item_id" field.

func StripeLineItemIDLT

func StripeLineItemIDLT(v string) predicate.Credit

StripeLineItemIDLT applies the LT predicate on the "stripe_line_item_id" field.

func StripeLineItemIDLTE

func StripeLineItemIDLTE(v string) predicate.Credit

StripeLineItemIDLTE applies the LTE predicate on the "stripe_line_item_id" field.

func StripeLineItemIDNEQ

func StripeLineItemIDNEQ(v string) predicate.Credit

StripeLineItemIDNEQ applies the NEQ predicate on the "stripe_line_item_id" field.

func StripeLineItemIDNotIn

func StripeLineItemIDNotIn(vs ...string) predicate.Credit

StripeLineItemIDNotIn applies the NotIn predicate on the "stripe_line_item_id" field.

func StripeLineItemIDNotNil

func StripeLineItemIDNotNil() predicate.Credit

StripeLineItemIDNotNil applies the NotNil predicate on the "stripe_line_item_id" field.

func UpdatedAt

func UpdatedAt(v time.Time) predicate.Credit

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

func UpdatedAtEQ

func UpdatedAtEQ(v time.Time) predicate.Credit

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

func UpdatedAtGT

func UpdatedAtGT(v time.Time) predicate.Credit

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

func UpdatedAtGTE

func UpdatedAtGTE(v time.Time) predicate.Credit

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

func UpdatedAtIn

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

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

func UpdatedAtLT

func UpdatedAtLT(v time.Time) predicate.Credit

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

func UpdatedAtLTE

func UpdatedAtLTE(v time.Time) predicate.Credit

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

func UpdatedAtNEQ

func UpdatedAtNEQ(v time.Time) predicate.Credit

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

func UpdatedAtNotIn

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

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

func UserID

func UserID(v uuid.UUID) predicate.Credit

UserID applies equality check predicate on the "user_id" field. It's identical to UserIDEQ.

func UserIDEQ

func UserIDEQ(v uuid.UUID) predicate.Credit

UserIDEQ applies the EQ predicate on the "user_id" field.

func UserIDIn

func UserIDIn(vs ...uuid.UUID) predicate.Credit

UserIDIn applies the In predicate on the "user_id" field.

func UserIDNEQ

func UserIDNEQ(v uuid.UUID) predicate.Credit

UserIDNEQ applies the NEQ predicate on the "user_id" field.

func UserIDNotIn

func UserIDNotIn(vs ...uuid.UUID) predicate.Credit

UserIDNotIn applies the NotIn predicate on the "user_id" 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 Credit queries.

func ByCreatedAt

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

ByCreatedAt orders the results by the created_at field.

func ByCreditTypeField

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

ByCreditTypeField orders the results by credit_type field.

func ByCreditTypeID

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

ByCreditTypeID orders the results by the credit_type_id field.

func ByExpiresAt

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

ByExpiresAt orders the results by the expires_at field.

func ByID

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

ByID orders the results by the id field.

func ByPeriod

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

ByPeriod orders the results by the period field.

func ByRemainingAmount

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

ByRemainingAmount orders the results by the remaining_amount field.

func ByReplenishedAt

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

ByReplenishedAt orders the results by the replenished_at field.

func ByStartsAt

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

ByStartsAt orders the results by the starts_at field.

func ByStripeLineItemID

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

ByStripeLineItemID orders the results by the stripe_line_item_id field.

func ByUpdatedAt

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

ByUpdatedAt orders the results by the updated_at field.

func ByUserID

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

ByUserID orders the results by the user_id field.

func ByUsersField

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

ByUsersField orders the results by users field.

Jump to

Keyboard shortcuts

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