fix: 复合主键表改为单字段 id 以支持 ent 完整生成
This commit is contained in:
@@ -31,11 +31,11 @@ func init() {
|
||||
shopplayersFields := schema.ShopPlayers{}.Fields()
|
||||
_ = shopplayersFields
|
||||
// shopplayersDescIsPrimary is the schema descriptor for is_primary field.
|
||||
shopplayersDescIsPrimary := shopplayersFields[2].Descriptor()
|
||||
shopplayersDescIsPrimary := shopplayersFields[3].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[3].Descriptor()
|
||||
shopplayersDescJoinedAt := shopplayersFields[4].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()
|
||||
|
||||
Reference in New Issue
Block a user