fix
This commit is contained in:
@ -190,6 +190,33 @@ func (su *SevUpdate) ClearCid() *SevUpdate {
|
||||
return su
|
||||
}
|
||||
|
||||
// SetCp sets the "cp" field.
|
||||
func (su *SevUpdate) SetCp(i int) *SevUpdate {
|
||||
su.mutation.ResetCp()
|
||||
su.mutation.SetCp(i)
|
||||
return su
|
||||
}
|
||||
|
||||
// SetNillableCp sets the "cp" field if the given value is not nil.
|
||||
func (su *SevUpdate) SetNillableCp(i *int) *SevUpdate {
|
||||
if i != nil {
|
||||
su.SetCp(*i)
|
||||
}
|
||||
return su
|
||||
}
|
||||
|
||||
// AddCp adds i to the "cp" field.
|
||||
func (su *SevUpdate) AddCp(i int) *SevUpdate {
|
||||
su.mutation.AddCp(i)
|
||||
return su
|
||||
}
|
||||
|
||||
// ClearCp clears the value of the "cp" field.
|
||||
func (su *SevUpdate) ClearCp() *SevUpdate {
|
||||
su.mutation.ClearCp()
|
||||
return su
|
||||
}
|
||||
|
||||
// SetCard sets the "card" field.
|
||||
func (su *SevUpdate) SetCard(i int) *SevUpdate {
|
||||
su.mutation.ResetCard()
|
||||
@ -357,6 +384,15 @@ func (su *SevUpdate) sqlSave(ctx context.Context) (n int, err error) {
|
||||
if su.mutation.CidCleared() {
|
||||
_spec.ClearField(sev.FieldCid, field.TypeInt)
|
||||
}
|
||||
if value, ok := su.mutation.Cp(); ok {
|
||||
_spec.SetField(sev.FieldCp, field.TypeInt, value)
|
||||
}
|
||||
if value, ok := su.mutation.AddedCp(); ok {
|
||||
_spec.AddField(sev.FieldCp, field.TypeInt, value)
|
||||
}
|
||||
if su.mutation.CpCleared() {
|
||||
_spec.ClearField(sev.FieldCp, field.TypeInt)
|
||||
}
|
||||
if value, ok := su.mutation.Card(); ok {
|
||||
_spec.SetField(sev.FieldCard, field.TypeInt, value)
|
||||
}
|
||||
@ -585,6 +621,33 @@ func (suo *SevUpdateOne) ClearCid() *SevUpdateOne {
|
||||
return suo
|
||||
}
|
||||
|
||||
// SetCp sets the "cp" field.
|
||||
func (suo *SevUpdateOne) SetCp(i int) *SevUpdateOne {
|
||||
suo.mutation.ResetCp()
|
||||
suo.mutation.SetCp(i)
|
||||
return suo
|
||||
}
|
||||
|
||||
// SetNillableCp sets the "cp" field if the given value is not nil.
|
||||
func (suo *SevUpdateOne) SetNillableCp(i *int) *SevUpdateOne {
|
||||
if i != nil {
|
||||
suo.SetCp(*i)
|
||||
}
|
||||
return suo
|
||||
}
|
||||
|
||||
// AddCp adds i to the "cp" field.
|
||||
func (suo *SevUpdateOne) AddCp(i int) *SevUpdateOne {
|
||||
suo.mutation.AddCp(i)
|
||||
return suo
|
||||
}
|
||||
|
||||
// ClearCp clears the value of the "cp" field.
|
||||
func (suo *SevUpdateOne) ClearCp() *SevUpdateOne {
|
||||
suo.mutation.ClearCp()
|
||||
return suo
|
||||
}
|
||||
|
||||
// SetCard sets the "card" field.
|
||||
func (suo *SevUpdateOne) SetCard(i int) *SevUpdateOne {
|
||||
suo.mutation.ResetCard()
|
||||
@ -782,6 +845,15 @@ func (suo *SevUpdateOne) sqlSave(ctx context.Context) (_node *Sev, err error) {
|
||||
if suo.mutation.CidCleared() {
|
||||
_spec.ClearField(sev.FieldCid, field.TypeInt)
|
||||
}
|
||||
if value, ok := suo.mutation.Cp(); ok {
|
||||
_spec.SetField(sev.FieldCp, field.TypeInt, value)
|
||||
}
|
||||
if value, ok := suo.mutation.AddedCp(); ok {
|
||||
_spec.AddField(sev.FieldCp, field.TypeInt, value)
|
||||
}
|
||||
if suo.mutation.CpCleared() {
|
||||
_spec.ClearField(sev.FieldCp, field.TypeInt)
|
||||
}
|
||||
if value, ok := suo.mutation.Card(); ok {
|
||||
_spec.SetField(sev.FieldCard, field.TypeInt, value)
|
||||
}
|
||||
|
Reference in New Issue
Block a user