|
@@ -248,21 +248,6 @@ func (au *AgentUpdate) AddWaAgent(w ...*Whatsapp) *AgentUpdate {
|
|
return au.AddWaAgentIDs(ids...)
|
|
return au.AddWaAgentIDs(ids...)
|
|
}
|
|
}
|
|
|
|
|
|
-// AddKeyAgentIDs adds the "key_agent" edge to the ApiKey entity by IDs.
|
|
|
|
-func (au *AgentUpdate) AddKeyAgentIDs(ids ...uint64) *AgentUpdate {
|
|
|
|
- au.mutation.AddKeyAgentIDs(ids...)
|
|
|
|
- return au
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-// AddKeyAgent adds the "key_agent" edges to the ApiKey entity.
|
|
|
|
-func (au *AgentUpdate) AddKeyAgent(a ...*ApiKey) *AgentUpdate {
|
|
|
|
- ids := make([]uint64, len(a))
|
|
|
|
- for i := range a {
|
|
|
|
- ids[i] = a[i].ID
|
|
|
|
- }
|
|
|
|
- return au.AddKeyAgentIDs(ids...)
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
// AddXjsAgentIDs adds the "xjs_agent" edge to the XunjiService entity by IDs.
|
|
// AddXjsAgentIDs adds the "xjs_agent" edge to the XunjiService entity by IDs.
|
|
func (au *AgentUpdate) AddXjsAgentIDs(ids ...uint64) *AgentUpdate {
|
|
func (au *AgentUpdate) AddXjsAgentIDs(ids ...uint64) *AgentUpdate {
|
|
au.mutation.AddXjsAgentIDs(ids...)
|
|
au.mutation.AddXjsAgentIDs(ids...)
|
|
@@ -278,6 +263,21 @@ func (au *AgentUpdate) AddXjsAgent(x ...*XunjiService) *AgentUpdate {
|
|
return au.AddXjsAgentIDs(ids...)
|
|
return au.AddXjsAgentIDs(ids...)
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+// AddKeyAgentIDs adds the "key_agent" edge to the ApiKey entity by IDs.
|
|
|
|
+func (au *AgentUpdate) AddKeyAgentIDs(ids ...uint64) *AgentUpdate {
|
|
|
|
+ au.mutation.AddKeyAgentIDs(ids...)
|
|
|
|
+ return au
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+// AddKeyAgent adds the "key_agent" edges to the ApiKey entity.
|
|
|
|
+func (au *AgentUpdate) AddKeyAgent(a ...*ApiKey) *AgentUpdate {
|
|
|
|
+ ids := make([]uint64, len(a))
|
|
|
|
+ for i := range a {
|
|
|
|
+ ids[i] = a[i].ID
|
|
|
|
+ }
|
|
|
|
+ return au.AddKeyAgentIDs(ids...)
|
|
|
|
+}
|
|
|
|
+
|
|
// Mutation returns the AgentMutation object of the builder.
|
|
// Mutation returns the AgentMutation object of the builder.
|
|
func (au *AgentUpdate) Mutation() *AgentMutation {
|
|
func (au *AgentUpdate) Mutation() *AgentMutation {
|
|
return au.mutation
|
|
return au.mutation
|
|
@@ -346,27 +346,6 @@ func (au *AgentUpdate) RemoveWaAgent(w ...*Whatsapp) *AgentUpdate {
|
|
return au.RemoveWaAgentIDs(ids...)
|
|
return au.RemoveWaAgentIDs(ids...)
|
|
}
|
|
}
|
|
|
|
|
|
-// ClearKeyAgent clears all "key_agent" edges to the ApiKey entity.
|
|
|
|
-func (au *AgentUpdate) ClearKeyAgent() *AgentUpdate {
|
|
|
|
- au.mutation.ClearKeyAgent()
|
|
|
|
- return au
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-// RemoveKeyAgentIDs removes the "key_agent" edge to ApiKey entities by IDs.
|
|
|
|
-func (au *AgentUpdate) RemoveKeyAgentIDs(ids ...uint64) *AgentUpdate {
|
|
|
|
- au.mutation.RemoveKeyAgentIDs(ids...)
|
|
|
|
- return au
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-// RemoveKeyAgent removes "key_agent" edges to ApiKey entities.
|
|
|
|
-func (au *AgentUpdate) RemoveKeyAgent(a ...*ApiKey) *AgentUpdate {
|
|
|
|
- ids := make([]uint64, len(a))
|
|
|
|
- for i := range a {
|
|
|
|
- ids[i] = a[i].ID
|
|
|
|
- }
|
|
|
|
- return au.RemoveKeyAgentIDs(ids...)
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
// ClearXjsAgent clears all "xjs_agent" edges to the XunjiService entity.
|
|
// ClearXjsAgent clears all "xjs_agent" edges to the XunjiService entity.
|
|
func (au *AgentUpdate) ClearXjsAgent() *AgentUpdate {
|
|
func (au *AgentUpdate) ClearXjsAgent() *AgentUpdate {
|
|
au.mutation.ClearXjsAgent()
|
|
au.mutation.ClearXjsAgent()
|
|
@@ -388,6 +367,27 @@ func (au *AgentUpdate) RemoveXjsAgent(x ...*XunjiService) *AgentUpdate {
|
|
return au.RemoveXjsAgentIDs(ids...)
|
|
return au.RemoveXjsAgentIDs(ids...)
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+// ClearKeyAgent clears all "key_agent" edges to the ApiKey entity.
|
|
|
|
+func (au *AgentUpdate) ClearKeyAgent() *AgentUpdate {
|
|
|
|
+ au.mutation.ClearKeyAgent()
|
|
|
|
+ return au
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+// RemoveKeyAgentIDs removes the "key_agent" edge to ApiKey entities by IDs.
|
|
|
|
+func (au *AgentUpdate) RemoveKeyAgentIDs(ids ...uint64) *AgentUpdate {
|
|
|
|
+ au.mutation.RemoveKeyAgentIDs(ids...)
|
|
|
|
+ return au
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+// RemoveKeyAgent removes "key_agent" edges to ApiKey entities.
|
|
|
|
+func (au *AgentUpdate) RemoveKeyAgent(a ...*ApiKey) *AgentUpdate {
|
|
|
|
+ ids := make([]uint64, len(a))
|
|
|
|
+ for i := range a {
|
|
|
|
+ ids[i] = a[i].ID
|
|
|
|
+ }
|
|
|
|
+ return au.RemoveKeyAgentIDs(ids...)
|
|
|
|
+}
|
|
|
|
+
|
|
// Save executes the query and returns the number of nodes affected by the update operation.
|
|
// Save executes the query and returns the number of nodes affected by the update operation.
|
|
func (au *AgentUpdate) Save(ctx context.Context) (int, error) {
|
|
func (au *AgentUpdate) Save(ctx context.Context) (int, error) {
|
|
if err := au.defaults(); err != nil {
|
|
if err := au.defaults(); err != nil {
|
|
@@ -655,28 +655,28 @@ func (au *AgentUpdate) sqlSave(ctx context.Context) (n int, err error) {
|
|
}
|
|
}
|
|
_spec.Edges.Add = append(_spec.Edges.Add, edge)
|
|
_spec.Edges.Add = append(_spec.Edges.Add, edge)
|
|
}
|
|
}
|
|
- if au.mutation.KeyAgentCleared() {
|
|
|
|
|
|
+ if au.mutation.XjsAgentCleared() {
|
|
edge := &sqlgraph.EdgeSpec{
|
|
edge := &sqlgraph.EdgeSpec{
|
|
Rel: sqlgraph.O2M,
|
|
Rel: sqlgraph.O2M,
|
|
Inverse: false,
|
|
Inverse: false,
|
|
- Table: agent.KeyAgentTable,
|
|
|
|
- Columns: []string{agent.KeyAgentColumn},
|
|
|
|
|
|
+ Table: agent.XjsAgentTable,
|
|
|
|
+ Columns: []string{agent.XjsAgentColumn},
|
|
Bidi: false,
|
|
Bidi: false,
|
|
Target: &sqlgraph.EdgeTarget{
|
|
Target: &sqlgraph.EdgeTarget{
|
|
- IDSpec: sqlgraph.NewFieldSpec(apikey.FieldID, field.TypeUint64),
|
|
|
|
|
|
+ IDSpec: sqlgraph.NewFieldSpec(xunjiservice.FieldID, field.TypeUint64),
|
|
},
|
|
},
|
|
}
|
|
}
|
|
_spec.Edges.Clear = append(_spec.Edges.Clear, edge)
|
|
_spec.Edges.Clear = append(_spec.Edges.Clear, edge)
|
|
}
|
|
}
|
|
- if nodes := au.mutation.RemovedKeyAgentIDs(); len(nodes) > 0 && !au.mutation.KeyAgentCleared() {
|
|
|
|
|
|
+ if nodes := au.mutation.RemovedXjsAgentIDs(); len(nodes) > 0 && !au.mutation.XjsAgentCleared() {
|
|
edge := &sqlgraph.EdgeSpec{
|
|
edge := &sqlgraph.EdgeSpec{
|
|
Rel: sqlgraph.O2M,
|
|
Rel: sqlgraph.O2M,
|
|
Inverse: false,
|
|
Inverse: false,
|
|
- Table: agent.KeyAgentTable,
|
|
|
|
- Columns: []string{agent.KeyAgentColumn},
|
|
|
|
|
|
+ Table: agent.XjsAgentTable,
|
|
|
|
+ Columns: []string{agent.XjsAgentColumn},
|
|
Bidi: false,
|
|
Bidi: false,
|
|
Target: &sqlgraph.EdgeTarget{
|
|
Target: &sqlgraph.EdgeTarget{
|
|
- IDSpec: sqlgraph.NewFieldSpec(apikey.FieldID, field.TypeUint64),
|
|
|
|
|
|
+ IDSpec: sqlgraph.NewFieldSpec(xunjiservice.FieldID, field.TypeUint64),
|
|
},
|
|
},
|
|
}
|
|
}
|
|
for _, k := range nodes {
|
|
for _, k := range nodes {
|
|
@@ -684,15 +684,15 @@ func (au *AgentUpdate) sqlSave(ctx context.Context) (n int, err error) {
|
|
}
|
|
}
|
|
_spec.Edges.Clear = append(_spec.Edges.Clear, edge)
|
|
_spec.Edges.Clear = append(_spec.Edges.Clear, edge)
|
|
}
|
|
}
|
|
- if nodes := au.mutation.KeyAgentIDs(); len(nodes) > 0 {
|
|
|
|
|
|
+ if nodes := au.mutation.XjsAgentIDs(); len(nodes) > 0 {
|
|
edge := &sqlgraph.EdgeSpec{
|
|
edge := &sqlgraph.EdgeSpec{
|
|
Rel: sqlgraph.O2M,
|
|
Rel: sqlgraph.O2M,
|
|
Inverse: false,
|
|
Inverse: false,
|
|
- Table: agent.KeyAgentTable,
|
|
|
|
- Columns: []string{agent.KeyAgentColumn},
|
|
|
|
|
|
+ Table: agent.XjsAgentTable,
|
|
|
|
+ Columns: []string{agent.XjsAgentColumn},
|
|
Bidi: false,
|
|
Bidi: false,
|
|
Target: &sqlgraph.EdgeTarget{
|
|
Target: &sqlgraph.EdgeTarget{
|
|
- IDSpec: sqlgraph.NewFieldSpec(apikey.FieldID, field.TypeUint64),
|
|
|
|
|
|
+ IDSpec: sqlgraph.NewFieldSpec(xunjiservice.FieldID, field.TypeUint64),
|
|
},
|
|
},
|
|
}
|
|
}
|
|
for _, k := range nodes {
|
|
for _, k := range nodes {
|
|
@@ -700,28 +700,28 @@ func (au *AgentUpdate) sqlSave(ctx context.Context) (n int, err error) {
|
|
}
|
|
}
|
|
_spec.Edges.Add = append(_spec.Edges.Add, edge)
|
|
_spec.Edges.Add = append(_spec.Edges.Add, edge)
|
|
}
|
|
}
|
|
- if au.mutation.XjsAgentCleared() {
|
|
|
|
|
|
+ if au.mutation.KeyAgentCleared() {
|
|
edge := &sqlgraph.EdgeSpec{
|
|
edge := &sqlgraph.EdgeSpec{
|
|
Rel: sqlgraph.O2M,
|
|
Rel: sqlgraph.O2M,
|
|
Inverse: false,
|
|
Inverse: false,
|
|
- Table: agent.XjsAgentTable,
|
|
|
|
- Columns: []string{agent.XjsAgentColumn},
|
|
|
|
|
|
+ Table: agent.KeyAgentTable,
|
|
|
|
+ Columns: []string{agent.KeyAgentColumn},
|
|
Bidi: false,
|
|
Bidi: false,
|
|
Target: &sqlgraph.EdgeTarget{
|
|
Target: &sqlgraph.EdgeTarget{
|
|
- IDSpec: sqlgraph.NewFieldSpec(xunjiservice.FieldID, field.TypeUint64),
|
|
|
|
|
|
+ IDSpec: sqlgraph.NewFieldSpec(apikey.FieldID, field.TypeUint64),
|
|
},
|
|
},
|
|
}
|
|
}
|
|
_spec.Edges.Clear = append(_spec.Edges.Clear, edge)
|
|
_spec.Edges.Clear = append(_spec.Edges.Clear, edge)
|
|
}
|
|
}
|
|
- if nodes := au.mutation.RemovedXjsAgentIDs(); len(nodes) > 0 && !au.mutation.XjsAgentCleared() {
|
|
|
|
|
|
+ if nodes := au.mutation.RemovedKeyAgentIDs(); len(nodes) > 0 && !au.mutation.KeyAgentCleared() {
|
|
edge := &sqlgraph.EdgeSpec{
|
|
edge := &sqlgraph.EdgeSpec{
|
|
Rel: sqlgraph.O2M,
|
|
Rel: sqlgraph.O2M,
|
|
Inverse: false,
|
|
Inverse: false,
|
|
- Table: agent.XjsAgentTable,
|
|
|
|
- Columns: []string{agent.XjsAgentColumn},
|
|
|
|
|
|
+ Table: agent.KeyAgentTable,
|
|
|
|
+ Columns: []string{agent.KeyAgentColumn},
|
|
Bidi: false,
|
|
Bidi: false,
|
|
Target: &sqlgraph.EdgeTarget{
|
|
Target: &sqlgraph.EdgeTarget{
|
|
- IDSpec: sqlgraph.NewFieldSpec(xunjiservice.FieldID, field.TypeUint64),
|
|
|
|
|
|
+ IDSpec: sqlgraph.NewFieldSpec(apikey.FieldID, field.TypeUint64),
|
|
},
|
|
},
|
|
}
|
|
}
|
|
for _, k := range nodes {
|
|
for _, k := range nodes {
|
|
@@ -729,15 +729,15 @@ func (au *AgentUpdate) sqlSave(ctx context.Context) (n int, err error) {
|
|
}
|
|
}
|
|
_spec.Edges.Clear = append(_spec.Edges.Clear, edge)
|
|
_spec.Edges.Clear = append(_spec.Edges.Clear, edge)
|
|
}
|
|
}
|
|
- if nodes := au.mutation.XjsAgentIDs(); len(nodes) > 0 {
|
|
|
|
|
|
+ if nodes := au.mutation.KeyAgentIDs(); len(nodes) > 0 {
|
|
edge := &sqlgraph.EdgeSpec{
|
|
edge := &sqlgraph.EdgeSpec{
|
|
Rel: sqlgraph.O2M,
|
|
Rel: sqlgraph.O2M,
|
|
Inverse: false,
|
|
Inverse: false,
|
|
- Table: agent.XjsAgentTable,
|
|
|
|
- Columns: []string{agent.XjsAgentColumn},
|
|
|
|
|
|
+ Table: agent.KeyAgentTable,
|
|
|
|
+ Columns: []string{agent.KeyAgentColumn},
|
|
Bidi: false,
|
|
Bidi: false,
|
|
Target: &sqlgraph.EdgeTarget{
|
|
Target: &sqlgraph.EdgeTarget{
|
|
- IDSpec: sqlgraph.NewFieldSpec(xunjiservice.FieldID, field.TypeUint64),
|
|
|
|
|
|
+ IDSpec: sqlgraph.NewFieldSpec(apikey.FieldID, field.TypeUint64),
|
|
},
|
|
},
|
|
}
|
|
}
|
|
for _, k := range nodes {
|
|
for _, k := range nodes {
|
|
@@ -980,21 +980,6 @@ func (auo *AgentUpdateOne) AddWaAgent(w ...*Whatsapp) *AgentUpdateOne {
|
|
return auo.AddWaAgentIDs(ids...)
|
|
return auo.AddWaAgentIDs(ids...)
|
|
}
|
|
}
|
|
|
|
|
|
-// AddKeyAgentIDs adds the "key_agent" edge to the ApiKey entity by IDs.
|
|
|
|
-func (auo *AgentUpdateOne) AddKeyAgentIDs(ids ...uint64) *AgentUpdateOne {
|
|
|
|
- auo.mutation.AddKeyAgentIDs(ids...)
|
|
|
|
- return auo
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-// AddKeyAgent adds the "key_agent" edges to the ApiKey entity.
|
|
|
|
-func (auo *AgentUpdateOne) AddKeyAgent(a ...*ApiKey) *AgentUpdateOne {
|
|
|
|
- ids := make([]uint64, len(a))
|
|
|
|
- for i := range a {
|
|
|
|
- ids[i] = a[i].ID
|
|
|
|
- }
|
|
|
|
- return auo.AddKeyAgentIDs(ids...)
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
// AddXjsAgentIDs adds the "xjs_agent" edge to the XunjiService entity by IDs.
|
|
// AddXjsAgentIDs adds the "xjs_agent" edge to the XunjiService entity by IDs.
|
|
func (auo *AgentUpdateOne) AddXjsAgentIDs(ids ...uint64) *AgentUpdateOne {
|
|
func (auo *AgentUpdateOne) AddXjsAgentIDs(ids ...uint64) *AgentUpdateOne {
|
|
auo.mutation.AddXjsAgentIDs(ids...)
|
|
auo.mutation.AddXjsAgentIDs(ids...)
|
|
@@ -1010,6 +995,21 @@ func (auo *AgentUpdateOne) AddXjsAgent(x ...*XunjiService) *AgentUpdateOne {
|
|
return auo.AddXjsAgentIDs(ids...)
|
|
return auo.AddXjsAgentIDs(ids...)
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+// AddKeyAgentIDs adds the "key_agent" edge to the ApiKey entity by IDs.
|
|
|
|
+func (auo *AgentUpdateOne) AddKeyAgentIDs(ids ...uint64) *AgentUpdateOne {
|
|
|
|
+ auo.mutation.AddKeyAgentIDs(ids...)
|
|
|
|
+ return auo
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+// AddKeyAgent adds the "key_agent" edges to the ApiKey entity.
|
|
|
|
+func (auo *AgentUpdateOne) AddKeyAgent(a ...*ApiKey) *AgentUpdateOne {
|
|
|
|
+ ids := make([]uint64, len(a))
|
|
|
|
+ for i := range a {
|
|
|
|
+ ids[i] = a[i].ID
|
|
|
|
+ }
|
|
|
|
+ return auo.AddKeyAgentIDs(ids...)
|
|
|
|
+}
|
|
|
|
+
|
|
// Mutation returns the AgentMutation object of the builder.
|
|
// Mutation returns the AgentMutation object of the builder.
|
|
func (auo *AgentUpdateOne) Mutation() *AgentMutation {
|
|
func (auo *AgentUpdateOne) Mutation() *AgentMutation {
|
|
return auo.mutation
|
|
return auo.mutation
|
|
@@ -1078,27 +1078,6 @@ func (auo *AgentUpdateOne) RemoveWaAgent(w ...*Whatsapp) *AgentUpdateOne {
|
|
return auo.RemoveWaAgentIDs(ids...)
|
|
return auo.RemoveWaAgentIDs(ids...)
|
|
}
|
|
}
|
|
|
|
|
|
-// ClearKeyAgent clears all "key_agent" edges to the ApiKey entity.
|
|
|
|
-func (auo *AgentUpdateOne) ClearKeyAgent() *AgentUpdateOne {
|
|
|
|
- auo.mutation.ClearKeyAgent()
|
|
|
|
- return auo
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-// RemoveKeyAgentIDs removes the "key_agent" edge to ApiKey entities by IDs.
|
|
|
|
-func (auo *AgentUpdateOne) RemoveKeyAgentIDs(ids ...uint64) *AgentUpdateOne {
|
|
|
|
- auo.mutation.RemoveKeyAgentIDs(ids...)
|
|
|
|
- return auo
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-// RemoveKeyAgent removes "key_agent" edges to ApiKey entities.
|
|
|
|
-func (auo *AgentUpdateOne) RemoveKeyAgent(a ...*ApiKey) *AgentUpdateOne {
|
|
|
|
- ids := make([]uint64, len(a))
|
|
|
|
- for i := range a {
|
|
|
|
- ids[i] = a[i].ID
|
|
|
|
- }
|
|
|
|
- return auo.RemoveKeyAgentIDs(ids...)
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
// ClearXjsAgent clears all "xjs_agent" edges to the XunjiService entity.
|
|
// ClearXjsAgent clears all "xjs_agent" edges to the XunjiService entity.
|
|
func (auo *AgentUpdateOne) ClearXjsAgent() *AgentUpdateOne {
|
|
func (auo *AgentUpdateOne) ClearXjsAgent() *AgentUpdateOne {
|
|
auo.mutation.ClearXjsAgent()
|
|
auo.mutation.ClearXjsAgent()
|
|
@@ -1120,6 +1099,27 @@ func (auo *AgentUpdateOne) RemoveXjsAgent(x ...*XunjiService) *AgentUpdateOne {
|
|
return auo.RemoveXjsAgentIDs(ids...)
|
|
return auo.RemoveXjsAgentIDs(ids...)
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+// ClearKeyAgent clears all "key_agent" edges to the ApiKey entity.
|
|
|
|
+func (auo *AgentUpdateOne) ClearKeyAgent() *AgentUpdateOne {
|
|
|
|
+ auo.mutation.ClearKeyAgent()
|
|
|
|
+ return auo
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+// RemoveKeyAgentIDs removes the "key_agent" edge to ApiKey entities by IDs.
|
|
|
|
+func (auo *AgentUpdateOne) RemoveKeyAgentIDs(ids ...uint64) *AgentUpdateOne {
|
|
|
|
+ auo.mutation.RemoveKeyAgentIDs(ids...)
|
|
|
|
+ return auo
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+// RemoveKeyAgent removes "key_agent" edges to ApiKey entities.
|
|
|
|
+func (auo *AgentUpdateOne) RemoveKeyAgent(a ...*ApiKey) *AgentUpdateOne {
|
|
|
|
+ ids := make([]uint64, len(a))
|
|
|
|
+ for i := range a {
|
|
|
|
+ ids[i] = a[i].ID
|
|
|
|
+ }
|
|
|
|
+ return auo.RemoveKeyAgentIDs(ids...)
|
|
|
|
+}
|
|
|
|
+
|
|
// Where appends a list predicates to the AgentUpdate builder.
|
|
// Where appends a list predicates to the AgentUpdate builder.
|
|
func (auo *AgentUpdateOne) Where(ps ...predicate.Agent) *AgentUpdateOne {
|
|
func (auo *AgentUpdateOne) Where(ps ...predicate.Agent) *AgentUpdateOne {
|
|
auo.mutation.Where(ps...)
|
|
auo.mutation.Where(ps...)
|
|
@@ -1417,28 +1417,28 @@ func (auo *AgentUpdateOne) sqlSave(ctx context.Context) (_node *Agent, err error
|
|
}
|
|
}
|
|
_spec.Edges.Add = append(_spec.Edges.Add, edge)
|
|
_spec.Edges.Add = append(_spec.Edges.Add, edge)
|
|
}
|
|
}
|
|
- if auo.mutation.KeyAgentCleared() {
|
|
|
|
|
|
+ if auo.mutation.XjsAgentCleared() {
|
|
edge := &sqlgraph.EdgeSpec{
|
|
edge := &sqlgraph.EdgeSpec{
|
|
Rel: sqlgraph.O2M,
|
|
Rel: sqlgraph.O2M,
|
|
Inverse: false,
|
|
Inverse: false,
|
|
- Table: agent.KeyAgentTable,
|
|
|
|
- Columns: []string{agent.KeyAgentColumn},
|
|
|
|
|
|
+ Table: agent.XjsAgentTable,
|
|
|
|
+ Columns: []string{agent.XjsAgentColumn},
|
|
Bidi: false,
|
|
Bidi: false,
|
|
Target: &sqlgraph.EdgeTarget{
|
|
Target: &sqlgraph.EdgeTarget{
|
|
- IDSpec: sqlgraph.NewFieldSpec(apikey.FieldID, field.TypeUint64),
|
|
|
|
|
|
+ IDSpec: sqlgraph.NewFieldSpec(xunjiservice.FieldID, field.TypeUint64),
|
|
},
|
|
},
|
|
}
|
|
}
|
|
_spec.Edges.Clear = append(_spec.Edges.Clear, edge)
|
|
_spec.Edges.Clear = append(_spec.Edges.Clear, edge)
|
|
}
|
|
}
|
|
- if nodes := auo.mutation.RemovedKeyAgentIDs(); len(nodes) > 0 && !auo.mutation.KeyAgentCleared() {
|
|
|
|
|
|
+ if nodes := auo.mutation.RemovedXjsAgentIDs(); len(nodes) > 0 && !auo.mutation.XjsAgentCleared() {
|
|
edge := &sqlgraph.EdgeSpec{
|
|
edge := &sqlgraph.EdgeSpec{
|
|
Rel: sqlgraph.O2M,
|
|
Rel: sqlgraph.O2M,
|
|
Inverse: false,
|
|
Inverse: false,
|
|
- Table: agent.KeyAgentTable,
|
|
|
|
- Columns: []string{agent.KeyAgentColumn},
|
|
|
|
|
|
+ Table: agent.XjsAgentTable,
|
|
|
|
+ Columns: []string{agent.XjsAgentColumn},
|
|
Bidi: false,
|
|
Bidi: false,
|
|
Target: &sqlgraph.EdgeTarget{
|
|
Target: &sqlgraph.EdgeTarget{
|
|
- IDSpec: sqlgraph.NewFieldSpec(apikey.FieldID, field.TypeUint64),
|
|
|
|
|
|
+ IDSpec: sqlgraph.NewFieldSpec(xunjiservice.FieldID, field.TypeUint64),
|
|
},
|
|
},
|
|
}
|
|
}
|
|
for _, k := range nodes {
|
|
for _, k := range nodes {
|
|
@@ -1446,15 +1446,15 @@ func (auo *AgentUpdateOne) sqlSave(ctx context.Context) (_node *Agent, err error
|
|
}
|
|
}
|
|
_spec.Edges.Clear = append(_spec.Edges.Clear, edge)
|
|
_spec.Edges.Clear = append(_spec.Edges.Clear, edge)
|
|
}
|
|
}
|
|
- if nodes := auo.mutation.KeyAgentIDs(); len(nodes) > 0 {
|
|
|
|
|
|
+ if nodes := auo.mutation.XjsAgentIDs(); len(nodes) > 0 {
|
|
edge := &sqlgraph.EdgeSpec{
|
|
edge := &sqlgraph.EdgeSpec{
|
|
Rel: sqlgraph.O2M,
|
|
Rel: sqlgraph.O2M,
|
|
Inverse: false,
|
|
Inverse: false,
|
|
- Table: agent.KeyAgentTable,
|
|
|
|
- Columns: []string{agent.KeyAgentColumn},
|
|
|
|
|
|
+ Table: agent.XjsAgentTable,
|
|
|
|
+ Columns: []string{agent.XjsAgentColumn},
|
|
Bidi: false,
|
|
Bidi: false,
|
|
Target: &sqlgraph.EdgeTarget{
|
|
Target: &sqlgraph.EdgeTarget{
|
|
- IDSpec: sqlgraph.NewFieldSpec(apikey.FieldID, field.TypeUint64),
|
|
|
|
|
|
+ IDSpec: sqlgraph.NewFieldSpec(xunjiservice.FieldID, field.TypeUint64),
|
|
},
|
|
},
|
|
}
|
|
}
|
|
for _, k := range nodes {
|
|
for _, k := range nodes {
|
|
@@ -1462,28 +1462,28 @@ func (auo *AgentUpdateOne) sqlSave(ctx context.Context) (_node *Agent, err error
|
|
}
|
|
}
|
|
_spec.Edges.Add = append(_spec.Edges.Add, edge)
|
|
_spec.Edges.Add = append(_spec.Edges.Add, edge)
|
|
}
|
|
}
|
|
- if auo.mutation.XjsAgentCleared() {
|
|
|
|
|
|
+ if auo.mutation.KeyAgentCleared() {
|
|
edge := &sqlgraph.EdgeSpec{
|
|
edge := &sqlgraph.EdgeSpec{
|
|
Rel: sqlgraph.O2M,
|
|
Rel: sqlgraph.O2M,
|
|
Inverse: false,
|
|
Inverse: false,
|
|
- Table: agent.XjsAgentTable,
|
|
|
|
- Columns: []string{agent.XjsAgentColumn},
|
|
|
|
|
|
+ Table: agent.KeyAgentTable,
|
|
|
|
+ Columns: []string{agent.KeyAgentColumn},
|
|
Bidi: false,
|
|
Bidi: false,
|
|
Target: &sqlgraph.EdgeTarget{
|
|
Target: &sqlgraph.EdgeTarget{
|
|
- IDSpec: sqlgraph.NewFieldSpec(xunjiservice.FieldID, field.TypeUint64),
|
|
|
|
|
|
+ IDSpec: sqlgraph.NewFieldSpec(apikey.FieldID, field.TypeUint64),
|
|
},
|
|
},
|
|
}
|
|
}
|
|
_spec.Edges.Clear = append(_spec.Edges.Clear, edge)
|
|
_spec.Edges.Clear = append(_spec.Edges.Clear, edge)
|
|
}
|
|
}
|
|
- if nodes := auo.mutation.RemovedXjsAgentIDs(); len(nodes) > 0 && !auo.mutation.XjsAgentCleared() {
|
|
|
|
|
|
+ if nodes := auo.mutation.RemovedKeyAgentIDs(); len(nodes) > 0 && !auo.mutation.KeyAgentCleared() {
|
|
edge := &sqlgraph.EdgeSpec{
|
|
edge := &sqlgraph.EdgeSpec{
|
|
Rel: sqlgraph.O2M,
|
|
Rel: sqlgraph.O2M,
|
|
Inverse: false,
|
|
Inverse: false,
|
|
- Table: agent.XjsAgentTable,
|
|
|
|
- Columns: []string{agent.XjsAgentColumn},
|
|
|
|
|
|
+ Table: agent.KeyAgentTable,
|
|
|
|
+ Columns: []string{agent.KeyAgentColumn},
|
|
Bidi: false,
|
|
Bidi: false,
|
|
Target: &sqlgraph.EdgeTarget{
|
|
Target: &sqlgraph.EdgeTarget{
|
|
- IDSpec: sqlgraph.NewFieldSpec(xunjiservice.FieldID, field.TypeUint64),
|
|
|
|
|
|
+ IDSpec: sqlgraph.NewFieldSpec(apikey.FieldID, field.TypeUint64),
|
|
},
|
|
},
|
|
}
|
|
}
|
|
for _, k := range nodes {
|
|
for _, k := range nodes {
|
|
@@ -1491,15 +1491,15 @@ func (auo *AgentUpdateOne) sqlSave(ctx context.Context) (_node *Agent, err error
|
|
}
|
|
}
|
|
_spec.Edges.Clear = append(_spec.Edges.Clear, edge)
|
|
_spec.Edges.Clear = append(_spec.Edges.Clear, edge)
|
|
}
|
|
}
|
|
- if nodes := auo.mutation.XjsAgentIDs(); len(nodes) > 0 {
|
|
|
|
|
|
+ if nodes := auo.mutation.KeyAgentIDs(); len(nodes) > 0 {
|
|
edge := &sqlgraph.EdgeSpec{
|
|
edge := &sqlgraph.EdgeSpec{
|
|
Rel: sqlgraph.O2M,
|
|
Rel: sqlgraph.O2M,
|
|
Inverse: false,
|
|
Inverse: false,
|
|
- Table: agent.XjsAgentTable,
|
|
|
|
- Columns: []string{agent.XjsAgentColumn},
|
|
|
|
|
|
+ Table: agent.KeyAgentTable,
|
|
|
|
+ Columns: []string{agent.KeyAgentColumn},
|
|
Bidi: false,
|
|
Bidi: false,
|
|
Target: &sqlgraph.EdgeTarget{
|
|
Target: &sqlgraph.EdgeTarget{
|
|
- IDSpec: sqlgraph.NewFieldSpec(xunjiservice.FieldID, field.TypeUint64),
|
|
|
|
|
|
+ IDSpec: sqlgraph.NewFieldSpec(apikey.FieldID, field.TypeUint64),
|
|
},
|
|
},
|
|
}
|
|
}
|
|
for _, k := range nodes {
|
|
for _, k := range nodes {
|