fix: shop_players 关系表主键与模型对齐

This commit is contained in:
zetaloop
2026-04-04 06:25:49 +08:00
parent 3a81aec527
commit 7dc088eadf
18 changed files with 91 additions and 310 deletions
+2 -2
View File
@@ -31,11 +31,11 @@ func init() {
shopplayersFields := schema.ShopPlayers{}.Fields()
_ = shopplayersFields
// shopplayersDescIsPrimary is the schema descriptor for is_primary field.
shopplayersDescIsPrimary := shopplayersFields[3].Descriptor()
shopplayersDescIsPrimary := shopplayersFields[2].Descriptor()
// shopplayers.DefaultIsPrimary holds the default value on creation for the is_primary field.
shopplayers.DefaultIsPrimary = shopplayersDescIsPrimary.Default.(bool)
// shopplayersDescJoinedAt is the schema descriptor for joined_at field.
shopplayersDescJoinedAt := shopplayersFields[4].Descriptor()
shopplayersDescJoinedAt := shopplayersFields[3].Descriptor()
// shopplayers.DefaultJoinedAt holds the default value on creation for the joined_at field.
shopplayers.DefaultJoinedAt = shopplayersDescJoinedAt.Default.(func() time.Time)
shopsFields := schema.Shops{}.Fields()