1
0

fix planet float

This commit is contained in:
2024-08-01 07:01:19 +09:00
parent 4c0c396086
commit 9222892c61
14 changed files with 553 additions and 110 deletions

View File

@@ -751,15 +751,15 @@ func (uc *UserCreate) SetNillableCoinAt(t *time.Time) *UserCreate {
}
// SetPlanet sets the "planet" field.
func (uc *UserCreate) SetPlanet(i int) *UserCreate {
uc.mutation.SetPlanet(i)
func (uc *UserCreate) SetPlanet(f float64) *UserCreate {
uc.mutation.SetPlanet(f)
return uc
}
// SetNillablePlanet sets the "planet" field if the given value is not nil.
func (uc *UserCreate) SetNillablePlanet(i *int) *UserCreate {
if i != nil {
uc.SetPlanet(*i)
func (uc *UserCreate) SetNillablePlanet(f *float64) *UserCreate {
if f != nil {
uc.SetPlanet(*f)
}
return uc
}
@@ -1328,7 +1328,7 @@ func (uc *UserCreate) createSpec() (*User, *sqlgraph.CreateSpec) {
_node.CoinAt = value
}
if value, ok := uc.mutation.Planet(); ok {
_spec.SetField(user.FieldPlanet, field.TypeInt, value)
_spec.SetField(user.FieldPlanet, field.TypeFloat64, value)
_node.Planet = value
}
if value, ok := uc.mutation.PlanetAt(); ok {