feat(payment): add complete payment system with multi-provider support

Add a full payment and subscription system supporting EasyPay (Alipay/WeChat),
Stripe, and direct Alipay/WeChat Pay providers with multi-instance load balancing.
This commit is contained in:
erio
2026-04-10 21:08:51 +08:00
parent 00c08c574e
commit 63d1860dc0
166 changed files with 42743 additions and 220 deletions

View File

@@ -0,0 +1,160 @@
// Code generated by ent, DO NOT EDIT.
package paymentproviderinstance
import (
"time"
"entgo.io/ent/dialect/sql"
)
const (
// Label holds the string label denoting the paymentproviderinstance type in the database.
Label = "payment_provider_instance"
// FieldID holds the string denoting the id field in the database.
FieldID = "id"
// FieldProviderKey holds the string denoting the provider_key field in the database.
FieldProviderKey = "provider_key"
// FieldName holds the string denoting the name field in the database.
FieldName = "name"
// FieldConfig holds the string denoting the config field in the database.
FieldConfig = "config"
// FieldSupportedTypes holds the string denoting the supported_types field in the database.
FieldSupportedTypes = "supported_types"
// FieldEnabled holds the string denoting the enabled field in the database.
FieldEnabled = "enabled"
// FieldPaymentMode holds the string denoting the payment_mode field in the database.
FieldPaymentMode = "payment_mode"
// FieldSortOrder holds the string denoting the sort_order field in the database.
FieldSortOrder = "sort_order"
// FieldLimits holds the string denoting the limits field in the database.
FieldLimits = "limits"
// FieldRefundEnabled holds the string denoting the refund_enabled field in the database.
FieldRefundEnabled = "refund_enabled"
// 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"
// Table holds the table name of the paymentproviderinstance in the database.
Table = "payment_provider_instances"
)
// Columns holds all SQL columns for paymentproviderinstance fields.
var Columns = []string{
FieldID,
FieldProviderKey,
FieldName,
FieldConfig,
FieldSupportedTypes,
FieldEnabled,
FieldPaymentMode,
FieldSortOrder,
FieldLimits,
FieldRefundEnabled,
FieldCreatedAt,
FieldUpdatedAt,
}
// ValidColumn reports if the column name is valid (part of the table columns).
func ValidColumn(column string) bool {
for i := range Columns {
if column == Columns[i] {
return true
}
}
return false
}
var (
// ProviderKeyValidator is a validator for the "provider_key" field. It is called by the builders before save.
ProviderKeyValidator func(string) error
// DefaultName holds the default value on creation for the "name" field.
DefaultName string
// NameValidator is a validator for the "name" field. It is called by the builders before save.
NameValidator func(string) error
// DefaultSupportedTypes holds the default value on creation for the "supported_types" field.
DefaultSupportedTypes string
// SupportedTypesValidator is a validator for the "supported_types" field. It is called by the builders before save.
SupportedTypesValidator func(string) error
// DefaultEnabled holds the default value on creation for the "enabled" field.
DefaultEnabled bool
// DefaultPaymentMode holds the default value on creation for the "payment_mode" field.
DefaultPaymentMode string
// PaymentModeValidator is a validator for the "payment_mode" field. It is called by the builders before save.
PaymentModeValidator func(string) error
// DefaultSortOrder holds the default value on creation for the "sort_order" field.
DefaultSortOrder int
// DefaultLimits holds the default value on creation for the "limits" field.
DefaultLimits string
// DefaultRefundEnabled holds the default value on creation for the "refund_enabled" field.
DefaultRefundEnabled bool
// 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
)
// OrderOption defines the ordering options for the PaymentProviderInstance queries.
type OrderOption func(*sql.Selector)
// ByID orders the results by the id field.
func ByID(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldID, opts...).ToFunc()
}
// ByProviderKey orders the results by the provider_key field.
func ByProviderKey(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldProviderKey, opts...).ToFunc()
}
// ByName orders the results by the name field.
func ByName(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldName, opts...).ToFunc()
}
// ByConfig orders the results by the config field.
func ByConfig(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldConfig, opts...).ToFunc()
}
// BySupportedTypes orders the results by the supported_types field.
func BySupportedTypes(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldSupportedTypes, opts...).ToFunc()
}
// ByEnabled orders the results by the enabled field.
func ByEnabled(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldEnabled, opts...).ToFunc()
}
// ByPaymentMode orders the results by the payment_mode field.
func ByPaymentMode(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldPaymentMode, opts...).ToFunc()
}
// BySortOrder orders the results by the sort_order field.
func BySortOrder(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldSortOrder, opts...).ToFunc()
}
// ByLimits orders the results by the limits field.
func ByLimits(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldLimits, opts...).ToFunc()
}
// ByRefundEnabled orders the results by the refund_enabled field.
func ByRefundEnabled(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldRefundEnabled, opts...).ToFunc()
}
// ByCreatedAt orders the results by the created_at field.
func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldCreatedAt, opts...).ToFunc()
}
// ByUpdatedAt orders the results by the updated_at field.
func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldUpdatedAt, opts...).ToFunc()
}

