feat: integrate payment system (EasyPay, Alipay, WxPay, Stripe)

Replace iframe-based external payment with native implementation:

Backend (Go):
- 5 new Ent schemas: PaymentOrder, PaymentAuditLog, PaymentChannel,
  SubscriptionPlan, PaymentProviderInstance
- 5 SQL migrations (090-094)
- Payment provider interface + registry + load balancer
- 4 provider implementations (EasyPay, Alipay, WxPay, Stripe)
- PaymentService (order lifecycle, fulfillment, refund 3-phase)
- PaymentConfigService (settings, instance/channel/plan CRUD)
- 31 API endpoints (9 user + 4 webhook + 18 admin)
- Wire DI integration

Frontend (Vue3):
- Payment types, API modules, store, router changes
- Sidebar: payment_enabled controls visibility, new menu items
- User pages: PaymentView (replace iframe), QR payment, Stripe,
  result page, order list
- Admin pages: Order management (4 tabs), provider instance mgmt
- Settings: new payment tab, removed old purchase iframe config
- i18n: full payment namespace (en + zh)

Docs:
- PAYMENT_FRONTEND_MIGRATION_PLAN.md
- PAYMENT_BACKEND_MIGRATION_PLAN.md
- PAYMENT_IMPLEMENTATION_ROADMAP.md
This commit is contained in:
erio committed 2026-04-05 15:06:05 +08:00
1 parent dbb248df52
commit 64c4495ae5
120 files changed
+39083 -149

No files matched your search

