|
@@ -50047,8 +50047,6 @@ type XunjiMutation struct {
|
|
|
app_secret *string
|
|
|
token *string
|
|
|
encoding_key *string
|
|
|
- agent_id *uint64
|
|
|
- addagent_id *int64
|
|
|
organization_id *uint64
|
|
|
addorganization_id *int64
|
|
|
clearedFields map[string]struct{}
|
|
@@ -50496,62 +50494,6 @@ func (m *XunjiMutation) ResetEncodingKey() {
|
|
|
m.encoding_key = nil
|
|
|
}
|
|
|
|
|
|
-// SetAgentID sets the "agent_id" field.
|
|
|
-func (m *XunjiMutation) SetAgentID(u uint64) {
|
|
|
- m.agent_id = &u
|
|
|
- m.addagent_id = nil
|
|
|
-}
|
|
|
-
|
|
|
-// AgentID returns the value of the "agent_id" field in the mutation.
|
|
|
-func (m *XunjiMutation) AgentID() (r uint64, exists bool) {
|
|
|
- v := m.agent_id
|
|
|
- if v == nil {
|
|
|
- return
|
|
|
- }
|
|
|
- return *v, true
|
|
|
-}
|
|
|
-
|
|
|
-// OldAgentID returns the old "agent_id" field's value of the Xunji entity.
|
|
|
-// If the Xunji 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 *XunjiMutation) OldAgentID(ctx context.Context) (v uint64, err error) {
|
|
|
- if !m.op.Is(OpUpdateOne) {
|
|
|
- return v, errors.New("OldAgentID is only allowed on UpdateOne operations")
|
|
|
- }
|
|
|
- if m.id == nil || m.oldValue == nil {
|
|
|
- return v, errors.New("OldAgentID requires an ID field in the mutation")
|
|
|
- }
|
|
|
- oldValue, err := m.oldValue(ctx)
|
|
|
- if err != nil {
|
|
|
- return v, fmt.Errorf("querying old value for OldAgentID: %w", err)
|
|
|
- }
|
|
|
- return oldValue.AgentID, nil
|
|
|
-}
|
|
|
-
|
|
|
-// AddAgentID adds u to the "agent_id" field.
|
|
|
-func (m *XunjiMutation) AddAgentID(u int64) {
|
|
|
- if m.addagent_id != nil {
|
|
|
- *m.addagent_id += u
|
|
|
- } else {
|
|
|
- m.addagent_id = &u
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-// AddedAgentID returns the value that was added to the "agent_id" field in this mutation.
|
|
|
-func (m *XunjiMutation) AddedAgentID() (r int64, exists bool) {
|
|
|
- v := m.addagent_id
|
|
|
- if v == nil {
|
|
|
- return
|
|
|
- }
|
|
|
- return *v, true
|
|
|
-}
|
|
|
-
|
|
|
-// ResetAgentID resets all changes to the "agent_id" field.
|
|
|
-func (m *XunjiMutation) ResetAgentID() {
|
|
|
- m.agent_id = nil
|
|
|
- m.addagent_id = nil
|
|
|
-}
|
|
|
-
|
|
|
// SetOrganizationID sets the "organization_id" field.
|
|
|
func (m *XunjiMutation) SetOrganizationID(u uint64) {
|
|
|
m.organization_id = &u
|
|
@@ -50642,7 +50584,7 @@ func (m *XunjiMutation) Type() string {
|
|
|
// order to get all numeric fields that were incremented/decremented, call
|
|
|
// AddedFields().
|
|
|
func (m *XunjiMutation) Fields() []string {
|
|
|
- fields := make([]string, 0, 10)
|
|
|
+ fields := make([]string, 0, 9)
|
|
|
if m.created_at != nil {
|
|
|
fields = append(fields, xunji.FieldCreatedAt)
|
|
|
}
|
|
@@ -50667,9 +50609,6 @@ func (m *XunjiMutation) Fields() []string {
|
|
|
if m.encoding_key != nil {
|
|
|
fields = append(fields, xunji.FieldEncodingKey)
|
|
|
}
|
|
|
- if m.agent_id != nil {
|
|
|
- fields = append(fields, xunji.FieldAgentID)
|
|
|
- }
|
|
|
if m.organization_id != nil {
|
|
|
fields = append(fields, xunji.FieldOrganizationID)
|
|
|
}
|
|
@@ -50697,8 +50636,6 @@ func (m *XunjiMutation) Field(name string) (ent.Value, bool) {
|
|
|
return m.Token()
|
|
|
case xunji.FieldEncodingKey:
|
|
|
return m.EncodingKey()
|
|
|
- case xunji.FieldAgentID:
|
|
|
- return m.AgentID()
|
|
|
case xunji.FieldOrganizationID:
|
|
|
return m.OrganizationID()
|
|
|
}
|
|
@@ -50726,8 +50663,6 @@ func (m *XunjiMutation) OldField(ctx context.Context, name string) (ent.Value, e
|
|
|
return m.OldToken(ctx)
|
|
|
case xunji.FieldEncodingKey:
|
|
|
return m.OldEncodingKey(ctx)
|
|
|
- case xunji.FieldAgentID:
|
|
|
- return m.OldAgentID(ctx)
|
|
|
case xunji.FieldOrganizationID:
|
|
|
return m.OldOrganizationID(ctx)
|
|
|
}
|
|
@@ -50795,13 +50730,6 @@ func (m *XunjiMutation) SetField(name string, value ent.Value) error {
|
|
|
}
|
|
|
m.SetEncodingKey(v)
|
|
|
return nil
|
|
|
- case xunji.FieldAgentID:
|
|
|
- v, ok := value.(uint64)
|
|
|
- if !ok {
|
|
|
- return fmt.Errorf("unexpected type %T for field %s", value, name)
|
|
|
- }
|
|
|
- m.SetAgentID(v)
|
|
|
- return nil
|
|
|
case xunji.FieldOrganizationID:
|
|
|
v, ok := value.(uint64)
|
|
|
if !ok {
|
|
@@ -50820,9 +50748,6 @@ func (m *XunjiMutation) AddedFields() []string {
|
|
|
if m.addstatus != nil {
|
|
|
fields = append(fields, xunji.FieldStatus)
|
|
|
}
|
|
|
- if m.addagent_id != nil {
|
|
|
- fields = append(fields, xunji.FieldAgentID)
|
|
|
- }
|
|
|
if m.addorganization_id != nil {
|
|
|
fields = append(fields, xunji.FieldOrganizationID)
|
|
|
}
|
|
@@ -50836,8 +50761,6 @@ func (m *XunjiMutation) AddedField(name string) (ent.Value, bool) {
|
|
|
switch name {
|
|
|
case xunji.FieldStatus:
|
|
|
return m.AddedStatus()
|
|
|
- case xunji.FieldAgentID:
|
|
|
- return m.AddedAgentID()
|
|
|
case xunji.FieldOrganizationID:
|
|
|
return m.AddedOrganizationID()
|
|
|
}
|
|
@@ -50856,13 +50779,6 @@ func (m *XunjiMutation) AddField(name string, value ent.Value) error {
|
|
|
}
|
|
|
m.AddStatus(v)
|
|
|
return nil
|
|
|
- case xunji.FieldAgentID:
|
|
|
- v, ok := value.(int64)
|
|
|
- if !ok {
|
|
|
- return fmt.Errorf("unexpected type %T for field %s", value, name)
|
|
|
- }
|
|
|
- m.AddAgentID(v)
|
|
|
- return nil
|
|
|
case xunji.FieldOrganizationID:
|
|
|
v, ok := value.(int64)
|
|
|
if !ok {
|
|
@@ -50936,9 +50852,6 @@ func (m *XunjiMutation) ResetField(name string) error {
|
|
|
case xunji.FieldEncodingKey:
|
|
|
m.ResetEncodingKey()
|
|
|
return nil
|
|
|
- case xunji.FieldAgentID:
|
|
|
- m.ResetAgentID()
|
|
|
- return nil
|
|
|
case xunji.FieldOrganizationID:
|
|
|
m.ResetOrganizationID()
|
|
|
return nil
|