fix: 复合主键表改为单字段 id 以支持 ent 完整生成

This commit is contained in:
zetaloop
2026-04-24 07:32:52 +08:00
parent c62d743320
commit 5ad579f03c
19 changed files with 324 additions and 82 deletions
@@ -9,6 +9,51 @@ 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))