|
@@ -272,6 +272,12 @@ func (wu *WhatsappUpdate) AppendAllowList(s []string) *WhatsappUpdate {
|
|
return wu
|
|
return wu
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+// ClearAllowList clears the value of the "allow_list" field.
|
|
|
|
+func (wu *WhatsappUpdate) ClearAllowList() *WhatsappUpdate {
|
|
|
|
+ wu.mutation.ClearAllowList()
|
|
|
|
+ return wu
|
|
|
|
+}
|
|
|
|
+
|
|
// SetGroupAllowList sets the "group_allow_list" field.
|
|
// SetGroupAllowList sets the "group_allow_list" field.
|
|
func (wu *WhatsappUpdate) SetGroupAllowList(s []string) *WhatsappUpdate {
|
|
func (wu *WhatsappUpdate) SetGroupAllowList(s []string) *WhatsappUpdate {
|
|
wu.mutation.SetGroupAllowList(s)
|
|
wu.mutation.SetGroupAllowList(s)
|
|
@@ -284,6 +290,12 @@ func (wu *WhatsappUpdate) AppendGroupAllowList(s []string) *WhatsappUpdate {
|
|
return wu
|
|
return wu
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+// ClearGroupAllowList clears the value of the "group_allow_list" field.
|
|
|
|
+func (wu *WhatsappUpdate) ClearGroupAllowList() *WhatsappUpdate {
|
|
|
|
+ wu.mutation.ClearGroupAllowList()
|
|
|
|
+ return wu
|
|
|
|
+}
|
|
|
|
+
|
|
// SetBlockList sets the "block_list" field.
|
|
// SetBlockList sets the "block_list" field.
|
|
func (wu *WhatsappUpdate) SetBlockList(s []string) *WhatsappUpdate {
|
|
func (wu *WhatsappUpdate) SetBlockList(s []string) *WhatsappUpdate {
|
|
wu.mutation.SetBlockList(s)
|
|
wu.mutation.SetBlockList(s)
|
|
@@ -296,6 +308,12 @@ func (wu *WhatsappUpdate) AppendBlockList(s []string) *WhatsappUpdate {
|
|
return wu
|
|
return wu
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+// ClearBlockList clears the value of the "block_list" field.
|
|
|
|
+func (wu *WhatsappUpdate) ClearBlockList() *WhatsappUpdate {
|
|
|
|
+ wu.mutation.ClearBlockList()
|
|
|
|
+ return wu
|
|
|
|
+}
|
|
|
|
+
|
|
// SetGroupBlockList sets the "group_block_list" field.
|
|
// SetGroupBlockList sets the "group_block_list" field.
|
|
func (wu *WhatsappUpdate) SetGroupBlockList(s []string) *WhatsappUpdate {
|
|
func (wu *WhatsappUpdate) SetGroupBlockList(s []string) *WhatsappUpdate {
|
|
wu.mutation.SetGroupBlockList(s)
|
|
wu.mutation.SetGroupBlockList(s)
|
|
@@ -308,6 +326,12 @@ func (wu *WhatsappUpdate) AppendGroupBlockList(s []string) *WhatsappUpdate {
|
|
return wu
|
|
return wu
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+// ClearGroupBlockList clears the value of the "group_block_list" field.
|
|
|
|
+func (wu *WhatsappUpdate) ClearGroupBlockList() *WhatsappUpdate {
|
|
|
|
+ wu.mutation.ClearGroupBlockList()
|
|
|
|
+ return wu
|
|
|
|
+}
|
|
|
|
+
|
|
// Mutation returns the WhatsappMutation object of the builder.
|
|
// Mutation returns the WhatsappMutation object of the builder.
|
|
func (wu *WhatsappUpdate) Mutation() *WhatsappMutation {
|
|
func (wu *WhatsappUpdate) Mutation() *WhatsappMutation {
|
|
return wu.mutation
|
|
return wu.mutation
|
|
@@ -438,6 +462,9 @@ func (wu *WhatsappUpdate) sqlSave(ctx context.Context) (n int, err error) {
|
|
sqljson.Append(u, whatsapp.FieldAllowList, value)
|
|
sqljson.Append(u, whatsapp.FieldAllowList, value)
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
+ if wu.mutation.AllowListCleared() {
|
|
|
|
+ _spec.ClearField(whatsapp.FieldAllowList, field.TypeJSON)
|
|
|
|
+ }
|
|
if value, ok := wu.mutation.GroupAllowList(); ok {
|
|
if value, ok := wu.mutation.GroupAllowList(); ok {
|
|
_spec.SetField(whatsapp.FieldGroupAllowList, field.TypeJSON, value)
|
|
_spec.SetField(whatsapp.FieldGroupAllowList, field.TypeJSON, value)
|
|
}
|
|
}
|
|
@@ -446,6 +473,9 @@ func (wu *WhatsappUpdate) sqlSave(ctx context.Context) (n int, err error) {
|
|
sqljson.Append(u, whatsapp.FieldGroupAllowList, value)
|
|
sqljson.Append(u, whatsapp.FieldGroupAllowList, value)
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
+ if wu.mutation.GroupAllowListCleared() {
|
|
|
|
+ _spec.ClearField(whatsapp.FieldGroupAllowList, field.TypeJSON)
|
|
|
|
+ }
|
|
if value, ok := wu.mutation.BlockList(); ok {
|
|
if value, ok := wu.mutation.BlockList(); ok {
|
|
_spec.SetField(whatsapp.FieldBlockList, field.TypeJSON, value)
|
|
_spec.SetField(whatsapp.FieldBlockList, field.TypeJSON, value)
|
|
}
|
|
}
|
|
@@ -454,6 +484,9 @@ func (wu *WhatsappUpdate) sqlSave(ctx context.Context) (n int, err error) {
|
|
sqljson.Append(u, whatsapp.FieldBlockList, value)
|
|
sqljson.Append(u, whatsapp.FieldBlockList, value)
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
+ if wu.mutation.BlockListCleared() {
|
|
|
|
+ _spec.ClearField(whatsapp.FieldBlockList, field.TypeJSON)
|
|
|
|
+ }
|
|
if value, ok := wu.mutation.GroupBlockList(); ok {
|
|
if value, ok := wu.mutation.GroupBlockList(); ok {
|
|
_spec.SetField(whatsapp.FieldGroupBlockList, field.TypeJSON, value)
|
|
_spec.SetField(whatsapp.FieldGroupBlockList, field.TypeJSON, value)
|
|
}
|
|
}
|
|
@@ -462,6 +495,9 @@ func (wu *WhatsappUpdate) sqlSave(ctx context.Context) (n int, err error) {
|
|
sqljson.Append(u, whatsapp.FieldGroupBlockList, value)
|
|
sqljson.Append(u, whatsapp.FieldGroupBlockList, value)
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
+ if wu.mutation.GroupBlockListCleared() {
|
|
|
|
+ _spec.ClearField(whatsapp.FieldGroupBlockList, field.TypeJSON)
|
|
|
|
+ }
|
|
if n, err = sqlgraph.UpdateNodes(ctx, wu.driver, _spec); err != nil {
|
|
if n, err = sqlgraph.UpdateNodes(ctx, wu.driver, _spec); err != nil {
|
|
if _, ok := err.(*sqlgraph.NotFoundError); ok {
|
|
if _, ok := err.(*sqlgraph.NotFoundError); ok {
|
|
err = &NotFoundError{whatsapp.Label}
|
|
err = &NotFoundError{whatsapp.Label}
|
|
@@ -725,6 +761,12 @@ func (wuo *WhatsappUpdateOne) AppendAllowList(s []string) *WhatsappUpdateOne {
|
|
return wuo
|
|
return wuo
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+// ClearAllowList clears the value of the "allow_list" field.
|
|
|
|
+func (wuo *WhatsappUpdateOne) ClearAllowList() *WhatsappUpdateOne {
|
|
|
|
+ wuo.mutation.ClearAllowList()
|
|
|
|
+ return wuo
|
|
|
|
+}
|
|
|
|
+
|
|
// SetGroupAllowList sets the "group_allow_list" field.
|
|
// SetGroupAllowList sets the "group_allow_list" field.
|
|
func (wuo *WhatsappUpdateOne) SetGroupAllowList(s []string) *WhatsappUpdateOne {
|
|
func (wuo *WhatsappUpdateOne) SetGroupAllowList(s []string) *WhatsappUpdateOne {
|
|
wuo.mutation.SetGroupAllowList(s)
|
|
wuo.mutation.SetGroupAllowList(s)
|
|
@@ -737,6 +779,12 @@ func (wuo *WhatsappUpdateOne) AppendGroupAllowList(s []string) *WhatsappUpdateOn
|
|
return wuo
|
|
return wuo
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+// ClearGroupAllowList clears the value of the "group_allow_list" field.
|
|
|
|
+func (wuo *WhatsappUpdateOne) ClearGroupAllowList() *WhatsappUpdateOne {
|
|
|
|
+ wuo.mutation.ClearGroupAllowList()
|
|
|
|
+ return wuo
|
|
|
|
+}
|
|
|
|
+
|
|
// SetBlockList sets the "block_list" field.
|
|
// SetBlockList sets the "block_list" field.
|
|
func (wuo *WhatsappUpdateOne) SetBlockList(s []string) *WhatsappUpdateOne {
|
|
func (wuo *WhatsappUpdateOne) SetBlockList(s []string) *WhatsappUpdateOne {
|
|
wuo.mutation.SetBlockList(s)
|
|
wuo.mutation.SetBlockList(s)
|
|
@@ -749,6 +797,12 @@ func (wuo *WhatsappUpdateOne) AppendBlockList(s []string) *WhatsappUpdateOne {
|
|
return wuo
|
|
return wuo
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+// ClearBlockList clears the value of the "block_list" field.
|
|
|
|
+func (wuo *WhatsappUpdateOne) ClearBlockList() *WhatsappUpdateOne {
|
|
|
|
+ wuo.mutation.ClearBlockList()
|
|
|
|
+ return wuo
|
|
|
|
+}
|
|
|
|
+
|
|
// SetGroupBlockList sets the "group_block_list" field.
|
|
// SetGroupBlockList sets the "group_block_list" field.
|
|
func (wuo *WhatsappUpdateOne) SetGroupBlockList(s []string) *WhatsappUpdateOne {
|
|
func (wuo *WhatsappUpdateOne) SetGroupBlockList(s []string) *WhatsappUpdateOne {
|
|
wuo.mutation.SetGroupBlockList(s)
|
|
wuo.mutation.SetGroupBlockList(s)
|
|
@@ -761,6 +815,12 @@ func (wuo *WhatsappUpdateOne) AppendGroupBlockList(s []string) *WhatsappUpdateOn
|
|
return wuo
|
|
return wuo
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+// ClearGroupBlockList clears the value of the "group_block_list" field.
|
|
|
|
+func (wuo *WhatsappUpdateOne) ClearGroupBlockList() *WhatsappUpdateOne {
|
|
|
|
+ wuo.mutation.ClearGroupBlockList()
|
|
|
|
+ return wuo
|
|
|
|
+}
|
|
|
|
+
|
|
// Mutation returns the WhatsappMutation object of the builder.
|
|
// Mutation returns the WhatsappMutation object of the builder.
|
|
func (wuo *WhatsappUpdateOne) Mutation() *WhatsappMutation {
|
|
func (wuo *WhatsappUpdateOne) Mutation() *WhatsappMutation {
|
|
return wuo.mutation
|
|
return wuo.mutation
|
|
@@ -921,6 +981,9 @@ func (wuo *WhatsappUpdateOne) sqlSave(ctx context.Context) (_node *Whatsapp, err
|
|
sqljson.Append(u, whatsapp.FieldAllowList, value)
|
|
sqljson.Append(u, whatsapp.FieldAllowList, value)
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
+ if wuo.mutation.AllowListCleared() {
|
|
|
|
+ _spec.ClearField(whatsapp.FieldAllowList, field.TypeJSON)
|
|
|
|
+ }
|
|
if value, ok := wuo.mutation.GroupAllowList(); ok {
|
|
if value, ok := wuo.mutation.GroupAllowList(); ok {
|
|
_spec.SetField(whatsapp.FieldGroupAllowList, field.TypeJSON, value)
|
|
_spec.SetField(whatsapp.FieldGroupAllowList, field.TypeJSON, value)
|
|
}
|
|
}
|
|
@@ -929,6 +992,9 @@ func (wuo *WhatsappUpdateOne) sqlSave(ctx context.Context) (_node *Whatsapp, err
|
|
sqljson.Append(u, whatsapp.FieldGroupAllowList, value)
|
|
sqljson.Append(u, whatsapp.FieldGroupAllowList, value)
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
+ if wuo.mutation.GroupAllowListCleared() {
|
|
|
|
+ _spec.ClearField(whatsapp.FieldGroupAllowList, field.TypeJSON)
|
|
|
|
+ }
|
|
if value, ok := wuo.mutation.BlockList(); ok {
|
|
if value, ok := wuo.mutation.BlockList(); ok {
|
|
_spec.SetField(whatsapp.FieldBlockList, field.TypeJSON, value)
|
|
_spec.SetField(whatsapp.FieldBlockList, field.TypeJSON, value)
|
|
}
|
|
}
|
|
@@ -937,6 +1003,9 @@ func (wuo *WhatsappUpdateOne) sqlSave(ctx context.Context) (_node *Whatsapp, err
|
|
sqljson.Append(u, whatsapp.FieldBlockList, value)
|
|
sqljson.Append(u, whatsapp.FieldBlockList, value)
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
+ if wuo.mutation.BlockListCleared() {
|
|
|
|
+ _spec.ClearField(whatsapp.FieldBlockList, field.TypeJSON)
|
|
|
|
+ }
|
|
if value, ok := wuo.mutation.GroupBlockList(); ok {
|
|
if value, ok := wuo.mutation.GroupBlockList(); ok {
|
|
_spec.SetField(whatsapp.FieldGroupBlockList, field.TypeJSON, value)
|
|
_spec.SetField(whatsapp.FieldGroupBlockList, field.TypeJSON, value)
|
|
}
|
|
}
|
|
@@ -945,6 +1014,9 @@ func (wuo *WhatsappUpdateOne) sqlSave(ctx context.Context) (_node *Whatsapp, err
|
|
sqljson.Append(u, whatsapp.FieldGroupBlockList, value)
|
|
sqljson.Append(u, whatsapp.FieldGroupBlockList, value)
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
+ if wuo.mutation.GroupBlockListCleared() {
|
|
|
|
+ _spec.ClearField(whatsapp.FieldGroupBlockList, field.TypeJSON)
|
|
|
|
+ }
|
|
_node = &Whatsapp{config: wuo.config}
|
|
_node = &Whatsapp{config: wuo.config}
|
|
_spec.Assign = _node.assignValues
|
|
_spec.Assign = _node.assignValues
|
|
_spec.ScanValues = _node.scanValues
|
|
_spec.ScanValues = _node.scanValues
|