Sub2API v1.0 - AI API 网关(二开初始版本,基于上游 Wei-Shaw/sub2api)
Release / update-version (push) Has been cancelled
Release / build-frontend (push) Has been cancelled
Release / release (push) Has been cancelled
Release / sync-version-file (push) Has been cancelled
CI / shell (push) Canceled after 0s
CI / test (push) Canceled after 0s
CI / frontend (push) Canceled after 0s
CI / golangci-lint (push) Canceled after 0s
Security Scan / backend-security (push) Canceled after 0s
Security Scan / frontend-security (push) Canceled after 0s

This commit is contained in:
李建琦
2026-08-21 18:30:13 +08:00
commit 6d655c9903
3584 changed files with 1270640 additions and 0 deletions
@@ -0,0 +1,202 @@
// Code generated by ent, DO NOT EDIT.
package userplatformquota
import (
"time"
"entgo.io/ent"
"entgo.io/ent/dialect/sql"
"entgo.io/ent/dialect/sql/sqlgraph"
)
const (
// Label holds the string label denoting the userplatformquota type in the database.
Label = "user_platform_quota"
// FieldID holds the string denoting the id field in the database.
FieldID = "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"
// FieldDeletedAt holds the string denoting the deleted_at field in the database.
FieldDeletedAt = "deleted_at"
// FieldUserID holds the string denoting the user_id field in the database.
FieldUserID = "user_id"
// FieldPlatform holds the string denoting the platform field in the database.
FieldPlatform = "platform"
// FieldDailyLimitUsd holds the string denoting the daily_limit_usd field in the database.
FieldDailyLimitUsd = "daily_limit_usd"
// FieldWeeklyLimitUsd holds the string denoting the weekly_limit_usd field in the database.
FieldWeeklyLimitUsd = "weekly_limit_usd"
// FieldMonthlyLimitUsd holds the string denoting the monthly_limit_usd field in the database.
FieldMonthlyLimitUsd = "monthly_limit_usd"
// FieldDailyUsageUsd holds the string denoting the daily_usage_usd field in the database.
FieldDailyUsageUsd = "daily_usage_usd"
// FieldWeeklyUsageUsd holds the string denoting the weekly_usage_usd field in the database.
FieldWeeklyUsageUsd = "weekly_usage_usd"
// FieldMonthlyUsageUsd holds the string denoting the monthly_usage_usd field in the database.
FieldMonthlyUsageUsd = "monthly_usage_usd"
// FieldDailyWindowStart holds the string denoting the daily_window_start field in the database.
FieldDailyWindowStart = "daily_window_start"
// FieldWeeklyWindowStart holds the string denoting the weekly_window_start field in the database.
FieldWeeklyWindowStart = "weekly_window_start"
// FieldMonthlyWindowStart holds the string denoting the monthly_window_start field in the database.
FieldMonthlyWindowStart = "monthly_window_start"
// EdgeUser holds the string denoting the user edge name in mutations.
EdgeUser = "user"
// Table holds the table name of the userplatformquota in the database.
Table = "user_platform_quotas"
// UserTable is the table that holds the user relation/edge.
UserTable = "user_platform_quotas"
// UserInverseTable is the table name for the User entity.
// It exists in this package in order to avoid circular dependency with the "user" package.
UserInverseTable = "users"
// UserColumn is the table column denoting the user relation/edge.
UserColumn = "user_id"
)
// Columns holds all SQL columns for userplatformquota fields.
var Columns = []string{
FieldID,
FieldCreatedAt,
FieldUpdatedAt,
FieldDeletedAt,
FieldUserID,
FieldPlatform,
FieldDailyLimitUsd,
FieldWeeklyLimitUsd,
FieldMonthlyLimitUsd,
FieldDailyUsageUsd,
FieldWeeklyUsageUsd,
FieldMonthlyUsageUsd,
FieldDailyWindowStart,
FieldWeeklyWindowStart,
FieldMonthlyWindowStart,
}
// 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
}
// Note that the variables below are initialized by the runtime
// package on the initialization of the application. Therefore,
// it should be imported in the main as follows:
//
// import _ "github.com/Wei-Shaw/sub2api/ent/runtime"
var (
Hooks [1]ent.Hook
Interceptors [1]ent.Interceptor
// 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
// PlatformValidator is a validator for the "platform" field. It is called by the builders before save.
PlatformValidator func(string) error
// DefaultDailyUsageUsd holds the default value on creation for the "daily_usage_usd" field.
DefaultDailyUsageUsd float64
// DefaultWeeklyUsageUsd holds the default value on creation for the "weekly_usage_usd" field.
DefaultWeeklyUsageUsd float64
// DefaultMonthlyUsageUsd holds the default value on creation for the "monthly_usage_usd" field.
DefaultMonthlyUsageUsd float64
)
// OrderOption defines the ordering options for the UserPlatformQuota 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()
}
// 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()
}
// ByDeletedAt orders the results by the deleted_at field.
func ByDeletedAt(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldDeletedAt, opts...).ToFunc()
}
// ByUserID orders the results by the user_id field.
func ByUserID(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldUserID, opts...).ToFunc()
}
// ByPlatform orders the results by the platform field.
func ByPlatform(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldPlatform, opts...).ToFunc()
}
// ByDailyLimitUsd orders the results by the daily_limit_usd field.
func ByDailyLimitUsd(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldDailyLimitUsd, opts...).ToFunc()
}
// ByWeeklyLimitUsd orders the results by the weekly_limit_usd field.
func ByWeeklyLimitUsd(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldWeeklyLimitUsd, opts...).ToFunc()
}
// ByMonthlyLimitUsd orders the results by the monthly_limit_usd field.
func ByMonthlyLimitUsd(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldMonthlyLimitUsd, opts...).ToFunc()
}
// ByDailyUsageUsd orders the results by the daily_usage_usd field.
func ByDailyUsageUsd(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldDailyUsageUsd, opts...).ToFunc()
}
// ByWeeklyUsageUsd orders the results by the weekly_usage_usd field.
func ByWeeklyUsageUsd(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldWeeklyUsageUsd, opts...).ToFunc()
}
// ByMonthlyUsageUsd orders the results by the monthly_usage_usd field.
func ByMonthlyUsageUsd(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldMonthlyUsageUsd, opts...).ToFunc()
}
// ByDailyWindowStart orders the results by the daily_window_start field.
func ByDailyWindowStart(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldDailyWindowStart, opts...).ToFunc()
}
// ByWeeklyWindowStart orders the results by the weekly_window_start field.
func ByWeeklyWindowStart(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldWeeklyWindowStart, opts...).ToFunc()
}
// ByMonthlyWindowStart orders the results by the monthly_window_start field.
func ByMonthlyWindowStart(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldMonthlyWindowStart, opts...).ToFunc()
}
// ByUserField orders the results by user field.
func ByUserField(field string, opts ...sql.OrderTermOption) OrderOption {
return func(s *sql.Selector) {
sqlgraph.OrderByNeighborTerms(s, newUserStep(), sql.OrderByField(field, opts...))
}
}
func newUserStep() *sqlgraph.Step {
return sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.To(UserInverseTable, FieldID),
sqlgraph.Edge(sqlgraph.M2O, true, UserTable, UserColumn),
)
}
+799
View File
@@ -0,0 +1,799 @@
// Code generated by ent, DO NOT EDIT.
package userplatformquota
import (
"time"
"entgo.io/ent/dialect/sql"
"entgo.io/ent/dialect/sql/sqlgraph"
"github.com/Wei-Shaw/sub2api/ent/predicate"
)
// ID filters vertices based on their ID field.
func ID(id int64) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldEQ(FieldID, id))
}
// IDEQ applies the EQ predicate on the ID field.
func IDEQ(id int64) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldEQ(FieldID, id))
}
// IDNEQ applies the NEQ predicate on the ID field.
func IDNEQ(id int64) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldNEQ(FieldID, id))
}
// IDIn applies the In predicate on the ID field.
func IDIn(ids ...int64) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldIn(FieldID, ids...))
}
// IDNotIn applies the NotIn predicate on the ID field.
func IDNotIn(ids ...int64) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldNotIn(FieldID, ids...))
}
// IDGT applies the GT predicate on the ID field.
func IDGT(id int64) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldGT(FieldID, id))
}
// IDGTE applies the GTE predicate on the ID field.
func IDGTE(id int64) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldGTE(FieldID, id))
}
// IDLT applies the LT predicate on the ID field.
func IDLT(id int64) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldLT(FieldID, id))
}
// IDLTE applies the LTE predicate on the ID field.
func IDLTE(id int64) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldLTE(FieldID, id))
}
// CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.
func CreatedAt(v time.Time) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(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.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldEQ(FieldUpdatedAt, v))
}
// DeletedAt applies equality check predicate on the "deleted_at" field. It's identical to DeletedAtEQ.
func DeletedAt(v time.Time) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldEQ(FieldDeletedAt, v))
}
// UserID applies equality check predicate on the "user_id" field. It's identical to UserIDEQ.
func UserID(v int64) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldEQ(FieldUserID, v))
}
// Platform applies equality check predicate on the "platform" field. It's identical to PlatformEQ.
func Platform(v string) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldEQ(FieldPlatform, v))
}
// DailyLimitUsd applies equality check predicate on the "daily_limit_usd" field. It's identical to DailyLimitUsdEQ.
func DailyLimitUsd(v float64) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldEQ(FieldDailyLimitUsd, v))
}
// WeeklyLimitUsd applies equality check predicate on the "weekly_limit_usd" field. It's identical to WeeklyLimitUsdEQ.
func WeeklyLimitUsd(v float64) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldEQ(FieldWeeklyLimitUsd, v))
}
// MonthlyLimitUsd applies equality check predicate on the "monthly_limit_usd" field. It's identical to MonthlyLimitUsdEQ.
func MonthlyLimitUsd(v float64) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldEQ(FieldMonthlyLimitUsd, v))
}
// DailyUsageUsd applies equality check predicate on the "daily_usage_usd" field. It's identical to DailyUsageUsdEQ.
func DailyUsageUsd(v float64) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldEQ(FieldDailyUsageUsd, v))
}
// WeeklyUsageUsd applies equality check predicate on the "weekly_usage_usd" field. It's identical to WeeklyUsageUsdEQ.
func WeeklyUsageUsd(v float64) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldEQ(FieldWeeklyUsageUsd, v))
}
// MonthlyUsageUsd applies equality check predicate on the "monthly_usage_usd" field. It's identical to MonthlyUsageUsdEQ.
func MonthlyUsageUsd(v float64) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldEQ(FieldMonthlyUsageUsd, v))
}
// DailyWindowStart applies equality check predicate on the "daily_window_start" field. It's identical to DailyWindowStartEQ.
func DailyWindowStart(v time.Time) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldEQ(FieldDailyWindowStart, v))
}
// WeeklyWindowStart applies equality check predicate on the "weekly_window_start" field. It's identical to WeeklyWindowStartEQ.
func WeeklyWindowStart(v time.Time) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldEQ(FieldWeeklyWindowStart, v))
}
// MonthlyWindowStart applies equality check predicate on the "monthly_window_start" field. It's identical to MonthlyWindowStartEQ.
func MonthlyWindowStart(v time.Time) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldEQ(FieldMonthlyWindowStart, v))
}
// CreatedAtEQ applies the EQ predicate on the "created_at" field.
func CreatedAtEQ(v time.Time) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldEQ(FieldCreatedAt, v))
}
// CreatedAtNEQ applies the NEQ predicate on the "created_at" field.
func CreatedAtNEQ(v time.Time) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldNEQ(FieldCreatedAt, v))
}
// CreatedAtIn applies the In predicate on the "created_at" field.
func CreatedAtIn(vs ...time.Time) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldIn(FieldCreatedAt, vs...))
}
// CreatedAtNotIn applies the NotIn predicate on the "created_at" field.
func CreatedAtNotIn(vs ...time.Time) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldNotIn(FieldCreatedAt, vs...))
}
// CreatedAtGT applies the GT predicate on the "created_at" field.
func CreatedAtGT(v time.Time) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldGT(FieldCreatedAt, v))
}
// CreatedAtGTE applies the GTE predicate on the "created_at" field.
func CreatedAtGTE(v time.Time) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldGTE(FieldCreatedAt, v))
}
// CreatedAtLT applies the LT predicate on the "created_at" field.
func CreatedAtLT(v time.Time) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldLT(FieldCreatedAt, v))
}
// CreatedAtLTE applies the LTE predicate on the "created_at" field.
func CreatedAtLTE(v time.Time) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldLTE(FieldCreatedAt, v))
}
// UpdatedAtEQ applies the EQ predicate on the "updated_at" field.
func UpdatedAtEQ(v time.Time) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldEQ(FieldUpdatedAt, v))
}
// UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.
func UpdatedAtNEQ(v time.Time) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldNEQ(FieldUpdatedAt, v))
}
// UpdatedAtIn applies the In predicate on the "updated_at" field.
func UpdatedAtIn(vs ...time.Time) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldIn(FieldUpdatedAt, vs...))
}
// UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field.
func UpdatedAtNotIn(vs ...time.Time) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldNotIn(FieldUpdatedAt, vs...))
}
// UpdatedAtGT applies the GT predicate on the "updated_at" field.
func UpdatedAtGT(v time.Time) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldGT(FieldUpdatedAt, v))
}
// UpdatedAtGTE applies the GTE predicate on the "updated_at" field.
func UpdatedAtGTE(v time.Time) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldGTE(FieldUpdatedAt, v))
}
// UpdatedAtLT applies the LT predicate on the "updated_at" field.
func UpdatedAtLT(v time.Time) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldLT(FieldUpdatedAt, v))
}
// UpdatedAtLTE applies the LTE predicate on the "updated_at" field.
func UpdatedAtLTE(v time.Time) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldLTE(FieldUpdatedAt, v))
}
// DeletedAtEQ applies the EQ predicate on the "deleted_at" field.
func DeletedAtEQ(v time.Time) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldEQ(FieldDeletedAt, v))
}
// DeletedAtNEQ applies the NEQ predicate on the "deleted_at" field.
func DeletedAtNEQ(v time.Time) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldNEQ(FieldDeletedAt, v))
}
// DeletedAtIn applies the In predicate on the "deleted_at" field.
func DeletedAtIn(vs ...time.Time) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldIn(FieldDeletedAt, vs...))
}
// DeletedAtNotIn applies the NotIn predicate on the "deleted_at" field.
func DeletedAtNotIn(vs ...time.Time) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldNotIn(FieldDeletedAt, vs...))
}
// DeletedAtGT applies the GT predicate on the "deleted_at" field.
func DeletedAtGT(v time.Time) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldGT(FieldDeletedAt, v))
}
// DeletedAtGTE applies the GTE predicate on the "deleted_at" field.
func DeletedAtGTE(v time.Time) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldGTE(FieldDeletedAt, v))
}
// DeletedAtLT applies the LT predicate on the "deleted_at" field.
func DeletedAtLT(v time.Time) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldLT(FieldDeletedAt, v))
}
// DeletedAtLTE applies the LTE predicate on the "deleted_at" field.
func DeletedAtLTE(v time.Time) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldLTE(FieldDeletedAt, v))
}
// DeletedAtIsNil applies the IsNil predicate on the "deleted_at" field.
func DeletedAtIsNil() predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldIsNull(FieldDeletedAt))
}
// DeletedAtNotNil applies the NotNil predicate on the "deleted_at" field.
func DeletedAtNotNil() predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldNotNull(FieldDeletedAt))
}
// UserIDEQ applies the EQ predicate on the "user_id" field.
func UserIDEQ(v int64) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldEQ(FieldUserID, v))
}
// UserIDNEQ applies the NEQ predicate on the "user_id" field.
func UserIDNEQ(v int64) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldNEQ(FieldUserID, v))
}
// UserIDIn applies the In predicate on the "user_id" field.
func UserIDIn(vs ...int64) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldIn(FieldUserID, vs...))
}
// UserIDNotIn applies the NotIn predicate on the "user_id" field.
func UserIDNotIn(vs ...int64) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldNotIn(FieldUserID, vs...))
}
// PlatformEQ applies the EQ predicate on the "platform" field.
func PlatformEQ(v string) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldEQ(FieldPlatform, v))
}
// PlatformNEQ applies the NEQ predicate on the "platform" field.
func PlatformNEQ(v string) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldNEQ(FieldPlatform, v))
}
// PlatformIn applies the In predicate on the "platform" field.
func PlatformIn(vs ...string) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldIn(FieldPlatform, vs...))
}
// PlatformNotIn applies the NotIn predicate on the "platform" field.
func PlatformNotIn(vs ...string) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldNotIn(FieldPlatform, vs...))
}
// PlatformGT applies the GT predicate on the "platform" field.
func PlatformGT(v string) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldGT(FieldPlatform, v))
}
// PlatformGTE applies the GTE predicate on the "platform" field.
func PlatformGTE(v string) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldGTE(FieldPlatform, v))
}
// PlatformLT applies the LT predicate on the "platform" field.
func PlatformLT(v string) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldLT(FieldPlatform, v))
}
// PlatformLTE applies the LTE predicate on the "platform" field.
func PlatformLTE(v string) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldLTE(FieldPlatform, v))
}
// PlatformContains applies the Contains predicate on the "platform" field.
func PlatformContains(v string) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldContains(FieldPlatform, v))
}
// PlatformHasPrefix applies the HasPrefix predicate on the "platform" field.
func PlatformHasPrefix(v string) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldHasPrefix(FieldPlatform, v))
}
// PlatformHasSuffix applies the HasSuffix predicate on the "platform" field.
func PlatformHasSuffix(v string) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldHasSuffix(FieldPlatform, v))
}
// PlatformEqualFold applies the EqualFold predicate on the "platform" field.
func PlatformEqualFold(v string) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldEqualFold(FieldPlatform, v))
}
// PlatformContainsFold applies the ContainsFold predicate on the "platform" field.
func PlatformContainsFold(v string) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldContainsFold(FieldPlatform, v))
}
// DailyLimitUsdEQ applies the EQ predicate on the "daily_limit_usd" field.
func DailyLimitUsdEQ(v float64) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldEQ(FieldDailyLimitUsd, v))
}
// DailyLimitUsdNEQ applies the NEQ predicate on the "daily_limit_usd" field.
func DailyLimitUsdNEQ(v float64) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldNEQ(FieldDailyLimitUsd, v))
}
// DailyLimitUsdIn applies the In predicate on the "daily_limit_usd" field.
func DailyLimitUsdIn(vs ...float64) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldIn(FieldDailyLimitUsd, vs...))
}
// DailyLimitUsdNotIn applies the NotIn predicate on the "daily_limit_usd" field.
func DailyLimitUsdNotIn(vs ...float64) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldNotIn(FieldDailyLimitUsd, vs...))
}
// DailyLimitUsdGT applies the GT predicate on the "daily_limit_usd" field.
func DailyLimitUsdGT(v float64) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldGT(FieldDailyLimitUsd, v))
}
// DailyLimitUsdGTE applies the GTE predicate on the "daily_limit_usd" field.
func DailyLimitUsdGTE(v float64) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldGTE(FieldDailyLimitUsd, v))
}
// DailyLimitUsdLT applies the LT predicate on the "daily_limit_usd" field.
func DailyLimitUsdLT(v float64) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldLT(FieldDailyLimitUsd, v))
}
// DailyLimitUsdLTE applies the LTE predicate on the "daily_limit_usd" field.
func DailyLimitUsdLTE(v float64) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldLTE(FieldDailyLimitUsd, v))
}
// DailyLimitUsdIsNil applies the IsNil predicate on the "daily_limit_usd" field.
func DailyLimitUsdIsNil() predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldIsNull(FieldDailyLimitUsd))
}
// DailyLimitUsdNotNil applies the NotNil predicate on the "daily_limit_usd" field.
func DailyLimitUsdNotNil() predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldNotNull(FieldDailyLimitUsd))
}
// WeeklyLimitUsdEQ applies the EQ predicate on the "weekly_limit_usd" field.
func WeeklyLimitUsdEQ(v float64) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldEQ(FieldWeeklyLimitUsd, v))
}
// WeeklyLimitUsdNEQ applies the NEQ predicate on the "weekly_limit_usd" field.
func WeeklyLimitUsdNEQ(v float64) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldNEQ(FieldWeeklyLimitUsd, v))
}
// WeeklyLimitUsdIn applies the In predicate on the "weekly_limit_usd" field.
func WeeklyLimitUsdIn(vs ...float64) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldIn(FieldWeeklyLimitUsd, vs...))
}
// WeeklyLimitUsdNotIn applies the NotIn predicate on the "weekly_limit_usd" field.
func WeeklyLimitUsdNotIn(vs ...float64) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldNotIn(FieldWeeklyLimitUsd, vs...))
}
// WeeklyLimitUsdGT applies the GT predicate on the "weekly_limit_usd" field.
func WeeklyLimitUsdGT(v float64) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldGT(FieldWeeklyLimitUsd, v))
}
// WeeklyLimitUsdGTE applies the GTE predicate on the "weekly_limit_usd" field.
func WeeklyLimitUsdGTE(v float64) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldGTE(FieldWeeklyLimitUsd, v))
}
// WeeklyLimitUsdLT applies the LT predicate on the "weekly_limit_usd" field.
func WeeklyLimitUsdLT(v float64) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldLT(FieldWeeklyLimitUsd, v))
}
// WeeklyLimitUsdLTE applies the LTE predicate on the "weekly_limit_usd" field.
func WeeklyLimitUsdLTE(v float64) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldLTE(FieldWeeklyLimitUsd, v))
}
// WeeklyLimitUsdIsNil applies the IsNil predicate on the "weekly_limit_usd" field.
func WeeklyLimitUsdIsNil() predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldIsNull(FieldWeeklyLimitUsd))
}
// WeeklyLimitUsdNotNil applies the NotNil predicate on the "weekly_limit_usd" field.
func WeeklyLimitUsdNotNil() predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldNotNull(FieldWeeklyLimitUsd))
}
// MonthlyLimitUsdEQ applies the EQ predicate on the "monthly_limit_usd" field.
func MonthlyLimitUsdEQ(v float64) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldEQ(FieldMonthlyLimitUsd, v))
}
// MonthlyLimitUsdNEQ applies the NEQ predicate on the "monthly_limit_usd" field.
func MonthlyLimitUsdNEQ(v float64) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldNEQ(FieldMonthlyLimitUsd, v))
}
// MonthlyLimitUsdIn applies the In predicate on the "monthly_limit_usd" field.
func MonthlyLimitUsdIn(vs ...float64) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldIn(FieldMonthlyLimitUsd, vs...))
}
// MonthlyLimitUsdNotIn applies the NotIn predicate on the "monthly_limit_usd" field.
func MonthlyLimitUsdNotIn(vs ...float64) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldNotIn(FieldMonthlyLimitUsd, vs...))
}
// MonthlyLimitUsdGT applies the GT predicate on the "monthly_limit_usd" field.
func MonthlyLimitUsdGT(v float64) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldGT(FieldMonthlyLimitUsd, v))
}
// MonthlyLimitUsdGTE applies the GTE predicate on the "monthly_limit_usd" field.
func MonthlyLimitUsdGTE(v float64) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldGTE(FieldMonthlyLimitUsd, v))
}
// MonthlyLimitUsdLT applies the LT predicate on the "monthly_limit_usd" field.
func MonthlyLimitUsdLT(v float64) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldLT(FieldMonthlyLimitUsd, v))
}
// MonthlyLimitUsdLTE applies the LTE predicate on the "monthly_limit_usd" field.
func MonthlyLimitUsdLTE(v float64) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldLTE(FieldMonthlyLimitUsd, v))
}
// MonthlyLimitUsdIsNil applies the IsNil predicate on the "monthly_limit_usd" field.
func MonthlyLimitUsdIsNil() predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldIsNull(FieldMonthlyLimitUsd))
}
// MonthlyLimitUsdNotNil applies the NotNil predicate on the "monthly_limit_usd" field.
func MonthlyLimitUsdNotNil() predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldNotNull(FieldMonthlyLimitUsd))
}
// DailyUsageUsdEQ applies the EQ predicate on the "daily_usage_usd" field.
func DailyUsageUsdEQ(v float64) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldEQ(FieldDailyUsageUsd, v))
}
// DailyUsageUsdNEQ applies the NEQ predicate on the "daily_usage_usd" field.
func DailyUsageUsdNEQ(v float64) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldNEQ(FieldDailyUsageUsd, v))
}
// DailyUsageUsdIn applies the In predicate on the "daily_usage_usd" field.
func DailyUsageUsdIn(vs ...float64) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldIn(FieldDailyUsageUsd, vs...))
}
// DailyUsageUsdNotIn applies the NotIn predicate on the "daily_usage_usd" field.
func DailyUsageUsdNotIn(vs ...float64) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldNotIn(FieldDailyUsageUsd, vs...))
}
// DailyUsageUsdGT applies the GT predicate on the "daily_usage_usd" field.
func DailyUsageUsdGT(v float64) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldGT(FieldDailyUsageUsd, v))
}
// DailyUsageUsdGTE applies the GTE predicate on the "daily_usage_usd" field.
func DailyUsageUsdGTE(v float64) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldGTE(FieldDailyUsageUsd, v))
}
// DailyUsageUsdLT applies the LT predicate on the "daily_usage_usd" field.
func DailyUsageUsdLT(v float64) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldLT(FieldDailyUsageUsd, v))
}
// DailyUsageUsdLTE applies the LTE predicate on the "daily_usage_usd" field.
func DailyUsageUsdLTE(v float64) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldLTE(FieldDailyUsageUsd, v))
}
// WeeklyUsageUsdEQ applies the EQ predicate on the "weekly_usage_usd" field.
func WeeklyUsageUsdEQ(v float64) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldEQ(FieldWeeklyUsageUsd, v))
}
// WeeklyUsageUsdNEQ applies the NEQ predicate on the "weekly_usage_usd" field.
func WeeklyUsageUsdNEQ(v float64) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldNEQ(FieldWeeklyUsageUsd, v))
}
// WeeklyUsageUsdIn applies the In predicate on the "weekly_usage_usd" field.
func WeeklyUsageUsdIn(vs ...float64) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldIn(FieldWeeklyUsageUsd, vs...))
}
// WeeklyUsageUsdNotIn applies the NotIn predicate on the "weekly_usage_usd" field.
func WeeklyUsageUsdNotIn(vs ...float64) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldNotIn(FieldWeeklyUsageUsd, vs...))
}
// WeeklyUsageUsdGT applies the GT predicate on the "weekly_usage_usd" field.
func WeeklyUsageUsdGT(v float64) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldGT(FieldWeeklyUsageUsd, v))
}
// WeeklyUsageUsdGTE applies the GTE predicate on the "weekly_usage_usd" field.
func WeeklyUsageUsdGTE(v float64) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldGTE(FieldWeeklyUsageUsd, v))
}
// WeeklyUsageUsdLT applies the LT predicate on the "weekly_usage_usd" field.
func WeeklyUsageUsdLT(v float64) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldLT(FieldWeeklyUsageUsd, v))
}
// WeeklyUsageUsdLTE applies the LTE predicate on the "weekly_usage_usd" field.
func WeeklyUsageUsdLTE(v float64) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldLTE(FieldWeeklyUsageUsd, v))
}
// MonthlyUsageUsdEQ applies the EQ predicate on the "monthly_usage_usd" field.
func MonthlyUsageUsdEQ(v float64) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldEQ(FieldMonthlyUsageUsd, v))
}
// MonthlyUsageUsdNEQ applies the NEQ predicate on the "monthly_usage_usd" field.
func MonthlyUsageUsdNEQ(v float64) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldNEQ(FieldMonthlyUsageUsd, v))
}
// MonthlyUsageUsdIn applies the In predicate on the "monthly_usage_usd" field.
func MonthlyUsageUsdIn(vs ...float64) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldIn(FieldMonthlyUsageUsd, vs...))
}
// MonthlyUsageUsdNotIn applies the NotIn predicate on the "monthly_usage_usd" field.
func MonthlyUsageUsdNotIn(vs ...float64) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldNotIn(FieldMonthlyUsageUsd, vs...))
}
// MonthlyUsageUsdGT applies the GT predicate on the "monthly_usage_usd" field.
func MonthlyUsageUsdGT(v float64) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldGT(FieldMonthlyUsageUsd, v))
}
// MonthlyUsageUsdGTE applies the GTE predicate on the "monthly_usage_usd" field.
func MonthlyUsageUsdGTE(v float64) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldGTE(FieldMonthlyUsageUsd, v))
}
// MonthlyUsageUsdLT applies the LT predicate on the "monthly_usage_usd" field.
func MonthlyUsageUsdLT(v float64) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldLT(FieldMonthlyUsageUsd, v))
}
// MonthlyUsageUsdLTE applies the LTE predicate on the "monthly_usage_usd" field.
func MonthlyUsageUsdLTE(v float64) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldLTE(FieldMonthlyUsageUsd, v))
}
// DailyWindowStartEQ applies the EQ predicate on the "daily_window_start" field.
func DailyWindowStartEQ(v time.Time) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldEQ(FieldDailyWindowStart, v))
}
// DailyWindowStartNEQ applies the NEQ predicate on the "daily_window_start" field.
func DailyWindowStartNEQ(v time.Time) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldNEQ(FieldDailyWindowStart, v))
}
// DailyWindowStartIn applies the In predicate on the "daily_window_start" field.
func DailyWindowStartIn(vs ...time.Time) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldIn(FieldDailyWindowStart, vs...))
}
// DailyWindowStartNotIn applies the NotIn predicate on the "daily_window_start" field.
func DailyWindowStartNotIn(vs ...time.Time) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldNotIn(FieldDailyWindowStart, vs...))
}
// DailyWindowStartGT applies the GT predicate on the "daily_window_start" field.
func DailyWindowStartGT(v time.Time) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldGT(FieldDailyWindowStart, v))
}
// DailyWindowStartGTE applies the GTE predicate on the "daily_window_start" field.
func DailyWindowStartGTE(v time.Time) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldGTE(FieldDailyWindowStart, v))
}
// DailyWindowStartLT applies the LT predicate on the "daily_window_start" field.
func DailyWindowStartLT(v time.Time) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldLT(FieldDailyWindowStart, v))
}
// DailyWindowStartLTE applies the LTE predicate on the "daily_window_start" field.
func DailyWindowStartLTE(v time.Time) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldLTE(FieldDailyWindowStart, v))
}
// DailyWindowStartIsNil applies the IsNil predicate on the "daily_window_start" field.
func DailyWindowStartIsNil() predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldIsNull(FieldDailyWindowStart))
}
// DailyWindowStartNotNil applies the NotNil predicate on the "daily_window_start" field.
func DailyWindowStartNotNil() predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldNotNull(FieldDailyWindowStart))
}
// WeeklyWindowStartEQ applies the EQ predicate on the "weekly_window_start" field.
func WeeklyWindowStartEQ(v time.Time) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldEQ(FieldWeeklyWindowStart, v))
}
// WeeklyWindowStartNEQ applies the NEQ predicate on the "weekly_window_start" field.
func WeeklyWindowStartNEQ(v time.Time) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldNEQ(FieldWeeklyWindowStart, v))
}
// WeeklyWindowStartIn applies the In predicate on the "weekly_window_start" field.
func WeeklyWindowStartIn(vs ...time.Time) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldIn(FieldWeeklyWindowStart, vs...))
}
// WeeklyWindowStartNotIn applies the NotIn predicate on the "weekly_window_start" field.
func WeeklyWindowStartNotIn(vs ...time.Time) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldNotIn(FieldWeeklyWindowStart, vs...))
}
// WeeklyWindowStartGT applies the GT predicate on the "weekly_window_start" field.
func WeeklyWindowStartGT(v time.Time) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldGT(FieldWeeklyWindowStart, v))
}
// WeeklyWindowStartGTE applies the GTE predicate on the "weekly_window_start" field.
func WeeklyWindowStartGTE(v time.Time) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldGTE(FieldWeeklyWindowStart, v))
}
// WeeklyWindowStartLT applies the LT predicate on the "weekly_window_start" field.
func WeeklyWindowStartLT(v time.Time) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldLT(FieldWeeklyWindowStart, v))
}
// WeeklyWindowStartLTE applies the LTE predicate on the "weekly_window_start" field.
func WeeklyWindowStartLTE(v time.Time) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldLTE(FieldWeeklyWindowStart, v))
}
// WeeklyWindowStartIsNil applies the IsNil predicate on the "weekly_window_start" field.
func WeeklyWindowStartIsNil() predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldIsNull(FieldWeeklyWindowStart))
}
// WeeklyWindowStartNotNil applies the NotNil predicate on the "weekly_window_start" field.
func WeeklyWindowStartNotNil() predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldNotNull(FieldWeeklyWindowStart))
}
// MonthlyWindowStartEQ applies the EQ predicate on the "monthly_window_start" field.
func MonthlyWindowStartEQ(v time.Time) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldEQ(FieldMonthlyWindowStart, v))
}
// MonthlyWindowStartNEQ applies the NEQ predicate on the "monthly_window_start" field.
func MonthlyWindowStartNEQ(v time.Time) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldNEQ(FieldMonthlyWindowStart, v))
}
// MonthlyWindowStartIn applies the In predicate on the "monthly_window_start" field.
func MonthlyWindowStartIn(vs ...time.Time) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldIn(FieldMonthlyWindowStart, vs...))
}
// MonthlyWindowStartNotIn applies the NotIn predicate on the "monthly_window_start" field.
func MonthlyWindowStartNotIn(vs ...time.Time) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldNotIn(FieldMonthlyWindowStart, vs...))
}
// MonthlyWindowStartGT applies the GT predicate on the "monthly_window_start" field.
func MonthlyWindowStartGT(v time.Time) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldGT(FieldMonthlyWindowStart, v))
}
// MonthlyWindowStartGTE applies the GTE predicate on the "monthly_window_start" field.
func MonthlyWindowStartGTE(v time.Time) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldGTE(FieldMonthlyWindowStart, v))
}
// MonthlyWindowStartLT applies the LT predicate on the "monthly_window_start" field.
func MonthlyWindowStartLT(v time.Time) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldLT(FieldMonthlyWindowStart, v))
}
// MonthlyWindowStartLTE applies the LTE predicate on the "monthly_window_start" field.
func MonthlyWindowStartLTE(v time.Time) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldLTE(FieldMonthlyWindowStart, v))
}
// MonthlyWindowStartIsNil applies the IsNil predicate on the "monthly_window_start" field.
func MonthlyWindowStartIsNil() predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldIsNull(FieldMonthlyWindowStart))
}
// MonthlyWindowStartNotNil applies the NotNil predicate on the "monthly_window_start" field.
func MonthlyWindowStartNotNil() predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.FieldNotNull(FieldMonthlyWindowStart))
}
// HasUser applies the HasEdge predicate on the "user" edge.
func HasUser() predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(func(s *sql.Selector) {
step := sqlgraph.NewStep(
sqlgraph.From(Table, FieldID),
sqlgraph.Edge(sqlgraph.M2O, true, UserTable, UserColumn),
)
sqlgraph.HasNeighbors(s, step)
})
}
// HasUserWith applies the HasEdge predicate on the "user" edge with a given conditions (other predicates).
func HasUserWith(preds ...predicate.User) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(func(s *sql.Selector) {
step := newUserStep()
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
for _, p := range preds {
p(s)
}
})
})
}
// And groups predicates with the AND operator between them.
func And(predicates ...predicate.UserPlatformQuota) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.AndPredicates(predicates...))
}
// Or groups predicates with the OR operator between them.
func Or(predicates ...predicate.UserPlatformQuota) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.OrPredicates(predicates...))
}
// Not applies the not operator on the given predicate.
func Not(p predicate.UserPlatformQuota) predicate.UserPlatformQuota {
return predicate.UserPlatformQuota(sql.NotPredicates(p))
}