fix: api descript
This commit is contained in:
@@ -0,0 +1,88 @@
|
||||
// Code generated by ent, DO NOT EDIT.
|
||||
|
||||
package shopplayers
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"entgo.io/ent/dialect/sql"
|
||||
)
|
||||
|
||||
const (
|
||||
// Label holds the string label denoting the shopplayers type in the database.
|
||||
Label = "shop_players"
|
||||
// FieldID holds the string denoting the id field in the database.
|
||||
FieldID = "id"
|
||||
// FieldShopID holds the string denoting the shop_id field in the database.
|
||||
FieldShopID = "shop_id"
|
||||
// FieldPlayerID holds the string denoting the player_id field in the database.
|
||||
FieldPlayerID = "player_id"
|
||||
// FieldIsPrimary holds the string denoting the is_primary field in the database.
|
||||
FieldIsPrimary = "is_primary"
|
||||
// FieldJoinedAt holds the string denoting the joined_at field in the database.
|
||||
FieldJoinedAt = "joined_at"
|
||||
// FieldLeftAt holds the string denoting the left_at field in the database.
|
||||
FieldLeftAt = "left_at"
|
||||
// Table holds the table name of the shopplayers in the database.
|
||||
Table = "shop_players"
|
||||
)
|
||||
|
||||
// Columns holds all SQL columns for shopplayers fields.
|
||||
var Columns = []string{
|
||||
FieldID,
|
||||
FieldShopID,
|
||||
FieldPlayerID,
|
||||
FieldIsPrimary,
|
||||
FieldJoinedAt,
|
||||
FieldLeftAt,
|
||||
}
|
||||
|
||||
// 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 (
|
||||
// DefaultIsPrimary holds the default value on creation for the "is_primary" field.
|
||||
DefaultIsPrimary bool
|
||||
// DefaultJoinedAt holds the default value on creation for the "joined_at" field.
|
||||
DefaultJoinedAt func() time.Time
|
||||
)
|
||||
|
||||
// OrderOption defines the ordering options for the ShopPlayers 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()
|
||||
}
|
||||
|
||||
// ByShopID orders the results by the shop_id field.
|
||||
func ByShopID(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldShopID, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByPlayerID orders the results by the player_id field.
|
||||
func ByPlayerID(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldPlayerID, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByIsPrimary orders the results by the is_primary field.
|
||||
func ByIsPrimary(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldIsPrimary, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByJoinedAt orders the results by the joined_at field.
|
||||
func ByJoinedAt(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldJoinedAt, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByLeftAt orders the results by the left_at field.
|
||||
func ByLeftAt(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldLeftAt, opts...).ToFunc()
|
||||
}
|
||||
@@ -0,0 +1,285 @@
|
||||
// Code generated by ent, DO NOT EDIT.
|
||||
|
||||
package shopplayers
|
||||
|
||||
import (
|
||||
"juwan-backend/app/shop/rpc/internal/models/predicate"
|
||||
"time"
|
||||
|
||||
"entgo.io/ent/dialect/sql"
|
||||
)
|
||||
|
||||
// ID filters vertices based on their ID field.
|
||||
func ID(id int64) predicate.ShopPlayers {
|
||||
return predicate.ShopPlayers(sql.FieldEQ(FieldID, id))
|
||||
}
|
||||
|
||||
// IDEQ applies the EQ predicate on the ID field.
|
||||
func IDEQ(id int64) predicate.ShopPlayers {
|
||||
return predicate.ShopPlayers(sql.FieldEQ(FieldID, id))
|
||||
}
|
||||
|
||||
// IDNEQ applies the NEQ predicate on the ID field.
|
||||
func IDNEQ(id int64) predicate.ShopPlayers {
|
||||
return predicate.ShopPlayers(sql.FieldNEQ(FieldID, id))
|
||||
}
|
||||
|
||||
// IDIn applies the In predicate on the ID field.
|
||||
func IDIn(ids ...int64) predicate.ShopPlayers {
|
||||
return predicate.ShopPlayers(sql.FieldIn(FieldID, ids...))
|
||||
}
|
||||
|
||||
// IDNotIn applies the NotIn predicate on the ID field.
|
||||
func IDNotIn(ids ...int64) predicate.ShopPlayers {
|
||||
return predicate.ShopPlayers(sql.FieldNotIn(FieldID, ids...))
|
||||
}
|
||||
|
||||
// IDGT applies the GT predicate on the ID field.
|
||||
func IDGT(id int64) predicate.ShopPlayers {
|
||||
return predicate.ShopPlayers(sql.FieldGT(FieldID, id))
|
||||
}
|
||||
|
||||
// IDGTE applies the GTE predicate on the ID field.
|
||||
func IDGTE(id int64) predicate.ShopPlayers {
|
||||
return predicate.ShopPlayers(sql.FieldGTE(FieldID, id))
|
||||
}
|
||||
|
||||
// IDLT applies the LT predicate on the ID field.
|
||||
func IDLT(id int64) predicate.ShopPlayers {
|
||||
return predicate.ShopPlayers(sql.FieldLT(FieldID, id))
|
||||
}
|
||||
|
||||
// IDLTE applies the LTE predicate on the ID field.
|
||||
func IDLTE(id int64) predicate.ShopPlayers {
|
||||
return predicate.ShopPlayers(sql.FieldLTE(FieldID, id))
|
||||
}
|
||||
|
||||
// ShopID applies equality check predicate on the "shop_id" field. It's identical to ShopIDEQ.
|
||||
func ShopID(v int64) predicate.ShopPlayers {
|
||||
return predicate.ShopPlayers(sql.FieldEQ(FieldShopID, v))
|
||||
}
|
||||
|
||||
// PlayerID applies equality check predicate on the "player_id" field. It's identical to PlayerIDEQ.
|
||||
func PlayerID(v int64) predicate.ShopPlayers {
|
||||
return predicate.ShopPlayers(sql.FieldEQ(FieldPlayerID, v))
|
||||
}
|
||||
|
||||
// IsPrimary applies equality check predicate on the "is_primary" field. It's identical to IsPrimaryEQ.
|
||||
func IsPrimary(v bool) predicate.ShopPlayers {
|
||||
return predicate.ShopPlayers(sql.FieldEQ(FieldIsPrimary, v))
|
||||
}
|
||||
|
||||
// JoinedAt applies equality check predicate on the "joined_at" field. It's identical to JoinedAtEQ.
|
||||
func JoinedAt(v time.Time) predicate.ShopPlayers {
|
||||
return predicate.ShopPlayers(sql.FieldEQ(FieldJoinedAt, v))
|
||||
}
|
||||
|
||||
// LeftAt applies equality check predicate on the "left_at" field. It's identical to LeftAtEQ.
|
||||
func LeftAt(v time.Time) predicate.ShopPlayers {
|
||||
return predicate.ShopPlayers(sql.FieldEQ(FieldLeftAt, v))
|
||||
}
|
||||
|
||||
// ShopIDEQ applies the EQ predicate on the "shop_id" field.
|
||||
func ShopIDEQ(v int64) predicate.ShopPlayers {
|
||||
return predicate.ShopPlayers(sql.FieldEQ(FieldShopID, v))
|
||||
}
|
||||
|
||||
// ShopIDNEQ applies the NEQ predicate on the "shop_id" field.
|
||||
func ShopIDNEQ(v int64) predicate.ShopPlayers {
|
||||
return predicate.ShopPlayers(sql.FieldNEQ(FieldShopID, v))
|
||||
}
|
||||
|
||||
// ShopIDIn applies the In predicate on the "shop_id" field.
|
||||
func ShopIDIn(vs ...int64) predicate.ShopPlayers {
|
||||
return predicate.ShopPlayers(sql.FieldIn(FieldShopID, vs...))
|
||||
}
|
||||
|
||||
// ShopIDNotIn applies the NotIn predicate on the "shop_id" field.
|
||||
func ShopIDNotIn(vs ...int64) predicate.ShopPlayers {
|
||||
return predicate.ShopPlayers(sql.FieldNotIn(FieldShopID, vs...))
|
||||
}
|
||||
|
||||
// ShopIDGT applies the GT predicate on the "shop_id" field.
|
||||
func ShopIDGT(v int64) predicate.ShopPlayers {
|
||||
return predicate.ShopPlayers(sql.FieldGT(FieldShopID, v))
|
||||
}
|
||||
|
||||
// ShopIDGTE applies the GTE predicate on the "shop_id" field.
|
||||
func ShopIDGTE(v int64) predicate.ShopPlayers {
|
||||
return predicate.ShopPlayers(sql.FieldGTE(FieldShopID, v))
|
||||
}
|
||||
|
||||
// ShopIDLT applies the LT predicate on the "shop_id" field.
|
||||
func ShopIDLT(v int64) predicate.ShopPlayers {
|
||||
return predicate.ShopPlayers(sql.FieldLT(FieldShopID, v))
|
||||
}
|
||||
|
||||
// ShopIDLTE applies the LTE predicate on the "shop_id" field.
|
||||
func ShopIDLTE(v int64) predicate.ShopPlayers {
|
||||
return predicate.ShopPlayers(sql.FieldLTE(FieldShopID, v))
|
||||
}
|
||||
|
||||
// PlayerIDEQ applies the EQ predicate on the "player_id" field.
|
||||
func PlayerIDEQ(v int64) predicate.ShopPlayers {
|
||||
return predicate.ShopPlayers(sql.FieldEQ(FieldPlayerID, v))
|
||||
}
|
||||
|
||||
// PlayerIDNEQ applies the NEQ predicate on the "player_id" field.
|
||||
func PlayerIDNEQ(v int64) predicate.ShopPlayers {
|
||||
return predicate.ShopPlayers(sql.FieldNEQ(FieldPlayerID, v))
|
||||
}
|
||||
|
||||
// PlayerIDIn applies the In predicate on the "player_id" field.
|
||||
func PlayerIDIn(vs ...int64) predicate.ShopPlayers {
|
||||
return predicate.ShopPlayers(sql.FieldIn(FieldPlayerID, vs...))
|
||||
}
|
||||
|
||||
// PlayerIDNotIn applies the NotIn predicate on the "player_id" field.
|
||||
func PlayerIDNotIn(vs ...int64) predicate.ShopPlayers {
|
||||
return predicate.ShopPlayers(sql.FieldNotIn(FieldPlayerID, vs...))
|
||||
}
|
||||
|
||||
// PlayerIDGT applies the GT predicate on the "player_id" field.
|
||||
func PlayerIDGT(v int64) predicate.ShopPlayers {
|
||||
return predicate.ShopPlayers(sql.FieldGT(FieldPlayerID, v))
|
||||
}
|
||||
|
||||
// PlayerIDGTE applies the GTE predicate on the "player_id" field.
|
||||
func PlayerIDGTE(v int64) predicate.ShopPlayers {
|
||||
return predicate.ShopPlayers(sql.FieldGTE(FieldPlayerID, v))
|
||||
}
|
||||
|
||||
// PlayerIDLT applies the LT predicate on the "player_id" field.
|
||||
func PlayerIDLT(v int64) predicate.ShopPlayers {
|
||||
return predicate.ShopPlayers(sql.FieldLT(FieldPlayerID, v))
|
||||
}
|
||||
|
||||
// PlayerIDLTE applies the LTE predicate on the "player_id" field.
|
||||
func PlayerIDLTE(v int64) predicate.ShopPlayers {
|
||||
return predicate.ShopPlayers(sql.FieldLTE(FieldPlayerID, v))
|
||||
}
|
||||
|
||||
// IsPrimaryEQ applies the EQ predicate on the "is_primary" field.
|
||||
func IsPrimaryEQ(v bool) predicate.ShopPlayers {
|
||||
return predicate.ShopPlayers(sql.FieldEQ(FieldIsPrimary, v))
|
||||
}
|
||||
|
||||
// IsPrimaryNEQ applies the NEQ predicate on the "is_primary" field.
|
||||
func IsPrimaryNEQ(v bool) predicate.ShopPlayers {
|
||||
return predicate.ShopPlayers(sql.FieldNEQ(FieldIsPrimary, v))
|
||||
}
|
||||
|
||||
// IsPrimaryIsNil applies the IsNil predicate on the "is_primary" field.
|
||||
func IsPrimaryIsNil() predicate.ShopPlayers {
|
||||
return predicate.ShopPlayers(sql.FieldIsNull(FieldIsPrimary))
|
||||
}
|
||||
|
||||
// IsPrimaryNotNil applies the NotNil predicate on the "is_primary" field.
|
||||
func IsPrimaryNotNil() predicate.ShopPlayers {
|
||||
return predicate.ShopPlayers(sql.FieldNotNull(FieldIsPrimary))
|
||||
}
|
||||
|
||||
// JoinedAtEQ applies the EQ predicate on the "joined_at" field.
|
||||
func JoinedAtEQ(v time.Time) predicate.ShopPlayers {
|
||||
return predicate.ShopPlayers(sql.FieldEQ(FieldJoinedAt, v))
|
||||
}
|
||||
|
||||
// JoinedAtNEQ applies the NEQ predicate on the "joined_at" field.
|
||||
func JoinedAtNEQ(v time.Time) predicate.ShopPlayers {
|
||||
return predicate.ShopPlayers(sql.FieldNEQ(FieldJoinedAt, v))
|
||||
}
|
||||
|
||||
// JoinedAtIn applies the In predicate on the "joined_at" field.
|
||||
func JoinedAtIn(vs ...time.Time) predicate.ShopPlayers {
|
||||
return predicate.ShopPlayers(sql.FieldIn(FieldJoinedAt, vs...))
|
||||
}
|
||||
|
||||
// JoinedAtNotIn applies the NotIn predicate on the "joined_at" field.
|
||||
func JoinedAtNotIn(vs ...time.Time) predicate.ShopPlayers {
|
||||
return predicate.ShopPlayers(sql.FieldNotIn(FieldJoinedAt, vs...))
|
||||
}
|
||||
|
||||
// JoinedAtGT applies the GT predicate on the "joined_at" field.
|
||||
func JoinedAtGT(v time.Time) predicate.ShopPlayers {
|
||||
return predicate.ShopPlayers(sql.FieldGT(FieldJoinedAt, v))
|
||||
}
|
||||
|
||||
// JoinedAtGTE applies the GTE predicate on the "joined_at" field.
|
||||
func JoinedAtGTE(v time.Time) predicate.ShopPlayers {
|
||||
return predicate.ShopPlayers(sql.FieldGTE(FieldJoinedAt, v))
|
||||
}
|
||||
|
||||
// JoinedAtLT applies the LT predicate on the "joined_at" field.
|
||||
func JoinedAtLT(v time.Time) predicate.ShopPlayers {
|
||||
return predicate.ShopPlayers(sql.FieldLT(FieldJoinedAt, v))
|
||||
}
|
||||
|
||||
// JoinedAtLTE applies the LTE predicate on the "joined_at" field.
|
||||
func JoinedAtLTE(v time.Time) predicate.ShopPlayers {
|
||||
return predicate.ShopPlayers(sql.FieldLTE(FieldJoinedAt, v))
|
||||
}
|
||||
|
||||
// LeftAtEQ applies the EQ predicate on the "left_at" field.
|
||||
func LeftAtEQ(v time.Time) predicate.ShopPlayers {
|
||||
return predicate.ShopPlayers(sql.FieldEQ(FieldLeftAt, v))
|
||||
}
|
||||
|
||||
// LeftAtNEQ applies the NEQ predicate on the "left_at" field.
|
||||
func LeftAtNEQ(v time.Time) predicate.ShopPlayers {
|
||||
return predicate.ShopPlayers(sql.FieldNEQ(FieldLeftAt, v))
|
||||
}
|
||||
|
||||
// LeftAtIn applies the In predicate on the "left_at" field.
|
||||
func LeftAtIn(vs ...time.Time) predicate.ShopPlayers {
|
||||
return predicate.ShopPlayers(sql.FieldIn(FieldLeftAt, vs...))
|
||||
}
|
||||
|
||||
// LeftAtNotIn applies the NotIn predicate on the "left_at" field.
|
||||
func LeftAtNotIn(vs ...time.Time) predicate.ShopPlayers {
|
||||
return predicate.ShopPlayers(sql.FieldNotIn(FieldLeftAt, vs...))
|
||||
}
|
||||
|
||||
// LeftAtGT applies the GT predicate on the "left_at" field.
|
||||
func LeftAtGT(v time.Time) predicate.ShopPlayers {
|
||||
return predicate.ShopPlayers(sql.FieldGT(FieldLeftAt, v))
|
||||
}
|
||||
|
||||
// LeftAtGTE applies the GTE predicate on the "left_at" field.
|
||||
func LeftAtGTE(v time.Time) predicate.ShopPlayers {
|
||||
return predicate.ShopPlayers(sql.FieldGTE(FieldLeftAt, v))
|
||||
}
|
||||
|
||||
// LeftAtLT applies the LT predicate on the "left_at" field.
|
||||
func LeftAtLT(v time.Time) predicate.ShopPlayers {
|
||||
return predicate.ShopPlayers(sql.FieldLT(FieldLeftAt, v))
|
||||
}
|
||||
|
||||
// LeftAtLTE applies the LTE predicate on the "left_at" field.
|
||||
func LeftAtLTE(v time.Time) predicate.ShopPlayers {
|
||||
return predicate.ShopPlayers(sql.FieldLTE(FieldLeftAt, v))
|
||||
}
|
||||
|
||||
// LeftAtIsNil applies the IsNil predicate on the "left_at" field.
|
||||
func LeftAtIsNil() predicate.ShopPlayers {
|
||||
return predicate.ShopPlayers(sql.FieldIsNull(FieldLeftAt))
|
||||
}
|
||||
|
||||
// LeftAtNotNil applies the NotNil predicate on the "left_at" field.
|
||||
func LeftAtNotNil() predicate.ShopPlayers {
|
||||
return predicate.ShopPlayers(sql.FieldNotNull(FieldLeftAt))
|
||||
}
|
||||
|
||||
// And groups predicates with the AND operator between them.
|
||||
func And(predicates ...predicate.ShopPlayers) predicate.ShopPlayers {
|
||||
return predicate.ShopPlayers(sql.AndPredicates(predicates...))
|
||||
}
|
||||
|
||||
// Or groups predicates with the OR operator between them.
|
||||
func Or(predicates ...predicate.ShopPlayers) predicate.ShopPlayers {
|
||||
return predicate.ShopPlayers(sql.OrPredicates(predicates...))
|
||||
}
|
||||
|
||||
// Not applies the not operator on the given predicate.
|
||||
func Not(p predicate.ShopPlayers) predicate.ShopPlayers {
|
||||
return predicate.ShopPlayers(sql.NotPredicates(p))
|
||||
}
|
||||
Reference in New Issue
Block a user