|
@@ -6282,13 +6282,13 @@ type SopNodeMutation struct {
|
|
|
status *uint8
|
|
|
addstatus *int8
|
|
|
deleted_at *time.Time
|
|
|
- parent_id *int
|
|
|
- addparent_id *int
|
|
|
+ parent_id *uint64
|
|
|
+ addparent_id *int64
|
|
|
name *string
|
|
|
condition_type *int
|
|
|
addcondition_type *int
|
|
|
- condition_list *[]custom_types.Condition
|
|
|
- appendcondition_list []custom_types.Condition
|
|
|
+ condition_list *[]string
|
|
|
+ appendcondition_list []string
|
|
|
action_message *[]custom_types.Action
|
|
|
appendaction_message []custom_types.Action
|
|
|
action_label *[]int
|
|
@@ -6633,13 +6633,13 @@ func (m *SopNodeMutation) ResetStageID() {
|
|
|
}
|
|
|
|
|
|
// SetParentID sets the "parent_id" field.
|
|
|
-func (m *SopNodeMutation) SetParentID(i int) {
|
|
|
- m.parent_id = &i
|
|
|
+func (m *SopNodeMutation) SetParentID(u uint64) {
|
|
|
+ m.parent_id = &u
|
|
|
m.addparent_id = nil
|
|
|
}
|
|
|
|
|
|
// ParentID returns the value of the "parent_id" field in the mutation.
|
|
|
-func (m *SopNodeMutation) ParentID() (r int, exists bool) {
|
|
|
+func (m *SopNodeMutation) ParentID() (r uint64, exists bool) {
|
|
|
v := m.parent_id
|
|
|
if v == nil {
|
|
|
return
|
|
@@ -6650,7 +6650,7 @@ func (m *SopNodeMutation) ParentID() (r int, exists bool) {
|
|
|
// OldParentID returns the old "parent_id" 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) OldParentID(ctx context.Context) (v int, err error) {
|
|
|
+func (m *SopNodeMutation) OldParentID(ctx context.Context) (v uint64, err error) {
|
|
|
if !m.op.Is(OpUpdateOne) {
|
|
|
return v, errors.New("OldParentID is only allowed on UpdateOne operations")
|
|
|
}
|
|
@@ -6664,17 +6664,17 @@ func (m *SopNodeMutation) OldParentID(ctx context.Context) (v int, err error) {
|
|
|
return oldValue.ParentID, nil
|
|
|
}
|
|
|
|
|
|
-// AddParentID adds i to the "parent_id" field.
|
|
|
-func (m *SopNodeMutation) AddParentID(i int) {
|
|
|
+// AddParentID adds u to the "parent_id" field.
|
|
|
+func (m *SopNodeMutation) AddParentID(u int64) {
|
|
|
if m.addparent_id != nil {
|
|
|
- *m.addparent_id += i
|
|
|
+ *m.addparent_id += u
|
|
|
} else {
|
|
|
- m.addparent_id = &i
|
|
|
+ m.addparent_id = &u
|
|
|
}
|
|
|
}
|
|
|
|
|
|
// AddedParentID returns the value that was added to the "parent_id" field in this mutation.
|
|
|
-func (m *SopNodeMutation) AddedParentID() (r int, exists bool) {
|
|
|
+func (m *SopNodeMutation) AddedParentID() (r int64, exists bool) {
|
|
|
v := m.addparent_id
|
|
|
if v == nil {
|
|
|
return
|
|
@@ -6781,13 +6781,13 @@ func (m *SopNodeMutation) ResetConditionType() {
|
|
|
}
|
|
|
|
|
|
// SetConditionList sets the "condition_list" field.
|
|
|
-func (m *SopNodeMutation) SetConditionList(ct []custom_types.Condition) {
|
|
|
- m.condition_list = &ct
|
|
|
+func (m *SopNodeMutation) SetConditionList(s []string) {
|
|
|
+ m.condition_list = &s
|
|
|
m.appendcondition_list = nil
|
|
|
}
|
|
|
|
|
|
// ConditionList returns the value of the "condition_list" field in the mutation.
|
|
|
-func (m *SopNodeMutation) ConditionList() (r []custom_types.Condition, exists bool) {
|
|
|
+func (m *SopNodeMutation) ConditionList() (r []string, exists bool) {
|
|
|
v := m.condition_list
|
|
|
if v == nil {
|
|
|
return
|
|
@@ -6798,7 +6798,7 @@ func (m *SopNodeMutation) ConditionList() (r []custom_types.Condition, exists bo
|
|
|
// OldConditionList returns the old "condition_list" 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) OldConditionList(ctx context.Context) (v []custom_types.Condition, err error) {
|
|
|
+func (m *SopNodeMutation) OldConditionList(ctx context.Context) (v []string, err error) {
|
|
|
if !m.op.Is(OpUpdateOne) {
|
|
|
return v, errors.New("OldConditionList is only allowed on UpdateOne operations")
|
|
|
}
|
|
@@ -6812,23 +6812,37 @@ func (m *SopNodeMutation) OldConditionList(ctx context.Context) (v []custom_type
|
|
|
return oldValue.ConditionList, nil
|
|
|
}
|
|
|
|
|
|
-// AppendConditionList adds ct to the "condition_list" field.
|
|
|
-func (m *SopNodeMutation) AppendConditionList(ct []custom_types.Condition) {
|
|
|
- m.appendcondition_list = append(m.appendcondition_list, ct...)
|
|
|
+// AppendConditionList adds s to the "condition_list" field.
|
|
|
+func (m *SopNodeMutation) AppendConditionList(s []string) {
|
|
|
+ m.appendcondition_list = append(m.appendcondition_list, s...)
|
|
|
}
|
|
|
|
|
|
// AppendedConditionList returns the list of values that were appended to the "condition_list" field in this mutation.
|
|
|
-func (m *SopNodeMutation) AppendedConditionList() ([]custom_types.Condition, bool) {
|
|
|
+func (m *SopNodeMutation) AppendedConditionList() ([]string, bool) {
|
|
|
if len(m.appendcondition_list) == 0 {
|
|
|
return nil, false
|
|
|
}
|
|
|
return m.appendcondition_list, true
|
|
|
}
|
|
|
|
|
|
+// ClearConditionList clears the value of the "condition_list" field.
|
|
|
+func (m *SopNodeMutation) ClearConditionList() {
|
|
|
+ m.condition_list = nil
|
|
|
+ m.appendcondition_list = nil
|
|
|
+ m.clearedFields[sopnode.FieldConditionList] = struct{}{}
|
|
|
+}
|
|
|
+
|
|
|
+// ConditionListCleared returns if the "condition_list" field was cleared in this mutation.
|
|
|
+func (m *SopNodeMutation) ConditionListCleared() bool {
|
|
|
+ _, ok := m.clearedFields[sopnode.FieldConditionList]
|
|
|
+ return ok
|
|
|
+}
|
|
|
+
|
|
|
// ResetConditionList resets all changes to the "condition_list" field.
|
|
|
func (m *SopNodeMutation) ResetConditionList() {
|
|
|
m.condition_list = nil
|
|
|
m.appendcondition_list = nil
|
|
|
+ delete(m.clearedFields, sopnode.FieldConditionList)
|
|
|
}
|
|
|
|
|
|
// SetActionMessage sets the "action_message" field.
|
|
@@ -6876,10 +6890,24 @@ func (m *SopNodeMutation) AppendedActionMessage() ([]custom_types.Action, bool)
|
|
|
return m.appendaction_message, true
|
|
|
}
|
|
|
|
|
|
+// ClearActionMessage clears the value of the "action_message" field.
|
|
|
+func (m *SopNodeMutation) ClearActionMessage() {
|
|
|
+ m.action_message = nil
|
|
|
+ m.appendaction_message = nil
|
|
|
+ m.clearedFields[sopnode.FieldActionMessage] = struct{}{}
|
|
|
+}
|
|
|
+
|
|
|
+// ActionMessageCleared returns if the "action_message" field was cleared in this mutation.
|
|
|
+func (m *SopNodeMutation) ActionMessageCleared() bool {
|
|
|
+ _, ok := m.clearedFields[sopnode.FieldActionMessage]
|
|
|
+ return ok
|
|
|
+}
|
|
|
+
|
|
|
// ResetActionMessage resets all changes to the "action_message" field.
|
|
|
func (m *SopNodeMutation) ResetActionMessage() {
|
|
|
m.action_message = nil
|
|
|
m.appendaction_message = nil
|
|
|
+ delete(m.clearedFields, sopnode.FieldActionMessage)
|
|
|
}
|
|
|
|
|
|
// SetActionLabel sets the "action_label" field.
|
|
@@ -6927,10 +6955,24 @@ func (m *SopNodeMutation) AppendedActionLabel() ([]int, bool) {
|
|
|
return m.appendaction_label, 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{}{}
|
|
|
+}
|
|
|
+
|
|
|
+// ActionLabelCleared returns if the "action_label" field was cleared in this mutation.
|
|
|
+func (m *SopNodeMutation) ActionLabelCleared() bool {
|
|
|
+ _, ok := m.clearedFields[sopnode.FieldActionLabel]
|
|
|
+ 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)
|
|
|
}
|
|
|
|
|
|
// SetSopStageID sets the "sop_stage" edge to the SopStage entity by id.
|
|
@@ -7147,7 +7189,7 @@ func (m *SopNodeMutation) SetField(name string, value ent.Value) error {
|
|
|
m.SetStageID(v)
|
|
|
return nil
|
|
|
case sopnode.FieldParentID:
|
|
|
- v, ok := value.(int)
|
|
|
+ v, ok := value.(uint64)
|
|
|
if !ok {
|
|
|
return fmt.Errorf("unexpected type %T for field %s", value, name)
|
|
|
}
|
|
@@ -7168,7 +7210,7 @@ func (m *SopNodeMutation) SetField(name string, value ent.Value) error {
|
|
|
m.SetConditionType(v)
|
|
|
return nil
|
|
|
case sopnode.FieldConditionList:
|
|
|
- v, ok := value.([]custom_types.Condition)
|
|
|
+ v, ok := value.([]string)
|
|
|
if !ok {
|
|
|
return fmt.Errorf("unexpected type %T for field %s", value, name)
|
|
|
}
|
|
@@ -7236,7 +7278,7 @@ func (m *SopNodeMutation) AddField(name string, value ent.Value) error {
|
|
|
m.AddStatus(v)
|
|
|
return nil
|
|
|
case sopnode.FieldParentID:
|
|
|
- v, ok := value.(int)
|
|
|
+ v, ok := value.(int64)
|
|
|
if !ok {
|
|
|
return fmt.Errorf("unexpected type %T for field %s", value, name)
|
|
|
}
|
|
@@ -7263,6 +7305,15 @@ func (m *SopNodeMutation) ClearedFields() []string {
|
|
|
if m.FieldCleared(sopnode.FieldDeletedAt) {
|
|
|
fields = append(fields, sopnode.FieldDeletedAt)
|
|
|
}
|
|
|
+ if m.FieldCleared(sopnode.FieldConditionList) {
|
|
|
+ fields = append(fields, sopnode.FieldConditionList)
|
|
|
+ }
|
|
|
+ if m.FieldCleared(sopnode.FieldActionMessage) {
|
|
|
+ fields = append(fields, sopnode.FieldActionMessage)
|
|
|
+ }
|
|
|
+ if m.FieldCleared(sopnode.FieldActionLabel) {
|
|
|
+ fields = append(fields, sopnode.FieldActionLabel)
|
|
|
+ }
|
|
|
return fields
|
|
|
}
|
|
|
|
|
@@ -7283,6 +7334,15 @@ func (m *SopNodeMutation) ClearField(name string) error {
|
|
|
case sopnode.FieldDeletedAt:
|
|
|
m.ClearDeletedAt()
|
|
|
return nil
|
|
|
+ case sopnode.FieldConditionList:
|
|
|
+ m.ClearConditionList()
|
|
|
+ return nil
|
|
|
+ case sopnode.FieldActionMessage:
|
|
|
+ m.ClearActionMessage()
|
|
|
+ return nil
|
|
|
+ case sopnode.FieldActionLabel:
|
|
|
+ m.ClearActionLabel()
|
|
|
+ return nil
|
|
|
}
|
|
|
return fmt.Errorf("unknown SopNode nullable field %s", name)
|
|
|
}
|
|
@@ -8012,10 +8072,24 @@ func (m *SopStageMutation) AppendedActionMessage() ([]custom_types.Action, bool)
|
|
|
return m.appendaction_message, true
|
|
|
}
|
|
|
|
|
|
+// ClearActionMessage clears the value of the "action_message" field.
|
|
|
+func (m *SopStageMutation) ClearActionMessage() {
|
|
|
+ m.action_message = nil
|
|
|
+ m.appendaction_message = nil
|
|
|
+ m.clearedFields[sopstage.FieldActionMessage] = struct{}{}
|
|
|
+}
|
|
|
+
|
|
|
+// ActionMessageCleared returns if the "action_message" field was cleared in this mutation.
|
|
|
+func (m *SopStageMutation) ActionMessageCleared() bool {
|
|
|
+ _, ok := m.clearedFields[sopstage.FieldActionMessage]
|
|
|
+ return ok
|
|
|
+}
|
|
|
+
|
|
|
// ResetActionMessage resets all changes to the "action_message" field.
|
|
|
func (m *SopStageMutation) ResetActionMessage() {
|
|
|
m.action_message = nil
|
|
|
m.appendaction_message = nil
|
|
|
+ delete(m.clearedFields, sopstage.FieldActionMessage)
|
|
|
}
|
|
|
|
|
|
// SetActionLabel sets the "action_label" field.
|
|
@@ -8063,10 +8137,24 @@ func (m *SopStageMutation) AppendedActionLabel() ([]int, bool) {
|
|
|
return m.appendaction_label, 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{}{}
|
|
|
+}
|
|
|
+
|
|
|
+// ActionLabelCleared returns if the "action_label" field was cleared in this mutation.
|
|
|
+func (m *SopStageMutation) ActionLabelCleared() bool {
|
|
|
+ _, ok := m.clearedFields[sopstage.FieldActionLabel]
|
|
|
+ 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)
|
|
|
}
|
|
|
|
|
|
// SetIndexSort sets the "index_sort" field.
|
|
@@ -8119,10 +8207,24 @@ func (m *SopStageMutation) AddedIndexSort() (r int, exists bool) {
|
|
|
return *v, true
|
|
|
}
|
|
|
|
|
|
+// ClearIndexSort clears the value of the "index_sort" field.
|
|
|
+func (m *SopStageMutation) ClearIndexSort() {
|
|
|
+ m.index_sort = nil
|
|
|
+ m.addindex_sort = nil
|
|
|
+ m.clearedFields[sopstage.FieldIndexSort] = struct{}{}
|
|
|
+}
|
|
|
+
|
|
|
+// IndexSortCleared returns if the "index_sort" field was cleared in this mutation.
|
|
|
+func (m *SopStageMutation) IndexSortCleared() bool {
|
|
|
+ _, ok := m.clearedFields[sopstage.FieldIndexSort]
|
|
|
+ return ok
|
|
|
+}
|
|
|
+
|
|
|
// ResetIndexSort resets all changes to the "index_sort" field.
|
|
|
func (m *SopStageMutation) ResetIndexSort() {
|
|
|
m.index_sort = nil
|
|
|
m.addindex_sort = nil
|
|
|
+ delete(m.clearedFields, sopstage.FieldIndexSort)
|
|
|
}
|
|
|
|
|
|
// SetSopTaskID sets the "sop_task" edge to the SopTask entity by id.
|
|
@@ -8535,6 +8637,15 @@ func (m *SopStageMutation) ClearedFields() []string {
|
|
|
if m.FieldCleared(sopstage.FieldDeletedAt) {
|
|
|
fields = append(fields, sopstage.FieldDeletedAt)
|
|
|
}
|
|
|
+ if m.FieldCleared(sopstage.FieldActionMessage) {
|
|
|
+ fields = append(fields, sopstage.FieldActionMessage)
|
|
|
+ }
|
|
|
+ if m.FieldCleared(sopstage.FieldActionLabel) {
|
|
|
+ fields = append(fields, sopstage.FieldActionLabel)
|
|
|
+ }
|
|
|
+ if m.FieldCleared(sopstage.FieldIndexSort) {
|
|
|
+ fields = append(fields, sopstage.FieldIndexSort)
|
|
|
+ }
|
|
|
return fields
|
|
|
}
|
|
|
|
|
@@ -8555,6 +8666,15 @@ func (m *SopStageMutation) ClearField(name string) error {
|
|
|
case sopstage.FieldDeletedAt:
|
|
|
m.ClearDeletedAt()
|
|
|
return nil
|
|
|
+ case sopstage.FieldActionMessage:
|
|
|
+ m.ClearActionMessage()
|
|
|
+ return nil
|
|
|
+ case sopstage.FieldActionLabel:
|
|
|
+ m.ClearActionLabel()
|
|
|
+ return nil
|
|
|
+ case sopstage.FieldIndexSort:
|
|
|
+ m.ClearIndexSort()
|
|
|
+ return nil
|
|
|
}
|
|
|
return fmt.Errorf("unknown SopStage nullable field %s", name)
|
|
|
}
|