|
@@ -43662,6 +43662,8 @@ type WxMutation struct {
|
|
appendblock_list []string
|
|
appendblock_list []string
|
|
group_block_list *[]string
|
|
group_block_list *[]string
|
|
appendgroup_block_list []string
|
|
appendgroup_block_list []string
|
|
|
|
+ ctype *uint64
|
|
|
|
+ addctype *int64
|
|
clearedFields map[string]struct{}
|
|
clearedFields map[string]struct{}
|
|
server *uint64
|
|
server *uint64
|
|
clearedserver bool
|
|
clearedserver bool
|
|
@@ -44712,6 +44714,76 @@ func (m *WxMutation) ResetGroupBlockList() {
|
|
m.appendgroup_block_list = nil
|
|
m.appendgroup_block_list = nil
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+// SetCtype sets the "ctype" field.
|
|
|
|
+func (m *WxMutation) SetCtype(u uint64) {
|
|
|
|
+ m.ctype = &u
|
|
|
|
+ m.addctype = nil
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+// Ctype returns the value of the "ctype" field in the mutation.
|
|
|
|
+func (m *WxMutation) Ctype() (r uint64, exists bool) {
|
|
|
|
+ v := m.ctype
|
|
|
|
+ if v == nil {
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ return *v, true
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+// OldCtype returns the old "ctype" field's value of the Wx entity.
|
|
|
|
+// If the Wx 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 *WxMutation) OldCtype(ctx context.Context) (v uint64, err error) {
|
|
|
|
+ if !m.op.Is(OpUpdateOne) {
|
|
|
|
+ return v, errors.New("OldCtype is only allowed on UpdateOne operations")
|
|
|
|
+ }
|
|
|
|
+ if m.id == nil || m.oldValue == nil {
|
|
|
|
+ return v, errors.New("OldCtype requires an ID field in the mutation")
|
|
|
|
+ }
|
|
|
|
+ oldValue, err := m.oldValue(ctx)
|
|
|
|
+ if err != nil {
|
|
|
|
+ return v, fmt.Errorf("querying old value for OldCtype: %w", err)
|
|
|
|
+ }
|
|
|
|
+ return oldValue.Ctype, nil
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+// AddCtype adds u to the "ctype" field.
|
|
|
|
+func (m *WxMutation) AddCtype(u int64) {
|
|
|
|
+ if m.addctype != nil {
|
|
|
|
+ *m.addctype += u
|
|
|
|
+ } else {
|
|
|
|
+ m.addctype = &u
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+// AddedCtype returns the value that was added to the "ctype" field in this mutation.
|
|
|
|
+func (m *WxMutation) AddedCtype() (r int64, exists bool) {
|
|
|
|
+ v := m.addctype
|
|
|
|
+ if v == nil {
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ return *v, true
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+// ClearCtype clears the value of the "ctype" field.
|
|
|
|
+func (m *WxMutation) ClearCtype() {
|
|
|
|
+ m.ctype = nil
|
|
|
|
+ m.addctype = nil
|
|
|
|
+ m.clearedFields[wx.FieldCtype] = struct{}{}
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+// CtypeCleared returns if the "ctype" field was cleared in this mutation.
|
|
|
|
+func (m *WxMutation) CtypeCleared() bool {
|
|
|
|
+ _, ok := m.clearedFields[wx.FieldCtype]
|
|
|
|
+ return ok
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+// ResetCtype resets all changes to the "ctype" field.
|
|
|
|
+func (m *WxMutation) ResetCtype() {
|
|
|
|
+ m.ctype = nil
|
|
|
|
+ m.addctype = nil
|
|
|
|
+ delete(m.clearedFields, wx.FieldCtype)
|
|
|
|
+}
|
|
|
|
+
|
|
// ClearServer clears the "server" edge to the Server entity.
|
|
// ClearServer clears the "server" edge to the Server entity.
|
|
func (m *WxMutation) ClearServer() {
|
|
func (m *WxMutation) ClearServer() {
|
|
m.clearedserver = true
|
|
m.clearedserver = true
|
|
@@ -44800,7 +44872,7 @@ func (m *WxMutation) Type() string {
|
|
// order to get all numeric fields that were incremented/decremented, call
|
|
// order to get all numeric fields that were incremented/decremented, call
|
|
// AddedFields().
|
|
// AddedFields().
|
|
func (m *WxMutation) Fields() []string {
|
|
func (m *WxMutation) Fields() []string {
|
|
- fields := make([]string, 0, 21)
|
|
|
|
|
|
+ fields := make([]string, 0, 22)
|
|
if m.created_at != nil {
|
|
if m.created_at != nil {
|
|
fields = append(fields, wx.FieldCreatedAt)
|
|
fields = append(fields, wx.FieldCreatedAt)
|
|
}
|
|
}
|
|
@@ -44864,6 +44936,9 @@ func (m *WxMutation) Fields() []string {
|
|
if m.group_block_list != nil {
|
|
if m.group_block_list != nil {
|
|
fields = append(fields, wx.FieldGroupBlockList)
|
|
fields = append(fields, wx.FieldGroupBlockList)
|
|
}
|
|
}
|
|
|
|
+ if m.ctype != nil {
|
|
|
|
+ fields = append(fields, wx.FieldCtype)
|
|
|
|
+ }
|
|
return fields
|
|
return fields
|
|
}
|
|
}
|
|
|
|
|
|
@@ -44914,6 +44989,8 @@ func (m *WxMutation) Field(name string) (ent.Value, bool) {
|
|
return m.BlockList()
|
|
return m.BlockList()
|
|
case wx.FieldGroupBlockList:
|
|
case wx.FieldGroupBlockList:
|
|
return m.GroupBlockList()
|
|
return m.GroupBlockList()
|
|
|
|
+ case wx.FieldCtype:
|
|
|
|
+ return m.Ctype()
|
|
}
|
|
}
|
|
return nil, false
|
|
return nil, false
|
|
}
|
|
}
|
|
@@ -44965,6 +45042,8 @@ func (m *WxMutation) OldField(ctx context.Context, name string) (ent.Value, erro
|
|
return m.OldBlockList(ctx)
|
|
return m.OldBlockList(ctx)
|
|
case wx.FieldGroupBlockList:
|
|
case wx.FieldGroupBlockList:
|
|
return m.OldGroupBlockList(ctx)
|
|
return m.OldGroupBlockList(ctx)
|
|
|
|
+ case wx.FieldCtype:
|
|
|
|
+ return m.OldCtype(ctx)
|
|
}
|
|
}
|
|
return nil, fmt.Errorf("unknown Wx field %s", name)
|
|
return nil, fmt.Errorf("unknown Wx field %s", name)
|
|
}
|
|
}
|
|
@@ -45121,6 +45200,13 @@ func (m *WxMutation) SetField(name string, value ent.Value) error {
|
|
}
|
|
}
|
|
m.SetGroupBlockList(v)
|
|
m.SetGroupBlockList(v)
|
|
return nil
|
|
return nil
|
|
|
|
+ case wx.FieldCtype:
|
|
|
|
+ v, ok := value.(uint64)
|
|
|
|
+ if !ok {
|
|
|
|
+ return fmt.Errorf("unexpected type %T for field %s", value, name)
|
|
|
|
+ }
|
|
|
|
+ m.SetCtype(v)
|
|
|
|
+ return nil
|
|
}
|
|
}
|
|
return fmt.Errorf("unknown Wx field %s", name)
|
|
return fmt.Errorf("unknown Wx field %s", name)
|
|
}
|
|
}
|
|
@@ -45135,6 +45221,9 @@ func (m *WxMutation) AddedFields() []string {
|
|
if m.addorganization_id != nil {
|
|
if m.addorganization_id != nil {
|
|
fields = append(fields, wx.FieldOrganizationID)
|
|
fields = append(fields, wx.FieldOrganizationID)
|
|
}
|
|
}
|
|
|
|
+ if m.addctype != nil {
|
|
|
|
+ fields = append(fields, wx.FieldCtype)
|
|
|
|
+ }
|
|
return fields
|
|
return fields
|
|
}
|
|
}
|
|
|
|
|
|
@@ -45147,6 +45236,8 @@ func (m *WxMutation) AddedField(name string) (ent.Value, bool) {
|
|
return m.AddedStatus()
|
|
return m.AddedStatus()
|
|
case wx.FieldOrganizationID:
|
|
case wx.FieldOrganizationID:
|
|
return m.AddedOrganizationID()
|
|
return m.AddedOrganizationID()
|
|
|
|
+ case wx.FieldCtype:
|
|
|
|
+ return m.AddedCtype()
|
|
}
|
|
}
|
|
return nil, false
|
|
return nil, false
|
|
}
|
|
}
|
|
@@ -45170,6 +45261,13 @@ func (m *WxMutation) AddField(name string, value ent.Value) error {
|
|
}
|
|
}
|
|
m.AddOrganizationID(v)
|
|
m.AddOrganizationID(v)
|
|
return nil
|
|
return nil
|
|
|
|
+ case wx.FieldCtype:
|
|
|
|
+ v, ok := value.(int64)
|
|
|
|
+ if !ok {
|
|
|
|
+ return fmt.Errorf("unexpected type %T for field %s", value, name)
|
|
|
|
+ }
|
|
|
|
+ m.AddCtype(v)
|
|
|
|
+ return nil
|
|
}
|
|
}
|
|
return fmt.Errorf("unknown Wx numeric field %s", name)
|
|
return fmt.Errorf("unknown Wx numeric field %s", name)
|
|
}
|
|
}
|
|
@@ -45196,6 +45294,9 @@ func (m *WxMutation) ClearedFields() []string {
|
|
if m.FieldCleared(wx.FieldAPIKey) {
|
|
if m.FieldCleared(wx.FieldAPIKey) {
|
|
fields = append(fields, wx.FieldAPIKey)
|
|
fields = append(fields, wx.FieldAPIKey)
|
|
}
|
|
}
|
|
|
|
+ if m.FieldCleared(wx.FieldCtype) {
|
|
|
|
+ fields = append(fields, wx.FieldCtype)
|
|
|
|
+ }
|
|
return fields
|
|
return fields
|
|
}
|
|
}
|
|
|
|
|
|
@@ -45228,6 +45329,9 @@ func (m *WxMutation) ClearField(name string) error {
|
|
case wx.FieldAPIKey:
|
|
case wx.FieldAPIKey:
|
|
m.ClearAPIKey()
|
|
m.ClearAPIKey()
|
|
return nil
|
|
return nil
|
|
|
|
+ case wx.FieldCtype:
|
|
|
|
+ m.ClearCtype()
|
|
|
|
+ return nil
|
|
}
|
|
}
|
|
return fmt.Errorf("unknown Wx nullable field %s", name)
|
|
return fmt.Errorf("unknown Wx nullable field %s", name)
|
|
}
|
|
}
|
|
@@ -45299,6 +45403,9 @@ func (m *WxMutation) ResetField(name string) error {
|
|
case wx.FieldGroupBlockList:
|
|
case wx.FieldGroupBlockList:
|
|
m.ResetGroupBlockList()
|
|
m.ResetGroupBlockList()
|
|
return nil
|
|
return nil
|
|
|
|
+ case wx.FieldCtype:
|
|
|
|
+ m.ResetCtype()
|
|
|
|
+ return nil
|
|
}
|
|
}
|
|
return fmt.Errorf("unknown Wx field %s", name)
|
|
return fmt.Errorf("unknown Wx field %s", name)
|
|
}
|
|
}
|