fix: shop_players 关系表主键与模型对齐
This commit is contained in:
@@ -11,8 +11,6 @@ import (
|
||||
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.
|
||||
@@ -29,7 +27,6 @@ const (
|
||||
|
||||
// Columns holds all SQL columns for shopplayers fields.
|
||||
var Columns = []string{
|
||||
FieldID,
|
||||
FieldShopID,
|
||||
FieldPlayerID,
|
||||
FieldIsPrimary,
|
||||
@@ -57,11 +54,6 @@ var (
|
||||
// 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()
|
||||
|
||||
@@ -9,51 +9,6 @@ import (
|
||||
"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))
|
||||
|
||||
Reference in New Issue
Block a user