@@ -0,0 +1,156 @@
// Code generated by ent, DO NOT EDIT.
package paymentchannel
import (
"time"
"entgo.io/ent/dialect/sql"
)
const (
// Label holds the string label denoting the paymentchannel type in the database.
Label = "payment_channel"
// FieldID holds the string denoting the id field in the database.
FieldID = "id"
// FieldGroupID holds the string denoting the group_id field in the database.
FieldGroupID = "group_id"
// FieldName holds the string denoting the name field in the database.
FieldName = "name"
// FieldPlatform holds the string denoting the platform field in the database.
FieldPlatform = "platform"
// FieldRateMultiplier holds the string denoting the rate_multiplier field in the database.
FieldRateMultiplier = "rate_multiplier"
// FieldDescription holds the string denoting the description field in the database.
FieldDescription = "description"
// FieldModels holds the string denoting the models field in the database.
FieldModels = "models"
// FieldFeatures holds the string denoting the features field in the database.
FieldFeatures = "features"
// FieldSortOrder holds the string denoting the sort_order field in the database.
FieldSortOrder = "sort_order"
// FieldEnabled holds the string denoting the enabled field in the database.
FieldEnabled = "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 paymentchannel in the database.
Table = "payment_channels"
)
// Columns holds all SQL columns for paymentchannel fields.
var Columns = []string{
FieldID,
FieldGroupID,
FieldName,
FieldPlatform,
FieldRateMultiplier,
FieldDescription,
FieldModels,
FieldFeatures,
FieldSortOrder,
FieldEnabled,
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 (
// NameValidator is a validator for the "name" field. It is called by the builders before save.
NameValidator func(string) error
// DefaultPlatform holds the default value on creation for the "platform" field.
DefaultPlatform string
// PlatformValidator is a validator for the "platform" field. It is called by the builders before save.
PlatformValidator func(string) error
// DefaultRateMultiplier holds the default value on creation for the "rate_multiplier" field.
DefaultRateMultiplier float64
// DefaultDescription holds the default value on creation for the "description" field.
DefaultDescription string
// DefaultModels holds the default value on creation for the "models" field.
DefaultModels string
// DefaultFeatures holds the default value on creation for the "features" field.
DefaultFeatures string
// DefaultSortOrder holds the default value on creation for the "sort_order" field.
DefaultSortOrder int
// DefaultEnabled holds the default value on creation for the "enabled" field.
DefaultEnabled 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 PaymentChannel 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()
}
// ByGroupID orders the results by the group_id field.
func ByGroupID(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldGroupID, opts...).ToFunc()
}
// ByName orders the results by the name field.
func ByName(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldName, opts...).ToFunc()
}
// ByPlatform orders the results by the platform field.
func ByPlatform(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldPlatform, opts...).ToFunc()
}
// ByRateMultiplier orders the results by the rate_multiplier field.
func ByRateMultiplier(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldRateMultiplier, opts...).ToFunc()
}
// ByDescription orders the results by the description field.
func ByDescription(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldDescription, opts...).ToFunc()
}
// ByModels orders the results by the models field.
func ByModels(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldModels, opts...).ToFunc()
}
// ByFeatures orders the results by the features field.
func ByFeatures(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldFeatures, opts...).ToFunc()
}
// BySortOrder orders the results by the sort_order field.
func BySortOrder(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldSortOrder, opts...).ToFunc()
}
// ByEnabled orders the results by the enabled field.
func ByEnabled(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldEnabled, 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()
}
+670
View File
@@ -0,0 +1,670 @@
// Code generated by ent, DO NOT EDIT.
package paymentchannel
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.PaymentChannel {
return predicate.PaymentChannel(sql.FieldEQ(FieldID, id))
}
// IDEQ applies the EQ predicate on the ID field.
func IDEQ(id int64) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldEQ(FieldID, id))
}
// IDNEQ applies the NEQ predicate on the ID field.
func IDNEQ(id int64) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldNEQ(FieldID, id))
}
// IDIn applies the In predicate on the ID field.
func IDIn(ids ...int64) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldIn(FieldID, ids...))
}
// IDNotIn applies the NotIn predicate on the ID field.
func IDNotIn(ids ...int64) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldNotIn(FieldID, ids...))
}
// IDGT applies the GT predicate on the ID field.
func IDGT(id int64) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldGT(FieldID, id))
}
// IDGTE applies the GTE predicate on the ID field.
func IDGTE(id int64) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldGTE(FieldID, id))
}
// IDLT applies the LT predicate on the ID field.
func IDLT(id int64) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldLT(FieldID, id))
}
// IDLTE applies the LTE predicate on the ID field.
func IDLTE(id int64) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldLTE(FieldID, id))
}
// GroupID applies equality check predicate on the "group_id" field. It's identical to GroupIDEQ.
func GroupID(v int64) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldEQ(FieldGroupID, v))
}
// Name applies equality check predicate on the "name" field. It's identical to NameEQ.
func Name(v string) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldEQ(FieldName, v))
}
// Platform applies equality check predicate on the "platform" field. It's identical to PlatformEQ.
func Platform(v string) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldEQ(FieldPlatform, v))
}
// RateMultiplier applies equality check predicate on the "rate_multiplier" field. It's identical to RateMultiplierEQ.
func RateMultiplier(v float64) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldEQ(FieldRateMultiplier, v))
}
// Description applies equality check predicate on the "description" field. It's identical to DescriptionEQ.
func Description(v string) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldEQ(FieldDescription, v))
}
// Models applies equality check predicate on the "models" field. It's identical to ModelsEQ.
func Models(v string) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldEQ(FieldModels, v))
}
// Features applies equality check predicate on the "features" field. It's identical to FeaturesEQ.
func Features(v string) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldEQ(FieldFeatures, v))
}
// SortOrder applies equality check predicate on the "sort_order" field. It's identical to SortOrderEQ.
func SortOrder(v int) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldEQ(FieldSortOrder, v))
}
// Enabled applies equality check predicate on the "enabled" field. It's identical to EnabledEQ.
func Enabled(v bool) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldEQ(FieldEnabled, v))
}
// CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.
func CreatedAt(v time.Time) predicate.PaymentChannel {
return predicate.PaymentChannel(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.PaymentChannel {
return predicate.PaymentChannel(sql.FieldEQ(FieldUpdatedAt, v))
}
// GroupIDEQ applies the EQ predicate on the "group_id" field.
func GroupIDEQ(v int64) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldEQ(FieldGroupID, v))
}
// GroupIDNEQ applies the NEQ predicate on the "group_id" field.
func GroupIDNEQ(v int64) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldNEQ(FieldGroupID, v))
}
// GroupIDIn applies the In predicate on the "group_id" field.
func GroupIDIn(vs ...int64) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldIn(FieldGroupID, vs...))
}
// GroupIDNotIn applies the NotIn predicate on the "group_id" field.
func GroupIDNotIn(vs ...int64) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldNotIn(FieldGroupID, vs...))
}
// GroupIDGT applies the GT predicate on the "group_id" field.
func GroupIDGT(v int64) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldGT(FieldGroupID, v))
}
// GroupIDGTE applies the GTE predicate on the "group_id" field.
func GroupIDGTE(v int64) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldGTE(FieldGroupID, v))
}
// GroupIDLT applies the LT predicate on the "group_id" field.
func GroupIDLT(v int64) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldLT(FieldGroupID, v))
}
// GroupIDLTE applies the LTE predicate on the "group_id" field.
func GroupIDLTE(v int64) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldLTE(FieldGroupID, v))
}
// GroupIDIsNil applies the IsNil predicate on the "group_id" field.
func GroupIDIsNil() predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldIsNull(FieldGroupID))
}
// GroupIDNotNil applies the NotNil predicate on the "group_id" field.
func GroupIDNotNil() predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldNotNull(FieldGroupID))
}
// NameEQ applies the EQ predicate on the "name" field.
func NameEQ(v string) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldEQ(FieldName, v))
}
// NameNEQ applies the NEQ predicate on the "name" field.
func NameNEQ(v string) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldNEQ(FieldName, v))
}
// NameIn applies the In predicate on the "name" field.
func NameIn(vs ...string) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldIn(FieldName, vs...))
}
// NameNotIn applies the NotIn predicate on the "name" field.
func NameNotIn(vs ...string) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldNotIn(FieldName, vs...))
}
// NameGT applies the GT predicate on the "name" field.
func NameGT(v string) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldGT(FieldName, v))
}
// NameGTE applies the GTE predicate on the "name" field.
func NameGTE(v string) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldGTE(FieldName, v))
}
// NameLT applies the LT predicate on the "name" field.
func NameLT(v string) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldLT(FieldName, v))
}
// NameLTE applies the LTE predicate on the "name" field.
func NameLTE(v string) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldLTE(FieldName, v))
}
// NameContains applies the Contains predicate on the "name" field.
func NameContains(v string) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldContains(FieldName, v))
}
// NameHasPrefix applies the HasPrefix predicate on the "name" field.
func NameHasPrefix(v string) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldHasPrefix(FieldName, v))
}
// NameHasSuffix applies the HasSuffix predicate on the "name" field.
func NameHasSuffix(v string) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldHasSuffix(FieldName, v))
}
// NameEqualFold applies the EqualFold predicate on the "name" field.
func NameEqualFold(v string) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldEqualFold(FieldName, v))
}
// NameContainsFold applies the ContainsFold predicate on the "name" field.
func NameContainsFold(v string) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldContainsFold(FieldName, v))
}
// PlatformEQ applies the EQ predicate on the "platform" field.
func PlatformEQ(v string) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldEQ(FieldPlatform, v))
}
// PlatformNEQ applies the NEQ predicate on the "platform" field.
func PlatformNEQ(v string) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldNEQ(FieldPlatform, v))
}
// PlatformIn applies the In predicate on the "platform" field.
func PlatformIn(vs ...string) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldIn(FieldPlatform, vs...))
}
// PlatformNotIn applies the NotIn predicate on the "platform" field.
func PlatformNotIn(vs ...string) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldNotIn(FieldPlatform, vs...))
}
// PlatformGT applies the GT predicate on the "platform" field.
func PlatformGT(v string) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldGT(FieldPlatform, v))
}
// PlatformGTE applies the GTE predicate on the "platform" field.
func PlatformGTE(v string) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldGTE(FieldPlatform, v))
}
// PlatformLT applies the LT predicate on the "platform" field.
func PlatformLT(v string) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldLT(FieldPlatform, v))
}
// PlatformLTE applies the LTE predicate on the "platform" field.
func PlatformLTE(v string) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldLTE(FieldPlatform, v))
}
// PlatformContains applies the Contains predicate on the "platform" field.
func PlatformContains(v string) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldContains(FieldPlatform, v))
}
// PlatformHasPrefix applies the HasPrefix predicate on the "platform" field.
func PlatformHasPrefix(v string) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldHasPrefix(FieldPlatform, v))
}
// PlatformHasSuffix applies the HasSuffix predicate on the "platform" field.
func PlatformHasSuffix(v string) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldHasSuffix(FieldPlatform, v))
}
// PlatformEqualFold applies the EqualFold predicate on the "platform" field.
func PlatformEqualFold(v string) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldEqualFold(FieldPlatform, v))
}
// PlatformContainsFold applies the ContainsFold predicate on the "platform" field.
func PlatformContainsFold(v string) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldContainsFold(FieldPlatform, v))
}
// RateMultiplierEQ applies the EQ predicate on the "rate_multiplier" field.
func RateMultiplierEQ(v float64) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldEQ(FieldRateMultiplier, v))
}
// RateMultiplierNEQ applies the NEQ predicate on the "rate_multiplier" field.
func RateMultiplierNEQ(v float64) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldNEQ(FieldRateMultiplier, v))
}
// RateMultiplierIn applies the In predicate on the "rate_multiplier" field.
func RateMultiplierIn(vs ...float64) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldIn(FieldRateMultiplier, vs...))
}
// RateMultiplierNotIn applies the NotIn predicate on the "rate_multiplier" field.
func RateMultiplierNotIn(vs ...float64) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldNotIn(FieldRateMultiplier, vs...))
}
// RateMultiplierGT applies the GT predicate on the "rate_multiplier" field.
func RateMultiplierGT(v float64) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldGT(FieldRateMultiplier, v))
}
// RateMultiplierGTE applies the GTE predicate on the "rate_multiplier" field.
func RateMultiplierGTE(v float64) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldGTE(FieldRateMultiplier, v))
}
// RateMultiplierLT applies the LT predicate on the "rate_multiplier" field.
func RateMultiplierLT(v float64) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldLT(FieldRateMultiplier, v))
}
// RateMultiplierLTE applies the LTE predicate on the "rate_multiplier" field.
func RateMultiplierLTE(v float64) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldLTE(FieldRateMultiplier, v))
}
// DescriptionEQ applies the EQ predicate on the "description" field.
func DescriptionEQ(v string) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldEQ(FieldDescription, v))
}
// DescriptionNEQ applies the NEQ predicate on the "description" field.
func DescriptionNEQ(v string) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldNEQ(FieldDescription, v))
}
// DescriptionIn applies the In predicate on the "description" field.
func DescriptionIn(vs ...string) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldIn(FieldDescription, vs...))
}
// DescriptionNotIn applies the NotIn predicate on the "description" field.
func DescriptionNotIn(vs ...string) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldNotIn(FieldDescription, vs...))
}
// DescriptionGT applies the GT predicate on the "description" field.
func DescriptionGT(v string) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldGT(FieldDescription, v))
}
// DescriptionGTE applies the GTE predicate on the "description" field.
func DescriptionGTE(v string) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldGTE(FieldDescription, v))
}
// DescriptionLT applies the LT predicate on the "description" field.
func DescriptionLT(v string) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldLT(FieldDescription, v))
}
// DescriptionLTE applies the LTE predicate on the "description" field.
func DescriptionLTE(v string) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldLTE(FieldDescription, v))
}
// DescriptionContains applies the Contains predicate on the "description" field.
func DescriptionContains(v string) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldContains(FieldDescription, v))
}
// DescriptionHasPrefix applies the HasPrefix predicate on the "description" field.
func DescriptionHasPrefix(v string) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldHasPrefix(FieldDescription, v))
}
// DescriptionHasSuffix applies the HasSuffix predicate on the "description" field.
func DescriptionHasSuffix(v string) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldHasSuffix(FieldDescription, v))
}
// DescriptionEqualFold applies the EqualFold predicate on the "description" field.
func DescriptionEqualFold(v string) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldEqualFold(FieldDescription, v))
}
// DescriptionContainsFold applies the ContainsFold predicate on the "description" field.
func DescriptionContainsFold(v string) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldContainsFold(FieldDescription, v))
}
// ModelsEQ applies the EQ predicate on the "models" field.
func ModelsEQ(v string) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldEQ(FieldModels, v))
}
// ModelsNEQ applies the NEQ predicate on the "models" field.
func ModelsNEQ(v string) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldNEQ(FieldModels, v))
}
// ModelsIn applies the In predicate on the "models" field.
func ModelsIn(vs ...string) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldIn(FieldModels, vs...))
}
// ModelsNotIn applies the NotIn predicate on the "models" field.
func ModelsNotIn(vs ...string) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldNotIn(FieldModels, vs...))
}
// ModelsGT applies the GT predicate on the "models" field.
func ModelsGT(v string) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldGT(FieldModels, v))
}
// ModelsGTE applies the GTE predicate on the "models" field.
func ModelsGTE(v string) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldGTE(FieldModels, v))
}
// ModelsLT applies the LT predicate on the "models" field.
func ModelsLT(v string) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldLT(FieldModels, v))
}
// ModelsLTE applies the LTE predicate on the "models" field.
func ModelsLTE(v string) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldLTE(FieldModels, v))
}
// ModelsContains applies the Contains predicate on the "models" field.
func ModelsContains(v string) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldContains(FieldModels, v))
}
// ModelsHasPrefix applies the HasPrefix predicate on the "models" field.
func ModelsHasPrefix(v string) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldHasPrefix(FieldModels, v))
}
// ModelsHasSuffix applies the HasSuffix predicate on the "models" field.
func ModelsHasSuffix(v string) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldHasSuffix(FieldModels, v))
}
// ModelsEqualFold applies the EqualFold predicate on the "models" field.
func ModelsEqualFold(v string) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldEqualFold(FieldModels, v))
}
// ModelsContainsFold applies the ContainsFold predicate on the "models" field.
func ModelsContainsFold(v string) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldContainsFold(FieldModels, v))
}
// FeaturesEQ applies the EQ predicate on the "features" field.
func FeaturesEQ(v string) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldEQ(FieldFeatures, v))
}
// FeaturesNEQ applies the NEQ predicate on the "features" field.
func FeaturesNEQ(v string) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldNEQ(FieldFeatures, v))
}
// FeaturesIn applies the In predicate on the "features" field.
func FeaturesIn(vs ...string) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldIn(FieldFeatures, vs...))
}
// FeaturesNotIn applies the NotIn predicate on the "features" field.
func FeaturesNotIn(vs ...string) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldNotIn(FieldFeatures, vs...))
}
// FeaturesGT applies the GT predicate on the "features" field.
func FeaturesGT(v string) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldGT(FieldFeatures, v))
}
// FeaturesGTE applies the GTE predicate on the "features" field.
func FeaturesGTE(v string) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldGTE(FieldFeatures, v))
}
// FeaturesLT applies the LT predicate on the "features" field.
func FeaturesLT(v string) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldLT(FieldFeatures, v))
}
// FeaturesLTE applies the LTE predicate on the "features" field.
func FeaturesLTE(v string) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldLTE(FieldFeatures, v))
}
// FeaturesContains applies the Contains predicate on the "features" field.
func FeaturesContains(v string) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldContains(FieldFeatures, v))
}
// FeaturesHasPrefix applies the HasPrefix predicate on the "features" field.
func FeaturesHasPrefix(v string) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldHasPrefix(FieldFeatures, v))
}
// FeaturesHasSuffix applies the HasSuffix predicate on the "features" field.
func FeaturesHasSuffix(v string) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldHasSuffix(FieldFeatures, v))
}
// FeaturesEqualFold applies the EqualFold predicate on the "features" field.
func FeaturesEqualFold(v string) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldEqualFold(FieldFeatures, v))
}
// FeaturesContainsFold applies the ContainsFold predicate on the "features" field.
func FeaturesContainsFold(v string) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldContainsFold(FieldFeatures, v))
}
// SortOrderEQ applies the EQ predicate on the "sort_order" field.
func SortOrderEQ(v int) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldEQ(FieldSortOrder, v))
}
// SortOrderNEQ applies the NEQ predicate on the "sort_order" field.
func SortOrderNEQ(v int) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldNEQ(FieldSortOrder, v))
}
// SortOrderIn applies the In predicate on the "sort_order" field.
func SortOrderIn(vs ...int) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldIn(FieldSortOrder, vs...))
}
// SortOrderNotIn applies the NotIn predicate on the "sort_order" field.
func SortOrderNotIn(vs ...int) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldNotIn(FieldSortOrder, vs...))
}
// SortOrderGT applies the GT predicate on the "sort_order" field.
func SortOrderGT(v int) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldGT(FieldSortOrder, v))
}
// SortOrderGTE applies the GTE predicate on the "sort_order" field.
func SortOrderGTE(v int) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldGTE(FieldSortOrder, v))
}
// SortOrderLT applies the LT predicate on the "sort_order" field.
func SortOrderLT(v int) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldLT(FieldSortOrder, v))
}
// SortOrderLTE applies the LTE predicate on the "sort_order" field.
func SortOrderLTE(v int) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldLTE(FieldSortOrder, v))
}
// EnabledEQ applies the EQ predicate on the "enabled" field.
func EnabledEQ(v bool) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldEQ(FieldEnabled, v))
}
// EnabledNEQ applies the NEQ predicate on the "enabled" field.
func EnabledNEQ(v bool) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldNEQ(FieldEnabled, v))
}
// CreatedAtEQ applies the EQ predicate on the "created_at" field.
func CreatedAtEQ(v time.Time) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldEQ(FieldCreatedAt, v))
}
// CreatedAtNEQ applies the NEQ predicate on the "created_at" field.
func CreatedAtNEQ(v time.Time) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldNEQ(FieldCreatedAt, v))
}
// CreatedAtIn applies the In predicate on the "created_at" field.
func CreatedAtIn(vs ...time.Time) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldIn(FieldCreatedAt, vs...))
}
// CreatedAtNotIn applies the NotIn predicate on the "created_at" field.
func CreatedAtNotIn(vs ...time.Time) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldNotIn(FieldCreatedAt, vs...))
}
// CreatedAtGT applies the GT predicate on the "created_at" field.
func CreatedAtGT(v time.Time) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldGT(FieldCreatedAt, v))
}
// CreatedAtGTE applies the GTE predicate on the "created_at" field.
func CreatedAtGTE(v time.Time) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldGTE(FieldCreatedAt, v))
}
// CreatedAtLT applies the LT predicate on the "created_at" field.
func CreatedAtLT(v time.Time) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldLT(FieldCreatedAt, v))
}
// CreatedAtLTE applies the LTE predicate on the "created_at" field.
func CreatedAtLTE(v time.Time) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldLTE(FieldCreatedAt, v))
}
// UpdatedAtEQ applies the EQ predicate on the "updated_at" field.
func UpdatedAtEQ(v time.Time) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldEQ(FieldUpdatedAt, v))
}
// UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.
func UpdatedAtNEQ(v time.Time) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldNEQ(FieldUpdatedAt, v))
}
// UpdatedAtIn applies the In predicate on the "updated_at" field.
func UpdatedAtIn(vs ...time.Time) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldIn(FieldUpdatedAt, vs...))
}
// UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field.
func UpdatedAtNotIn(vs ...time.Time) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldNotIn(FieldUpdatedAt, vs...))
}
// UpdatedAtGT applies the GT predicate on the "updated_at" field.
func UpdatedAtGT(v time.Time) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldGT(FieldUpdatedAt, v))
}
// UpdatedAtGTE applies the GTE predicate on the "updated_at" field.
func UpdatedAtGTE(v time.Time) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldGTE(FieldUpdatedAt, v))
}
// UpdatedAtLT applies the LT predicate on the "updated_at" field.
func UpdatedAtLT(v time.Time) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldLT(FieldUpdatedAt, v))
}
// UpdatedAtLTE applies the LTE predicate on the "updated_at" field.
func UpdatedAtLTE(v time.Time) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.FieldLTE(FieldUpdatedAt, v))
}
// And groups predicates with the AND operator between them.
func And(predicates ...predicate.PaymentChannel) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.AndPredicates(predicates...))
}
// Or groups predicates with the OR operator between them.
func Or(predicates ...predicate.PaymentChannel) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.OrPredicates(predicates...))
}
// Not applies the not operator on the given predicate.
func Not(p predicate.PaymentChannel) predicate.PaymentChannel {
return predicate.PaymentChannel(sql.NotPredicates(p))
}