View File

@@ -0,0 +1,655 @@
// Code generated by ent, DO NOT EDIT.
package paymentproviderinstance
import (
"time"
"entgo.io/ent/dialect/sql"
"github.com/Wei-Shaw/sub2api/ent/predicate"
)
// ID filters vertices based on their ID field.
func ID(id int64) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldEQ(FieldID, id))
}
// IDEQ applies the EQ predicate on the ID field.
func IDEQ(id int64) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldEQ(FieldID, id))
}
// IDNEQ applies the NEQ predicate on the ID field.
func IDNEQ(id int64) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldNEQ(FieldID, id))
}
// IDIn applies the In predicate on the ID field.
func IDIn(ids ...int64) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldIn(FieldID, ids...))
}
// IDNotIn applies the NotIn predicate on the ID field.
func IDNotIn(ids ...int64) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldNotIn(FieldID, ids...))
}
// IDGT applies the GT predicate on the ID field.
func IDGT(id int64) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldGT(FieldID, id))
}
// IDGTE applies the GTE predicate on the ID field.
func IDGTE(id int64) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldGTE(FieldID, id))
}
// IDLT applies the LT predicate on the ID field.
func IDLT(id int64) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldLT(FieldID, id))
}
// IDLTE applies the LTE predicate on the ID field.
func IDLTE(id int64) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldLTE(FieldID, id))
}
// ProviderKey applies equality check predicate on the "provider_key" field. It's identical to ProviderKeyEQ.
func ProviderKey(v string) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldEQ(FieldProviderKey, v))
}
// Name applies equality check predicate on the "name" field. It's identical to NameEQ.
func Name(v string) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldEQ(FieldName, v))
}
// Config applies equality check predicate on the "config" field. It's identical to ConfigEQ.
func Config(v string) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldEQ(FieldConfig, v))
}
// SupportedTypes applies equality check predicate on the "supported_types" field. It's identical to SupportedTypesEQ.
func SupportedTypes(v string) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldEQ(FieldSupportedTypes, v))
}
// Enabled applies equality check predicate on the "enabled" field. It's identical to EnabledEQ.
func Enabled(v bool) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldEQ(FieldEnabled, v))
}
// PaymentMode applies equality check predicate on the "payment_mode" field. It's identical to PaymentModeEQ.
func PaymentMode(v string) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldEQ(FieldPaymentMode, v))
}
// SortOrder applies equality check predicate on the "sort_order" field. It's identical to SortOrderEQ.
func SortOrder(v int) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldEQ(FieldSortOrder, v))
}
// Limits applies equality check predicate on the "limits" field. It's identical to LimitsEQ.
func Limits(v string) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldEQ(FieldLimits, v))
}
// RefundEnabled applies equality check predicate on the "refund_enabled" field. It's identical to RefundEnabledEQ.
func RefundEnabled(v bool) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldEQ(FieldRefundEnabled, v))
}
// CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.
func CreatedAt(v time.Time) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldEQ(FieldCreatedAt, v))
}
// UpdatedAt applies equality check predicate on the "updated_at" field. It's identical to UpdatedAtEQ.
func UpdatedAt(v time.Time) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldEQ(FieldUpdatedAt, v))
}
// ProviderKeyEQ applies the EQ predicate on the "provider_key" field.
func ProviderKeyEQ(v string) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldEQ(FieldProviderKey, v))
}
// ProviderKeyNEQ applies the NEQ predicate on the "provider_key" field.
func ProviderKeyNEQ(v string) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldNEQ(FieldProviderKey, v))
}
// ProviderKeyIn applies the In predicate on the "provider_key" field.
func ProviderKeyIn(vs ...string) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldIn(FieldProviderKey, vs...))
}
// ProviderKeyNotIn applies the NotIn predicate on the "provider_key" field.
func ProviderKeyNotIn(vs ...string) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldNotIn(FieldProviderKey, vs...))
}
// ProviderKeyGT applies the GT predicate on the "provider_key" field.
func ProviderKeyGT(v string) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldGT(FieldProviderKey, v))
}
// ProviderKeyGTE applies the GTE predicate on the "provider_key" field.
func ProviderKeyGTE(v string) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldGTE(FieldProviderKey, v))
}
// ProviderKeyLT applies the LT predicate on the "provider_key" field.
func ProviderKeyLT(v string) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldLT(FieldProviderKey, v))
}
// ProviderKeyLTE applies the LTE predicate on the "provider_key" field.
func ProviderKeyLTE(v string) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldLTE(FieldProviderKey, v))
}
// ProviderKeyContains applies the Contains predicate on the "provider_key" field.
func ProviderKeyContains(v string) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldContains(FieldProviderKey, v))
}
// ProviderKeyHasPrefix applies the HasPrefix predicate on the "provider_key" field.
func ProviderKeyHasPrefix(v string) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldHasPrefix(FieldProviderKey, v))
}
// ProviderKeyHasSuffix applies the HasSuffix predicate on the "provider_key" field.
func ProviderKeyHasSuffix(v string) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldHasSuffix(FieldProviderKey, v))
}
// ProviderKeyEqualFold applies the EqualFold predicate on the "provider_key" field.
func ProviderKeyEqualFold(v string) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldEqualFold(FieldProviderKey, v))
}
// ProviderKeyContainsFold applies the ContainsFold predicate on the "provider_key" field.
func ProviderKeyContainsFold(v string) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldContainsFold(FieldProviderKey, v))
}
// NameEQ applies the EQ predicate on the "name" field.
func NameEQ(v string) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldEQ(FieldName, v))
}
// NameNEQ applies the NEQ predicate on the "name" field.
func NameNEQ(v string) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldNEQ(FieldName, v))
}
// NameIn applies the In predicate on the "name" field.
func NameIn(vs ...string) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldIn(FieldName, vs...))
}
// NameNotIn applies the NotIn predicate on the "name" field.
func NameNotIn(vs ...string) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldNotIn(FieldName, vs...))
}
// NameGT applies the GT predicate on the "name" field.
func NameGT(v string) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldGT(FieldName, v))
}
// NameGTE applies the GTE predicate on the "name" field.
func NameGTE(v string) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldGTE(FieldName, v))
}
// NameLT applies the LT predicate on the "name" field.
func NameLT(v string) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldLT(FieldName, v))
}
// NameLTE applies the LTE predicate on the "name" field.
func NameLTE(v string) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldLTE(FieldName, v))
}
// NameContains applies the Contains predicate on the "name" field.
func NameContains(v string) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldContains(FieldName, v))
}
// NameHasPrefix applies the HasPrefix predicate on the "name" field.
func NameHasPrefix(v string) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldHasPrefix(FieldName, v))
}
// NameHasSuffix applies the HasSuffix predicate on the "name" field.
func NameHasSuffix(v string) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldHasSuffix(FieldName, v))
}
// NameEqualFold applies the EqualFold predicate on the "name" field.
func NameEqualFold(v string) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldEqualFold(FieldName, v))
}
// NameContainsFold applies the ContainsFold predicate on the "name" field.
func NameContainsFold(v string) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldContainsFold(FieldName, v))
}
// ConfigEQ applies the EQ predicate on the "config" field.
func ConfigEQ(v string) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldEQ(FieldConfig, v))
}
// ConfigNEQ applies the NEQ predicate on the "config" field.
func ConfigNEQ(v string) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldNEQ(FieldConfig, v))
}
// ConfigIn applies the In predicate on the "config" field.
func ConfigIn(vs ...string) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldIn(FieldConfig, vs...))
}
// ConfigNotIn applies the NotIn predicate on the "config" field.
func ConfigNotIn(vs ...string) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldNotIn(FieldConfig, vs...))
}
// ConfigGT applies the GT predicate on the "config" field.
func ConfigGT(v string) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldGT(FieldConfig, v))
}
// ConfigGTE applies the GTE predicate on the "config" field.
func ConfigGTE(v string) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldGTE(FieldConfig, v))
}
// ConfigLT applies the LT predicate on the "config" field.
func ConfigLT(v string) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldLT(FieldConfig, v))
}
// ConfigLTE applies the LTE predicate on the "config" field.
func ConfigLTE(v string) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldLTE(FieldConfig, v))
}
// ConfigContains applies the Contains predicate on the "config" field.
func ConfigContains(v string) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldContains(FieldConfig, v))
}
// ConfigHasPrefix applies the HasPrefix predicate on the "config" field.
func ConfigHasPrefix(v string) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldHasPrefix(FieldConfig, v))
}
// ConfigHasSuffix applies the HasSuffix predicate on the "config" field.
func ConfigHasSuffix(v string) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldHasSuffix(FieldConfig, v))
}
// ConfigEqualFold applies the EqualFold predicate on the "config" field.
func ConfigEqualFold(v string) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldEqualFold(FieldConfig, v))
}
// ConfigContainsFold applies the ContainsFold predicate on the "config" field.
func ConfigContainsFold(v string) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldContainsFold(FieldConfig, v))
}
// SupportedTypesEQ applies the EQ predicate on the "supported_types" field.
func SupportedTypesEQ(v string) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldEQ(FieldSupportedTypes, v))
}
// SupportedTypesNEQ applies the NEQ predicate on the "supported_types" field.
func SupportedTypesNEQ(v string) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldNEQ(FieldSupportedTypes, v))
}
// SupportedTypesIn applies the In predicate on the "supported_types" field.
func SupportedTypesIn(vs ...string) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldIn(FieldSupportedTypes, vs...))
}
// SupportedTypesNotIn applies the NotIn predicate on the "supported_types" field.
func SupportedTypesNotIn(vs ...string) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldNotIn(FieldSupportedTypes, vs...))
}
// SupportedTypesGT applies the GT predicate on the "supported_types" field.
func SupportedTypesGT(v string) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldGT(FieldSupportedTypes, v))
}
// SupportedTypesGTE applies the GTE predicate on the "supported_types" field.
func SupportedTypesGTE(v string) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldGTE(FieldSupportedTypes, v))
}
// SupportedTypesLT applies the LT predicate on the "supported_types" field.
func SupportedTypesLT(v string) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldLT(FieldSupportedTypes, v))
}
// SupportedTypesLTE applies the LTE predicate on the "supported_types" field.
func SupportedTypesLTE(v string) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldLTE(FieldSupportedTypes, v))
}
// SupportedTypesContains applies the Contains predicate on the "supported_types" field.
func SupportedTypesContains(v string) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldContains(FieldSupportedTypes, v))
}
// SupportedTypesHasPrefix applies the HasPrefix predicate on the "supported_types" field.
func SupportedTypesHasPrefix(v string) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldHasPrefix(FieldSupportedTypes, v))
}
// SupportedTypesHasSuffix applies the HasSuffix predicate on the "supported_types" field.
func SupportedTypesHasSuffix(v string) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldHasSuffix(FieldSupportedTypes, v))
}
// SupportedTypesEqualFold applies the EqualFold predicate on the "supported_types" field.
func SupportedTypesEqualFold(v string) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldEqualFold(FieldSupportedTypes, v))
}
// SupportedTypesContainsFold applies the ContainsFold predicate on the "supported_types" field.
func SupportedTypesContainsFold(v string) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldContainsFold(FieldSupportedTypes, v))
}
// EnabledEQ applies the EQ predicate on the "enabled" field.
func EnabledEQ(v bool) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldEQ(FieldEnabled, v))
}
// EnabledNEQ applies the NEQ predicate on the "enabled" field.
func EnabledNEQ(v bool) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldNEQ(FieldEnabled, v))
}
// PaymentModeEQ applies the EQ predicate on the "payment_mode" field.
func PaymentModeEQ(v string) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldEQ(FieldPaymentMode, v))
}
// PaymentModeNEQ applies the NEQ predicate on the "payment_mode" field.
func PaymentModeNEQ(v string) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldNEQ(FieldPaymentMode, v))
}
// PaymentModeIn applies the In predicate on the "payment_mode" field.
func PaymentModeIn(vs ...string) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldIn(FieldPaymentMode, vs...))
}
// PaymentModeNotIn applies the NotIn predicate on the "payment_mode" field.
func PaymentModeNotIn(vs ...string) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldNotIn(FieldPaymentMode, vs...))
}
// PaymentModeGT applies the GT predicate on the "payment_mode" field.
func PaymentModeGT(v string) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldGT(FieldPaymentMode, v))
}
// PaymentModeGTE applies the GTE predicate on the "payment_mode" field.
func PaymentModeGTE(v string) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldGTE(FieldPaymentMode, v))
}
// PaymentModeLT applies the LT predicate on the "payment_mode" field.
func PaymentModeLT(v string) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldLT(FieldPaymentMode, v))
}
// PaymentModeLTE applies the LTE predicate on the "payment_mode" field.
func PaymentModeLTE(v string) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldLTE(FieldPaymentMode, v))
}
// PaymentModeContains applies the Contains predicate on the "payment_mode" field.
func PaymentModeContains(v string) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldContains(FieldPaymentMode, v))
}
// PaymentModeHasPrefix applies the HasPrefix predicate on the "payment_mode" field.
func PaymentModeHasPrefix(v string) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldHasPrefix(FieldPaymentMode, v))
}
// PaymentModeHasSuffix applies the HasSuffix predicate on the "payment_mode" field.
func PaymentModeHasSuffix(v string) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldHasSuffix(FieldPaymentMode, v))
}
// PaymentModeEqualFold applies the EqualFold predicate on the "payment_mode" field.
func PaymentModeEqualFold(v string) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldEqualFold(FieldPaymentMode, v))
}
// PaymentModeContainsFold applies the ContainsFold predicate on the "payment_mode" field.
func PaymentModeContainsFold(v string) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldContainsFold(FieldPaymentMode, v))
}
// SortOrderEQ applies the EQ predicate on the "sort_order" field.
func SortOrderEQ(v int) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldEQ(FieldSortOrder, v))
}
// SortOrderNEQ applies the NEQ predicate on the "sort_order" field.
func SortOrderNEQ(v int) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldNEQ(FieldSortOrder, v))
}
// SortOrderIn applies the In predicate on the "sort_order" field.
func SortOrderIn(vs ...int) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldIn(FieldSortOrder, vs...))
}
// SortOrderNotIn applies the NotIn predicate on the "sort_order" field.
func SortOrderNotIn(vs ...int) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldNotIn(FieldSortOrder, vs...))
}
// SortOrderGT applies the GT predicate on the "sort_order" field.
func SortOrderGT(v int) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldGT(FieldSortOrder, v))
}
// SortOrderGTE applies the GTE predicate on the "sort_order" field.
func SortOrderGTE(v int) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldGTE(FieldSortOrder, v))
}
// SortOrderLT applies the LT predicate on the "sort_order" field.
func SortOrderLT(v int) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldLT(FieldSortOrder, v))
}
// SortOrderLTE applies the LTE predicate on the "sort_order" field.
func SortOrderLTE(v int) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldLTE(FieldSortOrder, v))
}
// LimitsEQ applies the EQ predicate on the "limits" field.
func LimitsEQ(v string) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldEQ(FieldLimits, v))
}
// LimitsNEQ applies the NEQ predicate on the "limits" field.
func LimitsNEQ(v string) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldNEQ(FieldLimits, v))
}
// LimitsIn applies the In predicate on the "limits" field.
func LimitsIn(vs ...string) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldIn(FieldLimits, vs...))
}
// LimitsNotIn applies the NotIn predicate on the "limits" field.
func LimitsNotIn(vs ...string) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldNotIn(FieldLimits, vs...))
}
// LimitsGT applies the GT predicate on the "limits" field.
func LimitsGT(v string) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldGT(FieldLimits, v))
}
// LimitsGTE applies the GTE predicate on the "limits" field.
func LimitsGTE(v string) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldGTE(FieldLimits, v))
}
// LimitsLT applies the LT predicate on the "limits" field.
func LimitsLT(v string) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldLT(FieldLimits, v))
}
// LimitsLTE applies the LTE predicate on the "limits" field.
func LimitsLTE(v string) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldLTE(FieldLimits, v))
}
// LimitsContains applies the Contains predicate on the "limits" field.
func LimitsContains(v string) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldContains(FieldLimits, v))
}
// LimitsHasPrefix applies the HasPrefix predicate on the "limits" field.
func LimitsHasPrefix(v string) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldHasPrefix(FieldLimits, v))
}
// LimitsHasSuffix applies the HasSuffix predicate on the "limits" field.
func LimitsHasSuffix(v string) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldHasSuffix(FieldLimits, v))
}
// LimitsEqualFold applies the EqualFold predicate on the "limits" field.
func LimitsEqualFold(v string) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldEqualFold(FieldLimits, v))
}
// LimitsContainsFold applies the ContainsFold predicate on the "limits" field.
func LimitsContainsFold(v string) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldContainsFold(FieldLimits, v))
}
// RefundEnabledEQ applies the EQ predicate on the "refund_enabled" field.
func RefundEnabledEQ(v bool) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldEQ(FieldRefundEnabled, v))
}
// RefundEnabledNEQ applies the NEQ predicate on the "refund_enabled" field.
func RefundEnabledNEQ(v bool) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldNEQ(FieldRefundEnabled, v))
}
// CreatedAtEQ applies the EQ predicate on the "created_at" field.
func CreatedAtEQ(v time.Time) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldEQ(FieldCreatedAt, v))
}
// CreatedAtNEQ applies the NEQ predicate on the "created_at" field.
func CreatedAtNEQ(v time.Time) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldNEQ(FieldCreatedAt, v))
}
// CreatedAtIn applies the In predicate on the "created_at" field.
func CreatedAtIn(vs ...time.Time) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldIn(FieldCreatedAt, vs...))
}
// CreatedAtNotIn applies the NotIn predicate on the "created_at" field.
func CreatedAtNotIn(vs ...time.Time) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldNotIn(FieldCreatedAt, vs...))
}
// CreatedAtGT applies the GT predicate on the "created_at" field.
func CreatedAtGT(v time.Time) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldGT(FieldCreatedAt, v))
}
// CreatedAtGTE applies the GTE predicate on the "created_at" field.
func CreatedAtGTE(v time.Time) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldGTE(FieldCreatedAt, v))
}
// CreatedAtLT applies the LT predicate on the "created_at" field.
func CreatedAtLT(v time.Time) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldLT(FieldCreatedAt, v))
}
// CreatedAtLTE applies the LTE predicate on the "created_at" field.
func CreatedAtLTE(v time.Time) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldLTE(FieldCreatedAt, v))
}
// UpdatedAtEQ applies the EQ predicate on the "updated_at" field.
func UpdatedAtEQ(v time.Time) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldEQ(FieldUpdatedAt, v))
}
// UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.
func UpdatedAtNEQ(v time.Time) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldNEQ(FieldUpdatedAt, v))
}
// UpdatedAtIn applies the In predicate on the "updated_at" field.
func UpdatedAtIn(vs ...time.Time) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldIn(FieldUpdatedAt, vs...))
}
// UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field.
func UpdatedAtNotIn(vs ...time.Time) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldNotIn(FieldUpdatedAt, vs...))
}
// UpdatedAtGT applies the GT predicate on the "updated_at" field.
func UpdatedAtGT(v time.Time) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldGT(FieldUpdatedAt, v))
}
// UpdatedAtGTE applies the GTE predicate on the "updated_at" field.
func UpdatedAtGTE(v time.Time) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldGTE(FieldUpdatedAt, v))
}
// UpdatedAtLT applies the LT predicate on the "updated_at" field.
func UpdatedAtLT(v time.Time) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldLT(FieldUpdatedAt, v))
}
// UpdatedAtLTE applies the LTE predicate on the "updated_at" field.
func UpdatedAtLTE(v time.Time) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.FieldLTE(FieldUpdatedAt, v))
}
// And groups predicates with the AND operator between them.
func And(predicates ...predicate.PaymentProviderInstance) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.AndPredicates(predicates...))
}
// Or groups predicates with the OR operator between them.
func Or(predicates ...predicate.PaymentProviderInstance) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.OrPredicates(predicates...))
}
// Not applies the not operator on the given predicate.
func Not(p predicate.PaymentProviderInstance) predicate.PaymentProviderInstance {
return predicate.PaymentProviderInstance(sql.NotPredicates(p))
}