|
@@ -14759,37 +14759,40 @@ func (m *ServerMutation) ResetEdge(name string) error {
|
|
|
// SopNodeMutation represents an operation that mutates the SopNode nodes in the graph.
|
|
|
type SopNodeMutation struct {
|
|
|
config
|
|
|
- op Op
|
|
|
- typ string
|
|
|
- id *uint64
|
|
|
- created_at *time.Time
|
|
|
- updated_at *time.Time
|
|
|
- status *uint8
|
|
|
- addstatus *int8
|
|
|
- deleted_at *time.Time
|
|
|
- parent_id *uint64
|
|
|
- addparent_id *int64
|
|
|
- name *string
|
|
|
- condition_type *int
|
|
|
- addcondition_type *int
|
|
|
- condition_list *[]string
|
|
|
- appendcondition_list []string
|
|
|
- no_reply_condition *uint64
|
|
|
- addno_reply_condition *int64
|
|
|
- action_message *[]custom_types.Action
|
|
|
- appendaction_message []custom_types.Action
|
|
|
- action_label *[]uint64
|
|
|
- appendaction_label []uint64
|
|
|
- action_forward **custom_types.ActionForward
|
|
|
- clearedFields map[string]struct{}
|
|
|
- sop_stage *uint64
|
|
|
- clearedsop_stage bool
|
|
|
- node_messages map[uint64]struct{}
|
|
|
- removednode_messages map[uint64]struct{}
|
|
|
- clearednode_messages bool
|
|
|
- done bool
|
|
|
- oldValue func(context.Context) (*SopNode, error)
|
|
|
- predicates []predicate.SopNode
|
|
|
+ op Op
|
|
|
+ typ string
|
|
|
+ id *uint64
|
|
|
+ created_at *time.Time
|
|
|
+ updated_at *time.Time
|
|
|
+ status *uint8
|
|
|
+ addstatus *int8
|
|
|
+ deleted_at *time.Time
|
|
|
+ parent_id *uint64
|
|
|
+ addparent_id *int64
|
|
|
+ name *string
|
|
|
+ condition_type *int
|
|
|
+ addcondition_type *int
|
|
|
+ condition_list *[]string
|
|
|
+ appendcondition_list []string
|
|
|
+ no_reply_condition *uint64
|
|
|
+ addno_reply_condition *int64
|
|
|
+ no_reply_unit *string
|
|
|
+ action_message *[]custom_types.Action
|
|
|
+ appendaction_message []custom_types.Action
|
|
|
+ action_label_add *[]uint64
|
|
|
+ appendaction_label_add []uint64
|
|
|
+ action_label_del *[]uint64
|
|
|
+ appendaction_label_del []uint64
|
|
|
+ action_forward **custom_types.ActionForward
|
|
|
+ clearedFields map[string]struct{}
|
|
|
+ sop_stage *uint64
|
|
|
+ clearedsop_stage bool
|
|
|
+ node_messages map[uint64]struct{}
|
|
|
+ removednode_messages map[uint64]struct{}
|
|
|
+ clearednode_messages bool
|
|
|
+ done bool
|
|
|
+ oldValue func(context.Context) (*SopNode, error)
|
|
|
+ predicates []predicate.SopNode
|
|
|
}
|
|
|
|
|
|
var _ ent.Mutation = (*SopNodeMutation)(nil)
|
|
@@ -15392,6 +15395,42 @@ func (m *SopNodeMutation) ResetNoReplyCondition() {
|
|
|
m.addno_reply_condition = nil
|
|
|
}
|
|
|
|
|
|
+// SetNoReplyUnit sets the "no_reply_unit" field.
|
|
|
+func (m *SopNodeMutation) SetNoReplyUnit(s string) {
|
|
|
+ m.no_reply_unit = &s
|
|
|
+}
|
|
|
+
|
|
|
+// NoReplyUnit returns the value of the "no_reply_unit" field in the mutation.
|
|
|
+func (m *SopNodeMutation) NoReplyUnit() (r string, exists bool) {
|
|
|
+ v := m.no_reply_unit
|
|
|
+ if v == nil {
|
|
|
+ return
|
|
|
+ }
|
|
|
+ return *v, true
|
|
|
+}
|
|
|
+
|
|
|
+// OldNoReplyUnit returns the old "no_reply_unit" field's value of the SopNode entity.
|
|
|
+// If the SopNode 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 *SopNodeMutation) OldNoReplyUnit(ctx context.Context) (v string, err error) {
|
|
|
+ if !m.op.Is(OpUpdateOne) {
|
|
|
+ return v, errors.New("OldNoReplyUnit is only allowed on UpdateOne operations")
|
|
|
+ }
|
|
|
+ if m.id == nil || m.oldValue == nil {
|
|
|
+ return v, errors.New("OldNoReplyUnit requires an ID field in the mutation")
|
|
|
+ }
|
|
|
+ oldValue, err := m.oldValue(ctx)
|
|
|
+ if err != nil {
|
|
|
+ return v, fmt.Errorf("querying old value for OldNoReplyUnit: %w", err)
|
|
|
+ }
|
|
|
+ return oldValue.NoReplyUnit, nil
|
|
|
+}
|
|
|
+
|
|
|
+// ResetNoReplyUnit resets all changes to the "no_reply_unit" field.
|
|
|
+func (m *SopNodeMutation) ResetNoReplyUnit() {
|
|
|
+ m.no_reply_unit = nil
|
|
|
+}
|
|
|
+
|
|
|
// SetActionMessage sets the "action_message" field.
|
|
|
func (m *SopNodeMutation) SetActionMessage(ct []custom_types.Action) {
|
|
|
m.action_message = &ct
|
|
@@ -15457,69 +15496,134 @@ func (m *SopNodeMutation) ResetActionMessage() {
|
|
|
delete(m.clearedFields, sopnode.FieldActionMessage)
|
|
|
}
|
|
|
|
|
|
-// SetActionLabel sets the "action_label" field.
|
|
|
-func (m *SopNodeMutation) SetActionLabel(u []uint64) {
|
|
|
- m.action_label = &u
|
|
|
- m.appendaction_label = nil
|
|
|
+// SetActionLabelAdd sets the "action_label_add" field.
|
|
|
+func (m *SopNodeMutation) SetActionLabelAdd(u []uint64) {
|
|
|
+ m.action_label_add = &u
|
|
|
+ m.appendaction_label_add = nil
|
|
|
}
|
|
|
|
|
|
-// ActionLabel returns the value of the "action_label" field in the mutation.
|
|
|
-func (m *SopNodeMutation) ActionLabel() (r []uint64, exists bool) {
|
|
|
- v := m.action_label
|
|
|
+// ActionLabelAdd returns the value of the "action_label_add" field in the mutation.
|
|
|
+func (m *SopNodeMutation) ActionLabelAdd() (r []uint64, exists bool) {
|
|
|
+ v := m.action_label_add
|
|
|
if v == nil {
|
|
|
return
|
|
|
}
|
|
|
return *v, true
|
|
|
}
|
|
|
|
|
|
-// OldActionLabel returns the old "action_label" field's value of the SopNode entity.
|
|
|
+// OldActionLabelAdd returns the old "action_label_add" field's value of the SopNode entity.
|
|
|
// If the SopNode 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 *SopNodeMutation) OldActionLabel(ctx context.Context) (v []uint64, err error) {
|
|
|
+func (m *SopNodeMutation) OldActionLabelAdd(ctx context.Context) (v []uint64, err error) {
|
|
|
if !m.op.Is(OpUpdateOne) {
|
|
|
- return v, errors.New("OldActionLabel is only allowed on UpdateOne operations")
|
|
|
+ return v, errors.New("OldActionLabelAdd is only allowed on UpdateOne operations")
|
|
|
}
|
|
|
if m.id == nil || m.oldValue == nil {
|
|
|
- return v, errors.New("OldActionLabel requires an ID field in the mutation")
|
|
|
+ return v, errors.New("OldActionLabelAdd requires an ID field in the mutation")
|
|
|
}
|
|
|
oldValue, err := m.oldValue(ctx)
|
|
|
if err != nil {
|
|
|
- return v, fmt.Errorf("querying old value for OldActionLabel: %w", err)
|
|
|
+ return v, fmt.Errorf("querying old value for OldActionLabelAdd: %w", err)
|
|
|
}
|
|
|
- return oldValue.ActionLabel, nil
|
|
|
+ return oldValue.ActionLabelAdd, nil
|
|
|
}
|
|
|
|
|
|
-// AppendActionLabel adds u to the "action_label" field.
|
|
|
-func (m *SopNodeMutation) AppendActionLabel(u []uint64) {
|
|
|
- m.appendaction_label = append(m.appendaction_label, u...)
|
|
|
+// AppendActionLabelAdd adds u to the "action_label_add" field.
|
|
|
+func (m *SopNodeMutation) AppendActionLabelAdd(u []uint64) {
|
|
|
+ m.appendaction_label_add = append(m.appendaction_label_add, u...)
|
|
|
}
|
|
|
|
|
|
-// AppendedActionLabel returns the list of values that were appended to the "action_label" field in this mutation.
|
|
|
-func (m *SopNodeMutation) AppendedActionLabel() ([]uint64, bool) {
|
|
|
- if len(m.appendaction_label) == 0 {
|
|
|
+// AppendedActionLabelAdd returns the list of values that were appended to the "action_label_add" field in this mutation.
|
|
|
+func (m *SopNodeMutation) AppendedActionLabelAdd() ([]uint64, bool) {
|
|
|
+ if len(m.appendaction_label_add) == 0 {
|
|
|
return nil, false
|
|
|
}
|
|
|
- return m.appendaction_label, true
|
|
|
+ return m.appendaction_label_add, true
|
|
|
}
|
|
|
|
|
|
-// ClearActionLabel clears the value of the "action_label" field.
|
|
|
-func (m *SopNodeMutation) ClearActionLabel() {
|
|
|
- m.action_label = nil
|
|
|
- m.appendaction_label = nil
|
|
|
- m.clearedFields[sopnode.FieldActionLabel] = struct{}{}
|
|
|
+// ClearActionLabelAdd clears the value of the "action_label_add" field.
|
|
|
+func (m *SopNodeMutation) ClearActionLabelAdd() {
|
|
|
+ m.action_label_add = nil
|
|
|
+ m.appendaction_label_add = nil
|
|
|
+ m.clearedFields[sopnode.FieldActionLabelAdd] = struct{}{}
|
|
|
}
|
|
|
|
|
|
-// ActionLabelCleared returns if the "action_label" field was cleared in this mutation.
|
|
|
-func (m *SopNodeMutation) ActionLabelCleared() bool {
|
|
|
- _, ok := m.clearedFields[sopnode.FieldActionLabel]
|
|
|
+// ActionLabelAddCleared returns if the "action_label_add" field was cleared in this mutation.
|
|
|
+func (m *SopNodeMutation) ActionLabelAddCleared() bool {
|
|
|
+ _, ok := m.clearedFields[sopnode.FieldActionLabelAdd]
|
|
|
return ok
|
|
|
}
|
|
|
|
|
|
-// ResetActionLabel resets all changes to the "action_label" field.
|
|
|
-func (m *SopNodeMutation) ResetActionLabel() {
|
|
|
- m.action_label = nil
|
|
|
- m.appendaction_label = nil
|
|
|
- delete(m.clearedFields, sopnode.FieldActionLabel)
|
|
|
+// ResetActionLabelAdd resets all changes to the "action_label_add" field.
|
|
|
+func (m *SopNodeMutation) ResetActionLabelAdd() {
|
|
|
+ m.action_label_add = nil
|
|
|
+ m.appendaction_label_add = nil
|
|
|
+ delete(m.clearedFields, sopnode.FieldActionLabelAdd)
|
|
|
+}
|
|
|
+
|
|
|
+// SetActionLabelDel sets the "action_label_del" field.
|
|
|
+func (m *SopNodeMutation) SetActionLabelDel(u []uint64) {
|
|
|
+ m.action_label_del = &u
|
|
|
+ m.appendaction_label_del = nil
|
|
|
+}
|
|
|
+
|
|
|
+// ActionLabelDel returns the value of the "action_label_del" field in the mutation.
|
|
|
+func (m *SopNodeMutation) ActionLabelDel() (r []uint64, exists bool) {
|
|
|
+ v := m.action_label_del
|
|
|
+ if v == nil {
|
|
|
+ return
|
|
|
+ }
|
|
|
+ return *v, true
|
|
|
+}
|
|
|
+
|
|
|
+// OldActionLabelDel returns the old "action_label_del" field's value of the SopNode entity.
|
|
|
+// If the SopNode 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 *SopNodeMutation) OldActionLabelDel(ctx context.Context) (v []uint64, err error) {
|
|
|
+ if !m.op.Is(OpUpdateOne) {
|
|
|
+ return v, errors.New("OldActionLabelDel is only allowed on UpdateOne operations")
|
|
|
+ }
|
|
|
+ if m.id == nil || m.oldValue == nil {
|
|
|
+ return v, errors.New("OldActionLabelDel requires an ID field in the mutation")
|
|
|
+ }
|
|
|
+ oldValue, err := m.oldValue(ctx)
|
|
|
+ if err != nil {
|
|
|
+ return v, fmt.Errorf("querying old value for OldActionLabelDel: %w", err)
|
|
|
+ }
|
|
|
+ return oldValue.ActionLabelDel, nil
|
|
|
+}
|
|
|
+
|
|
|
+// AppendActionLabelDel adds u to the "action_label_del" field.
|
|
|
+func (m *SopNodeMutation) AppendActionLabelDel(u []uint64) {
|
|
|
+ m.appendaction_label_del = append(m.appendaction_label_del, u...)
|
|
|
+}
|
|
|
+
|
|
|
+// AppendedActionLabelDel returns the list of values that were appended to the "action_label_del" field in this mutation.
|
|
|
+func (m *SopNodeMutation) AppendedActionLabelDel() ([]uint64, bool) {
|
|
|
+ if len(m.appendaction_label_del) == 0 {
|
|
|
+ return nil, false
|
|
|
+ }
|
|
|
+ return m.appendaction_label_del, true
|
|
|
+}
|
|
|
+
|
|
|
+// ClearActionLabelDel clears the value of the "action_label_del" field.
|
|
|
+func (m *SopNodeMutation) ClearActionLabelDel() {
|
|
|
+ m.action_label_del = nil
|
|
|
+ m.appendaction_label_del = nil
|
|
|
+ m.clearedFields[sopnode.FieldActionLabelDel] = struct{}{}
|
|
|
+}
|
|
|
+
|
|
|
+// ActionLabelDelCleared returns if the "action_label_del" field was cleared in this mutation.
|
|
|
+func (m *SopNodeMutation) ActionLabelDelCleared() bool {
|
|
|
+ _, ok := m.clearedFields[sopnode.FieldActionLabelDel]
|
|
|
+ return ok
|
|
|
+}
|
|
|
+
|
|
|
+// ResetActionLabelDel resets all changes to the "action_label_del" field.
|
|
|
+func (m *SopNodeMutation) ResetActionLabelDel() {
|
|
|
+ m.action_label_del = nil
|
|
|
+ m.appendaction_label_del = nil
|
|
|
+ delete(m.clearedFields, sopnode.FieldActionLabelDel)
|
|
|
}
|
|
|
|
|
|
// SetActionForward sets the "action_forward" field.
|
|
@@ -15699,7 +15803,7 @@ func (m *SopNodeMutation) Type() string {
|
|
|
// order to get all numeric fields that were incremented/decremented, call
|
|
|
// AddedFields().
|
|
|
func (m *SopNodeMutation) Fields() []string {
|
|
|
- fields := make([]string, 0, 13)
|
|
|
+ fields := make([]string, 0, 15)
|
|
|
if m.created_at != nil {
|
|
|
fields = append(fields, sopnode.FieldCreatedAt)
|
|
|
}
|
|
@@ -15730,11 +15834,17 @@ func (m *SopNodeMutation) Fields() []string {
|
|
|
if m.no_reply_condition != nil {
|
|
|
fields = append(fields, sopnode.FieldNoReplyCondition)
|
|
|
}
|
|
|
+ if m.no_reply_unit != nil {
|
|
|
+ fields = append(fields, sopnode.FieldNoReplyUnit)
|
|
|
+ }
|
|
|
if m.action_message != nil {
|
|
|
fields = append(fields, sopnode.FieldActionMessage)
|
|
|
}
|
|
|
- if m.action_label != nil {
|
|
|
- fields = append(fields, sopnode.FieldActionLabel)
|
|
|
+ if m.action_label_add != nil {
|
|
|
+ fields = append(fields, sopnode.FieldActionLabelAdd)
|
|
|
+ }
|
|
|
+ if m.action_label_del != nil {
|
|
|
+ fields = append(fields, sopnode.FieldActionLabelDel)
|
|
|
}
|
|
|
if m.action_forward != nil {
|
|
|
fields = append(fields, sopnode.FieldActionForward)
|
|
@@ -15767,10 +15877,14 @@ func (m *SopNodeMutation) Field(name string) (ent.Value, bool) {
|
|
|
return m.ConditionList()
|
|
|
case sopnode.FieldNoReplyCondition:
|
|
|
return m.NoReplyCondition()
|
|
|
+ case sopnode.FieldNoReplyUnit:
|
|
|
+ return m.NoReplyUnit()
|
|
|
case sopnode.FieldActionMessage:
|
|
|
return m.ActionMessage()
|
|
|
- case sopnode.FieldActionLabel:
|
|
|
- return m.ActionLabel()
|
|
|
+ case sopnode.FieldActionLabelAdd:
|
|
|
+ return m.ActionLabelAdd()
|
|
|
+ case sopnode.FieldActionLabelDel:
|
|
|
+ return m.ActionLabelDel()
|
|
|
case sopnode.FieldActionForward:
|
|
|
return m.ActionForward()
|
|
|
}
|
|
@@ -15802,10 +15916,14 @@ func (m *SopNodeMutation) OldField(ctx context.Context, name string) (ent.Value,
|
|
|
return m.OldConditionList(ctx)
|
|
|
case sopnode.FieldNoReplyCondition:
|
|
|
return m.OldNoReplyCondition(ctx)
|
|
|
+ case sopnode.FieldNoReplyUnit:
|
|
|
+ return m.OldNoReplyUnit(ctx)
|
|
|
case sopnode.FieldActionMessage:
|
|
|
return m.OldActionMessage(ctx)
|
|
|
- case sopnode.FieldActionLabel:
|
|
|
- return m.OldActionLabel(ctx)
|
|
|
+ case sopnode.FieldActionLabelAdd:
|
|
|
+ return m.OldActionLabelAdd(ctx)
|
|
|
+ case sopnode.FieldActionLabelDel:
|
|
|
+ return m.OldActionLabelDel(ctx)
|
|
|
case sopnode.FieldActionForward:
|
|
|
return m.OldActionForward(ctx)
|
|
|
}
|
|
@@ -15887,6 +16005,13 @@ func (m *SopNodeMutation) SetField(name string, value ent.Value) error {
|
|
|
}
|
|
|
m.SetNoReplyCondition(v)
|
|
|
return nil
|
|
|
+ case sopnode.FieldNoReplyUnit:
|
|
|
+ v, ok := value.(string)
|
|
|
+ if !ok {
|
|
|
+ return fmt.Errorf("unexpected type %T for field %s", value, name)
|
|
|
+ }
|
|
|
+ m.SetNoReplyUnit(v)
|
|
|
+ return nil
|
|
|
case sopnode.FieldActionMessage:
|
|
|
v, ok := value.([]custom_types.Action)
|
|
|
if !ok {
|
|
@@ -15894,12 +16019,19 @@ func (m *SopNodeMutation) SetField(name string, value ent.Value) error {
|
|
|
}
|
|
|
m.SetActionMessage(v)
|
|
|
return nil
|
|
|
- case sopnode.FieldActionLabel:
|
|
|
+ case sopnode.FieldActionLabelAdd:
|
|
|
v, ok := value.([]uint64)
|
|
|
if !ok {
|
|
|
return fmt.Errorf("unexpected type %T for field %s", value, name)
|
|
|
}
|
|
|
- m.SetActionLabel(v)
|
|
|
+ m.SetActionLabelAdd(v)
|
|
|
+ return nil
|
|
|
+ case sopnode.FieldActionLabelDel:
|
|
|
+ v, ok := value.([]uint64)
|
|
|
+ if !ok {
|
|
|
+ return fmt.Errorf("unexpected type %T for field %s", value, name)
|
|
|
+ }
|
|
|
+ m.SetActionLabelDel(v)
|
|
|
return nil
|
|
|
case sopnode.FieldActionForward:
|
|
|
v, ok := value.(*custom_types.ActionForward)
|
|
@@ -16001,8 +16133,11 @@ func (m *SopNodeMutation) ClearedFields() []string {
|
|
|
if m.FieldCleared(sopnode.FieldActionMessage) {
|
|
|
fields = append(fields, sopnode.FieldActionMessage)
|
|
|
}
|
|
|
- if m.FieldCleared(sopnode.FieldActionLabel) {
|
|
|
- fields = append(fields, sopnode.FieldActionLabel)
|
|
|
+ if m.FieldCleared(sopnode.FieldActionLabelAdd) {
|
|
|
+ fields = append(fields, sopnode.FieldActionLabelAdd)
|
|
|
+ }
|
|
|
+ if m.FieldCleared(sopnode.FieldActionLabelDel) {
|
|
|
+ fields = append(fields, sopnode.FieldActionLabelDel)
|
|
|
}
|
|
|
if m.FieldCleared(sopnode.FieldActionForward) {
|
|
|
fields = append(fields, sopnode.FieldActionForward)
|
|
@@ -16033,8 +16168,11 @@ func (m *SopNodeMutation) ClearField(name string) error {
|
|
|
case sopnode.FieldActionMessage:
|
|
|
m.ClearActionMessage()
|
|
|
return nil
|
|
|
- case sopnode.FieldActionLabel:
|
|
|
- m.ClearActionLabel()
|
|
|
+ case sopnode.FieldActionLabelAdd:
|
|
|
+ m.ClearActionLabelAdd()
|
|
|
+ return nil
|
|
|
+ case sopnode.FieldActionLabelDel:
|
|
|
+ m.ClearActionLabelDel()
|
|
|
return nil
|
|
|
case sopnode.FieldActionForward:
|
|
|
m.ClearActionForward()
|
|
@@ -16077,11 +16215,17 @@ func (m *SopNodeMutation) ResetField(name string) error {
|
|
|
case sopnode.FieldNoReplyCondition:
|
|
|
m.ResetNoReplyCondition()
|
|
|
return nil
|
|
|
+ case sopnode.FieldNoReplyUnit:
|
|
|
+ m.ResetNoReplyUnit()
|
|
|
+ return nil
|
|
|
case sopnode.FieldActionMessage:
|
|
|
m.ResetActionMessage()
|
|
|
return nil
|
|
|
- case sopnode.FieldActionLabel:
|
|
|
- m.ResetActionLabel()
|
|
|
+ case sopnode.FieldActionLabelAdd:
|
|
|
+ m.ResetActionLabelAdd()
|
|
|
+ return nil
|
|
|
+ case sopnode.FieldActionLabelDel:
|
|
|
+ m.ResetActionLabelDel()
|
|
|
return nil
|
|
|
case sopnode.FieldActionForward:
|
|
|
m.ResetActionForward()
|
|
@@ -16195,40 +16339,42 @@ func (m *SopNodeMutation) ResetEdge(name string) error {
|
|
|
// SopStageMutation represents an operation that mutates the SopStage nodes in the graph.
|
|
|
type SopStageMutation struct {
|
|
|
config
|
|
|
- op Op
|
|
|
- typ string
|
|
|
- id *uint64
|
|
|
- created_at *time.Time
|
|
|
- updated_at *time.Time
|
|
|
- status *uint8
|
|
|
- addstatus *int8
|
|
|
- deleted_at *time.Time
|
|
|
- name *string
|
|
|
- condition_type *int
|
|
|
- addcondition_type *int
|
|
|
- condition_operator *int
|
|
|
- addcondition_operator *int
|
|
|
- condition_list *[]custom_types.Condition
|
|
|
- appendcondition_list []custom_types.Condition
|
|
|
- action_message *[]custom_types.Action
|
|
|
- appendaction_message []custom_types.Action
|
|
|
- action_label *[]uint64
|
|
|
- appendaction_label []uint64
|
|
|
- action_forward **custom_types.ActionForward
|
|
|
- index_sort *int
|
|
|
- addindex_sort *int
|
|
|
- clearedFields map[string]struct{}
|
|
|
- sop_task *uint64
|
|
|
- clearedsop_task bool
|
|
|
- stage_nodes map[uint64]struct{}
|
|
|
- removedstage_nodes map[uint64]struct{}
|
|
|
- clearedstage_nodes bool
|
|
|
- stage_messages map[uint64]struct{}
|
|
|
- removedstage_messages map[uint64]struct{}
|
|
|
- clearedstage_messages bool
|
|
|
- done bool
|
|
|
- oldValue func(context.Context) (*SopStage, error)
|
|
|
- predicates []predicate.SopStage
|
|
|
+ op Op
|
|
|
+ typ string
|
|
|
+ id *uint64
|
|
|
+ created_at *time.Time
|
|
|
+ updated_at *time.Time
|
|
|
+ status *uint8
|
|
|
+ addstatus *int8
|
|
|
+ deleted_at *time.Time
|
|
|
+ name *string
|
|
|
+ condition_type *int
|
|
|
+ addcondition_type *int
|
|
|
+ condition_operator *int
|
|
|
+ addcondition_operator *int
|
|
|
+ condition_list *[]custom_types.Condition
|
|
|
+ appendcondition_list []custom_types.Condition
|
|
|
+ action_message *[]custom_types.Action
|
|
|
+ appendaction_message []custom_types.Action
|
|
|
+ action_label_add *[]uint64
|
|
|
+ appendaction_label_add []uint64
|
|
|
+ action_label_del *[]uint64
|
|
|
+ appendaction_label_del []uint64
|
|
|
+ action_forward **custom_types.ActionForward
|
|
|
+ index_sort *int
|
|
|
+ addindex_sort *int
|
|
|
+ clearedFields map[string]struct{}
|
|
|
+ sop_task *uint64
|
|
|
+ clearedsop_task bool
|
|
|
+ stage_nodes map[uint64]struct{}
|
|
|
+ removedstage_nodes map[uint64]struct{}
|
|
|
+ clearedstage_nodes bool
|
|
|
+ stage_messages map[uint64]struct{}
|
|
|
+ removedstage_messages map[uint64]struct{}
|
|
|
+ clearedstage_messages bool
|
|
|
+ done bool
|
|
|
+ oldValue func(context.Context) (*SopStage, error)
|
|
|
+ predicates []predicate.SopStage
|
|
|
}
|
|
|
|
|
|
var _ ent.Mutation = (*SopStageMutation)(nil)
|
|
@@ -16826,69 +16972,134 @@ func (m *SopStageMutation) ResetActionMessage() {
|
|
|
delete(m.clearedFields, sopstage.FieldActionMessage)
|
|
|
}
|
|
|
|
|
|
-// SetActionLabel sets the "action_label" field.
|
|
|
-func (m *SopStageMutation) SetActionLabel(u []uint64) {
|
|
|
- m.action_label = &u
|
|
|
- m.appendaction_label = nil
|
|
|
+// SetActionLabelAdd sets the "action_label_add" field.
|
|
|
+func (m *SopStageMutation) SetActionLabelAdd(u []uint64) {
|
|
|
+ m.action_label_add = &u
|
|
|
+ m.appendaction_label_add = nil
|
|
|
+}
|
|
|
+
|
|
|
+// ActionLabelAdd returns the value of the "action_label_add" field in the mutation.
|
|
|
+func (m *SopStageMutation) ActionLabelAdd() (r []uint64, exists bool) {
|
|
|
+ v := m.action_label_add
|
|
|
+ if v == nil {
|
|
|
+ return
|
|
|
+ }
|
|
|
+ return *v, true
|
|
|
+}
|
|
|
+
|
|
|
+// OldActionLabelAdd returns the old "action_label_add" field's value of the SopStage entity.
|
|
|
+// If the SopStage 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 *SopStageMutation) OldActionLabelAdd(ctx context.Context) (v []uint64, err error) {
|
|
|
+ if !m.op.Is(OpUpdateOne) {
|
|
|
+ return v, errors.New("OldActionLabelAdd is only allowed on UpdateOne operations")
|
|
|
+ }
|
|
|
+ if m.id == nil || m.oldValue == nil {
|
|
|
+ return v, errors.New("OldActionLabelAdd requires an ID field in the mutation")
|
|
|
+ }
|
|
|
+ oldValue, err := m.oldValue(ctx)
|
|
|
+ if err != nil {
|
|
|
+ return v, fmt.Errorf("querying old value for OldActionLabelAdd: %w", err)
|
|
|
+ }
|
|
|
+ return oldValue.ActionLabelAdd, nil
|
|
|
+}
|
|
|
+
|
|
|
+// AppendActionLabelAdd adds u to the "action_label_add" field.
|
|
|
+func (m *SopStageMutation) AppendActionLabelAdd(u []uint64) {
|
|
|
+ m.appendaction_label_add = append(m.appendaction_label_add, u...)
|
|
|
+}
|
|
|
+
|
|
|
+// AppendedActionLabelAdd returns the list of values that were appended to the "action_label_add" field in this mutation.
|
|
|
+func (m *SopStageMutation) AppendedActionLabelAdd() ([]uint64, bool) {
|
|
|
+ if len(m.appendaction_label_add) == 0 {
|
|
|
+ return nil, false
|
|
|
+ }
|
|
|
+ return m.appendaction_label_add, true
|
|
|
+}
|
|
|
+
|
|
|
+// ClearActionLabelAdd clears the value of the "action_label_add" field.
|
|
|
+func (m *SopStageMutation) ClearActionLabelAdd() {
|
|
|
+ m.action_label_add = nil
|
|
|
+ m.appendaction_label_add = nil
|
|
|
+ m.clearedFields[sopstage.FieldActionLabelAdd] = struct{}{}
|
|
|
}
|
|
|
|
|
|
-// ActionLabel returns the value of the "action_label" field in the mutation.
|
|
|
-func (m *SopStageMutation) ActionLabel() (r []uint64, exists bool) {
|
|
|
- v := m.action_label
|
|
|
+// ActionLabelAddCleared returns if the "action_label_add" field was cleared in this mutation.
|
|
|
+func (m *SopStageMutation) ActionLabelAddCleared() bool {
|
|
|
+ _, ok := m.clearedFields[sopstage.FieldActionLabelAdd]
|
|
|
+ return ok
|
|
|
+}
|
|
|
+
|
|
|
+// ResetActionLabelAdd resets all changes to the "action_label_add" field.
|
|
|
+func (m *SopStageMutation) ResetActionLabelAdd() {
|
|
|
+ m.action_label_add = nil
|
|
|
+ m.appendaction_label_add = nil
|
|
|
+ delete(m.clearedFields, sopstage.FieldActionLabelAdd)
|
|
|
+}
|
|
|
+
|
|
|
+// SetActionLabelDel sets the "action_label_del" field.
|
|
|
+func (m *SopStageMutation) SetActionLabelDel(u []uint64) {
|
|
|
+ m.action_label_del = &u
|
|
|
+ m.appendaction_label_del = nil
|
|
|
+}
|
|
|
+
|
|
|
+// ActionLabelDel returns the value of the "action_label_del" field in the mutation.
|
|
|
+func (m *SopStageMutation) ActionLabelDel() (r []uint64, exists bool) {
|
|
|
+ v := m.action_label_del
|
|
|
if v == nil {
|
|
|
return
|
|
|
}
|
|
|
return *v, true
|
|
|
}
|
|
|
|
|
|
-// OldActionLabel returns the old "action_label" field's value of the SopStage entity.
|
|
|
+// OldActionLabelDel returns the old "action_label_del" field's value of the SopStage entity.
|
|
|
// If the SopStage 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 *SopStageMutation) OldActionLabel(ctx context.Context) (v []uint64, err error) {
|
|
|
+func (m *SopStageMutation) OldActionLabelDel(ctx context.Context) (v []uint64, err error) {
|
|
|
if !m.op.Is(OpUpdateOne) {
|
|
|
- return v, errors.New("OldActionLabel is only allowed on UpdateOne operations")
|
|
|
+ return v, errors.New("OldActionLabelDel is only allowed on UpdateOne operations")
|
|
|
}
|
|
|
if m.id == nil || m.oldValue == nil {
|
|
|
- return v, errors.New("OldActionLabel requires an ID field in the mutation")
|
|
|
+ return v, errors.New("OldActionLabelDel requires an ID field in the mutation")
|
|
|
}
|
|
|
oldValue, err := m.oldValue(ctx)
|
|
|
if err != nil {
|
|
|
- return v, fmt.Errorf("querying old value for OldActionLabel: %w", err)
|
|
|
+ return v, fmt.Errorf("querying old value for OldActionLabelDel: %w", err)
|
|
|
}
|
|
|
- return oldValue.ActionLabel, nil
|
|
|
+ return oldValue.ActionLabelDel, nil
|
|
|
}
|
|
|
|
|
|
-// AppendActionLabel adds u to the "action_label" field.
|
|
|
-func (m *SopStageMutation) AppendActionLabel(u []uint64) {
|
|
|
- m.appendaction_label = append(m.appendaction_label, u...)
|
|
|
+// AppendActionLabelDel adds u to the "action_label_del" field.
|
|
|
+func (m *SopStageMutation) AppendActionLabelDel(u []uint64) {
|
|
|
+ m.appendaction_label_del = append(m.appendaction_label_del, u...)
|
|
|
}
|
|
|
|
|
|
-// AppendedActionLabel returns the list of values that were appended to the "action_label" field in this mutation.
|
|
|
-func (m *SopStageMutation) AppendedActionLabel() ([]uint64, bool) {
|
|
|
- if len(m.appendaction_label) == 0 {
|
|
|
+// AppendedActionLabelDel returns the list of values that were appended to the "action_label_del" field in this mutation.
|
|
|
+func (m *SopStageMutation) AppendedActionLabelDel() ([]uint64, bool) {
|
|
|
+ if len(m.appendaction_label_del) == 0 {
|
|
|
return nil, false
|
|
|
}
|
|
|
- return m.appendaction_label, true
|
|
|
+ return m.appendaction_label_del, true
|
|
|
}
|
|
|
|
|
|
-// ClearActionLabel clears the value of the "action_label" field.
|
|
|
-func (m *SopStageMutation) ClearActionLabel() {
|
|
|
- m.action_label = nil
|
|
|
- m.appendaction_label = nil
|
|
|
- m.clearedFields[sopstage.FieldActionLabel] = struct{}{}
|
|
|
+// ClearActionLabelDel clears the value of the "action_label_del" field.
|
|
|
+func (m *SopStageMutation) ClearActionLabelDel() {
|
|
|
+ m.action_label_del = nil
|
|
|
+ m.appendaction_label_del = nil
|
|
|
+ m.clearedFields[sopstage.FieldActionLabelDel] = struct{}{}
|
|
|
}
|
|
|
|
|
|
-// ActionLabelCleared returns if the "action_label" field was cleared in this mutation.
|
|
|
-func (m *SopStageMutation) ActionLabelCleared() bool {
|
|
|
- _, ok := m.clearedFields[sopstage.FieldActionLabel]
|
|
|
+// ActionLabelDelCleared returns if the "action_label_del" field was cleared in this mutation.
|
|
|
+func (m *SopStageMutation) ActionLabelDelCleared() bool {
|
|
|
+ _, ok := m.clearedFields[sopstage.FieldActionLabelDel]
|
|
|
return ok
|
|
|
}
|
|
|
|
|
|
-// ResetActionLabel resets all changes to the "action_label" field.
|
|
|
-func (m *SopStageMutation) ResetActionLabel() {
|
|
|
- m.action_label = nil
|
|
|
- m.appendaction_label = nil
|
|
|
- delete(m.clearedFields, sopstage.FieldActionLabel)
|
|
|
+// ResetActionLabelDel resets all changes to the "action_label_del" field.
|
|
|
+func (m *SopStageMutation) ResetActionLabelDel() {
|
|
|
+ m.action_label_del = nil
|
|
|
+ m.appendaction_label_del = nil
|
|
|
+ delete(m.clearedFields, sopstage.FieldActionLabelDel)
|
|
|
}
|
|
|
|
|
|
// SetActionForward sets the "action_forward" field.
|
|
@@ -17192,7 +17403,7 @@ func (m *SopStageMutation) Type() string {
|
|
|
// order to get all numeric fields that were incremented/decremented, call
|
|
|
// AddedFields().
|
|
|
func (m *SopStageMutation) Fields() []string {
|
|
|
- fields := make([]string, 0, 13)
|
|
|
+ fields := make([]string, 0, 14)
|
|
|
if m.created_at != nil {
|
|
|
fields = append(fields, sopstage.FieldCreatedAt)
|
|
|
}
|
|
@@ -17223,8 +17434,11 @@ func (m *SopStageMutation) Fields() []string {
|
|
|
if m.action_message != nil {
|
|
|
fields = append(fields, sopstage.FieldActionMessage)
|
|
|
}
|
|
|
- if m.action_label != nil {
|
|
|
- fields = append(fields, sopstage.FieldActionLabel)
|
|
|
+ if m.action_label_add != nil {
|
|
|
+ fields = append(fields, sopstage.FieldActionLabelAdd)
|
|
|
+ }
|
|
|
+ if m.action_label_del != nil {
|
|
|
+ fields = append(fields, sopstage.FieldActionLabelDel)
|
|
|
}
|
|
|
if m.action_forward != nil {
|
|
|
fields = append(fields, sopstage.FieldActionForward)
|
|
@@ -17260,8 +17474,10 @@ func (m *SopStageMutation) Field(name string) (ent.Value, bool) {
|
|
|
return m.ConditionList()
|
|
|
case sopstage.FieldActionMessage:
|
|
|
return m.ActionMessage()
|
|
|
- case sopstage.FieldActionLabel:
|
|
|
- return m.ActionLabel()
|
|
|
+ case sopstage.FieldActionLabelAdd:
|
|
|
+ return m.ActionLabelAdd()
|
|
|
+ case sopstage.FieldActionLabelDel:
|
|
|
+ return m.ActionLabelDel()
|
|
|
case sopstage.FieldActionForward:
|
|
|
return m.ActionForward()
|
|
|
case sopstage.FieldIndexSort:
|
|
@@ -17295,8 +17511,10 @@ func (m *SopStageMutation) OldField(ctx context.Context, name string) (ent.Value
|
|
|
return m.OldConditionList(ctx)
|
|
|
case sopstage.FieldActionMessage:
|
|
|
return m.OldActionMessage(ctx)
|
|
|
- case sopstage.FieldActionLabel:
|
|
|
- return m.OldActionLabel(ctx)
|
|
|
+ case sopstage.FieldActionLabelAdd:
|
|
|
+ return m.OldActionLabelAdd(ctx)
|
|
|
+ case sopstage.FieldActionLabelDel:
|
|
|
+ return m.OldActionLabelDel(ctx)
|
|
|
case sopstage.FieldActionForward:
|
|
|
return m.OldActionForward(ctx)
|
|
|
case sopstage.FieldIndexSort:
|
|
@@ -17380,12 +17598,19 @@ func (m *SopStageMutation) SetField(name string, value ent.Value) error {
|
|
|
}
|
|
|
m.SetActionMessage(v)
|
|
|
return nil
|
|
|
- case sopstage.FieldActionLabel:
|
|
|
+ case sopstage.FieldActionLabelAdd:
|
|
|
v, ok := value.([]uint64)
|
|
|
if !ok {
|
|
|
return fmt.Errorf("unexpected type %T for field %s", value, name)
|
|
|
}
|
|
|
- m.SetActionLabel(v)
|
|
|
+ m.SetActionLabelAdd(v)
|
|
|
+ return nil
|
|
|
+ case sopstage.FieldActionLabelDel:
|
|
|
+ v, ok := value.([]uint64)
|
|
|
+ if !ok {
|
|
|
+ return fmt.Errorf("unexpected type %T for field %s", value, name)
|
|
|
+ }
|
|
|
+ m.SetActionLabelDel(v)
|
|
|
return nil
|
|
|
case sopstage.FieldActionForward:
|
|
|
v, ok := value.(*custom_types.ActionForward)
|
|
@@ -17491,8 +17716,11 @@ func (m *SopStageMutation) ClearedFields() []string {
|
|
|
if m.FieldCleared(sopstage.FieldActionMessage) {
|
|
|
fields = append(fields, sopstage.FieldActionMessage)
|
|
|
}
|
|
|
- if m.FieldCleared(sopstage.FieldActionLabel) {
|
|
|
- fields = append(fields, sopstage.FieldActionLabel)
|
|
|
+ if m.FieldCleared(sopstage.FieldActionLabelAdd) {
|
|
|
+ fields = append(fields, sopstage.FieldActionLabelAdd)
|
|
|
+ }
|
|
|
+ if m.FieldCleared(sopstage.FieldActionLabelDel) {
|
|
|
+ fields = append(fields, sopstage.FieldActionLabelDel)
|
|
|
}
|
|
|
if m.FieldCleared(sopstage.FieldActionForward) {
|
|
|
fields = append(fields, sopstage.FieldActionForward)
|
|
@@ -17523,8 +17751,11 @@ func (m *SopStageMutation) ClearField(name string) error {
|
|
|
case sopstage.FieldActionMessage:
|
|
|
m.ClearActionMessage()
|
|
|
return nil
|
|
|
- case sopstage.FieldActionLabel:
|
|
|
- m.ClearActionLabel()
|
|
|
+ case sopstage.FieldActionLabelAdd:
|
|
|
+ m.ClearActionLabelAdd()
|
|
|
+ return nil
|
|
|
+ case sopstage.FieldActionLabelDel:
|
|
|
+ m.ClearActionLabelDel()
|
|
|
return nil
|
|
|
case sopstage.FieldActionForward:
|
|
|
m.ClearActionForward()
|
|
@@ -17570,8 +17801,11 @@ func (m *SopStageMutation) ResetField(name string) error {
|
|
|
case sopstage.FieldActionMessage:
|
|
|
m.ResetActionMessage()
|
|
|
return nil
|
|
|
- case sopstage.FieldActionLabel:
|
|
|
- m.ResetActionLabel()
|
|
|
+ case sopstage.FieldActionLabelAdd:
|
|
|
+ m.ResetActionLabelAdd()
|
|
|
+ return nil
|
|
|
+ case sopstage.FieldActionLabelDel:
|
|
|
+ m.ResetActionLabelDel()
|
|
|
return nil
|
|
|
case sopstage.FieldActionForward:
|
|
|
m.ResetActionForward()
|