|
@@ -38014,8 +38014,8 @@ type UsageStatisticDayMutation struct {
|
|
|
addnew_user *int64
|
|
|
label_dist *[]custom_types.LabelDist
|
|
|
appendlabel_dist []custom_types.LabelDist
|
|
|
- consume_coin *uint64
|
|
|
- addconsume_coin *int64
|
|
|
+ consume_coin *float64
|
|
|
+ addconsume_coin *float64
|
|
|
clearedFields map[string]struct{}
|
|
|
done bool
|
|
|
oldValue func(context.Context) (*UsageStatisticDay, error)
|
|
@@ -39048,13 +39048,13 @@ func (m *UsageStatisticDayMutation) ResetLabelDist() {
|
|
|
}
|
|
|
|
|
|
// SetConsumeCoin sets the "consume_coin" field.
|
|
|
-func (m *UsageStatisticDayMutation) SetConsumeCoin(u uint64) {
|
|
|
- m.consume_coin = &u
|
|
|
+func (m *UsageStatisticDayMutation) SetConsumeCoin(f float64) {
|
|
|
+ m.consume_coin = &f
|
|
|
m.addconsume_coin = nil
|
|
|
}
|
|
|
|
|
|
// ConsumeCoin returns the value of the "consume_coin" field in the mutation.
|
|
|
-func (m *UsageStatisticDayMutation) ConsumeCoin() (r uint64, exists bool) {
|
|
|
+func (m *UsageStatisticDayMutation) ConsumeCoin() (r float64, exists bool) {
|
|
|
v := m.consume_coin
|
|
|
if v == nil {
|
|
|
return
|
|
@@ -39065,7 +39065,7 @@ func (m *UsageStatisticDayMutation) ConsumeCoin() (r uint64, exists bool) {
|
|
|
// OldConsumeCoin returns the old "consume_coin" field's value of the UsageStatisticDay entity.
|
|
|
// If the UsageStatisticDay object wasn't provided to the builder, the object is fetched from the database.
|
|
|
// An error is returned if the mutation operation is not UpdateOne, or the database query fails.
|
|
|
-func (m *UsageStatisticDayMutation) OldConsumeCoin(ctx context.Context) (v uint64, err error) {
|
|
|
+func (m *UsageStatisticDayMutation) OldConsumeCoin(ctx context.Context) (v float64, err error) {
|
|
|
if !m.op.Is(OpUpdateOne) {
|
|
|
return v, errors.New("OldConsumeCoin is only allowed on UpdateOne operations")
|
|
|
}
|
|
@@ -39079,17 +39079,17 @@ func (m *UsageStatisticDayMutation) OldConsumeCoin(ctx context.Context) (v uint6
|
|
|
return oldValue.ConsumeCoin, nil
|
|
|
}
|
|
|
|
|
|
-// AddConsumeCoin adds u to the "consume_coin" field.
|
|
|
-func (m *UsageStatisticDayMutation) AddConsumeCoin(u int64) {
|
|
|
+// AddConsumeCoin adds f to the "consume_coin" field.
|
|
|
+func (m *UsageStatisticDayMutation) AddConsumeCoin(f float64) {
|
|
|
if m.addconsume_coin != nil {
|
|
|
- *m.addconsume_coin += u
|
|
|
+ *m.addconsume_coin += f
|
|
|
} else {
|
|
|
- m.addconsume_coin = &u
|
|
|
+ m.addconsume_coin = &f
|
|
|
}
|
|
|
}
|
|
|
|
|
|
// AddedConsumeCoin returns the value that was added to the "consume_coin" field in this mutation.
|
|
|
-func (m *UsageStatisticDayMutation) AddedConsumeCoin() (r int64, exists bool) {
|
|
|
+func (m *UsageStatisticDayMutation) AddedConsumeCoin() (r float64, exists bool) {
|
|
|
v := m.addconsume_coin
|
|
|
if v == nil {
|
|
|
return
|
|
@@ -39424,7 +39424,7 @@ func (m *UsageStatisticDayMutation) SetField(name string, value ent.Value) error
|
|
|
m.SetLabelDist(v)
|
|
|
return nil
|
|
|
case usagestatisticday.FieldConsumeCoin:
|
|
|
- v, ok := value.(uint64)
|
|
|
+ v, ok := value.(float64)
|
|
|
if !ok {
|
|
|
return fmt.Errorf("unexpected type %T for field %s", value, name)
|
|
|
}
|
|
@@ -39605,7 +39605,7 @@ func (m *UsageStatisticDayMutation) AddField(name string, value ent.Value) error
|
|
|
m.AddNewUser(v)
|
|
|
return nil
|
|
|
case usagestatisticday.FieldConsumeCoin:
|
|
|
- v, ok := value.(int64)
|
|
|
+ v, ok := value.(float64)
|
|
|
if !ok {
|
|
|
return fmt.Errorf("unexpected type %T for field %s", value, name)
|
|
|
}
|
|
@@ -39813,8 +39813,8 @@ type UsageStatisticHourMutation struct {
|
|
|
addnew_user *int64
|
|
|
label_dist *[]custom_types.LabelDist
|
|
|
appendlabel_dist []custom_types.LabelDist
|
|
|
- consume_coin *uint64
|
|
|
- addconsume_coin *int64
|
|
|
+ consume_coin *float64
|
|
|
+ addconsume_coin *float64
|
|
|
clearedFields map[string]struct{}
|
|
|
done bool
|
|
|
oldValue func(context.Context) (*UsageStatisticHour, error)
|
|
@@ -40847,13 +40847,13 @@ func (m *UsageStatisticHourMutation) ResetLabelDist() {
|
|
|
}
|
|
|
|
|
|
// SetConsumeCoin sets the "consume_coin" field.
|
|
|
-func (m *UsageStatisticHourMutation) SetConsumeCoin(u uint64) {
|
|
|
- m.consume_coin = &u
|
|
|
+func (m *UsageStatisticHourMutation) SetConsumeCoin(f float64) {
|
|
|
+ m.consume_coin = &f
|
|
|
m.addconsume_coin = nil
|
|
|
}
|
|
|
|
|
|
// ConsumeCoin returns the value of the "consume_coin" field in the mutation.
|
|
|
-func (m *UsageStatisticHourMutation) ConsumeCoin() (r uint64, exists bool) {
|
|
|
+func (m *UsageStatisticHourMutation) ConsumeCoin() (r float64, exists bool) {
|
|
|
v := m.consume_coin
|
|
|
if v == nil {
|
|
|
return
|
|
@@ -40864,7 +40864,7 @@ func (m *UsageStatisticHourMutation) ConsumeCoin() (r uint64, exists bool) {
|
|
|
// OldConsumeCoin returns the old "consume_coin" field's value of the UsageStatisticHour entity.
|
|
|
// If the UsageStatisticHour object wasn't provided to the builder, the object is fetched from the database.
|
|
|
// An error is returned if the mutation operation is not UpdateOne, or the database query fails.
|
|
|
-func (m *UsageStatisticHourMutation) OldConsumeCoin(ctx context.Context) (v uint64, err error) {
|
|
|
+func (m *UsageStatisticHourMutation) OldConsumeCoin(ctx context.Context) (v float64, err error) {
|
|
|
if !m.op.Is(OpUpdateOne) {
|
|
|
return v, errors.New("OldConsumeCoin is only allowed on UpdateOne operations")
|
|
|
}
|
|
@@ -40878,17 +40878,17 @@ func (m *UsageStatisticHourMutation) OldConsumeCoin(ctx context.Context) (v uint
|
|
|
return oldValue.ConsumeCoin, nil
|
|
|
}
|
|
|
|
|
|
-// AddConsumeCoin adds u to the "consume_coin" field.
|
|
|
-func (m *UsageStatisticHourMutation) AddConsumeCoin(u int64) {
|
|
|
+// AddConsumeCoin adds f to the "consume_coin" field.
|
|
|
+func (m *UsageStatisticHourMutation) AddConsumeCoin(f float64) {
|
|
|
if m.addconsume_coin != nil {
|
|
|
- *m.addconsume_coin += u
|
|
|
+ *m.addconsume_coin += f
|
|
|
} else {
|
|
|
- m.addconsume_coin = &u
|
|
|
+ m.addconsume_coin = &f
|
|
|
}
|
|
|
}
|
|
|
|
|
|
// AddedConsumeCoin returns the value that was added to the "consume_coin" field in this mutation.
|
|
|
-func (m *UsageStatisticHourMutation) AddedConsumeCoin() (r int64, exists bool) {
|
|
|
+func (m *UsageStatisticHourMutation) AddedConsumeCoin() (r float64, exists bool) {
|
|
|
v := m.addconsume_coin
|
|
|
if v == nil {
|
|
|
return
|
|
@@ -41223,7 +41223,7 @@ func (m *UsageStatisticHourMutation) SetField(name string, value ent.Value) erro
|
|
|
m.SetLabelDist(v)
|
|
|
return nil
|
|
|
case usagestatistichour.FieldConsumeCoin:
|
|
|
- v, ok := value.(uint64)
|
|
|
+ v, ok := value.(float64)
|
|
|
if !ok {
|
|
|
return fmt.Errorf("unexpected type %T for field %s", value, name)
|
|
|
}
|
|
@@ -41404,7 +41404,7 @@ func (m *UsageStatisticHourMutation) AddField(name string, value ent.Value) erro
|
|
|
m.AddNewUser(v)
|
|
|
return nil
|
|
|
case usagestatistichour.FieldConsumeCoin:
|
|
|
- v, ok := value.(int64)
|
|
|
+ v, ok := value.(float64)
|
|
|
if !ok {
|
|
|
return fmt.Errorf("unexpected type %T for field %s", value, name)
|
|
|
}
|
|
@@ -41612,8 +41612,8 @@ type UsageStatisticMonthMutation struct {
|
|
|
addnew_user *int64
|
|
|
label_dist *[]custom_types.LabelDist
|
|
|
appendlabel_dist []custom_types.LabelDist
|
|
|
- consume_coin *uint64
|
|
|
- addconsume_coin *int64
|
|
|
+ consume_coin *float64
|
|
|
+ addconsume_coin *float64
|
|
|
clearedFields map[string]struct{}
|
|
|
done bool
|
|
|
oldValue func(context.Context) (*UsageStatisticMonth, error)
|
|
@@ -42646,13 +42646,13 @@ func (m *UsageStatisticMonthMutation) ResetLabelDist() {
|
|
|
}
|
|
|
|
|
|
// SetConsumeCoin sets the "consume_coin" field.
|
|
|
-func (m *UsageStatisticMonthMutation) SetConsumeCoin(u uint64) {
|
|
|
- m.consume_coin = &u
|
|
|
+func (m *UsageStatisticMonthMutation) SetConsumeCoin(f float64) {
|
|
|
+ m.consume_coin = &f
|
|
|
m.addconsume_coin = nil
|
|
|
}
|
|
|
|
|
|
// ConsumeCoin returns the value of the "consume_coin" field in the mutation.
|
|
|
-func (m *UsageStatisticMonthMutation) ConsumeCoin() (r uint64, exists bool) {
|
|
|
+func (m *UsageStatisticMonthMutation) ConsumeCoin() (r float64, exists bool) {
|
|
|
v := m.consume_coin
|
|
|
if v == nil {
|
|
|
return
|
|
@@ -42663,7 +42663,7 @@ func (m *UsageStatisticMonthMutation) ConsumeCoin() (r uint64, exists bool) {
|
|
|
// OldConsumeCoin returns the old "consume_coin" field's value of the UsageStatisticMonth entity.
|
|
|
// If the UsageStatisticMonth object wasn't provided to the builder, the object is fetched from the database.
|
|
|
// An error is returned if the mutation operation is not UpdateOne, or the database query fails.
|
|
|
-func (m *UsageStatisticMonthMutation) OldConsumeCoin(ctx context.Context) (v uint64, err error) {
|
|
|
+func (m *UsageStatisticMonthMutation) OldConsumeCoin(ctx context.Context) (v float64, err error) {
|
|
|
if !m.op.Is(OpUpdateOne) {
|
|
|
return v, errors.New("OldConsumeCoin is only allowed on UpdateOne operations")
|
|
|
}
|
|
@@ -42677,17 +42677,17 @@ func (m *UsageStatisticMonthMutation) OldConsumeCoin(ctx context.Context) (v uin
|
|
|
return oldValue.ConsumeCoin, nil
|
|
|
}
|
|
|
|
|
|
-// AddConsumeCoin adds u to the "consume_coin" field.
|
|
|
-func (m *UsageStatisticMonthMutation) AddConsumeCoin(u int64) {
|
|
|
+// AddConsumeCoin adds f to the "consume_coin" field.
|
|
|
+func (m *UsageStatisticMonthMutation) AddConsumeCoin(f float64) {
|
|
|
if m.addconsume_coin != nil {
|
|
|
- *m.addconsume_coin += u
|
|
|
+ *m.addconsume_coin += f
|
|
|
} else {
|
|
|
- m.addconsume_coin = &u
|
|
|
+ m.addconsume_coin = &f
|
|
|
}
|
|
|
}
|
|
|
|
|
|
// AddedConsumeCoin returns the value that was added to the "consume_coin" field in this mutation.
|
|
|
-func (m *UsageStatisticMonthMutation) AddedConsumeCoin() (r int64, exists bool) {
|
|
|
+func (m *UsageStatisticMonthMutation) AddedConsumeCoin() (r float64, exists bool) {
|
|
|
v := m.addconsume_coin
|
|
|
if v == nil {
|
|
|
return
|
|
@@ -43022,7 +43022,7 @@ func (m *UsageStatisticMonthMutation) SetField(name string, value ent.Value) err
|
|
|
m.SetLabelDist(v)
|
|
|
return nil
|
|
|
case usagestatisticmonth.FieldConsumeCoin:
|
|
|
- v, ok := value.(uint64)
|
|
|
+ v, ok := value.(float64)
|
|
|
if !ok {
|
|
|
return fmt.Errorf("unexpected type %T for field %s", value, name)
|
|
|
}
|
|
@@ -43203,7 +43203,7 @@ func (m *UsageStatisticMonthMutation) AddField(name string, value ent.Value) err
|
|
|
m.AddNewUser(v)
|
|
|
return nil
|
|
|
case usagestatisticmonth.FieldConsumeCoin:
|
|
|
- v, ok := value.(int64)
|
|
|
+ v, ok := value.(float64)
|
|
|
if !ok {
|
|
|
return fmt.Errorf("unexpected type %T for field %s", value, name)
|
|
|
}
|