|
@@ -1194,6 +1194,7 @@ type BatchMsgMutation struct {
|
|
|
fromwxid *string
|
|
|
msg *string
|
|
|
tag *string
|
|
|
+ tagids *string
|
|
|
total *int32
|
|
|
addtotal *int32
|
|
|
success *int32
|
|
@@ -1202,6 +1203,7 @@ type BatchMsgMutation struct {
|
|
|
addfail *int32
|
|
|
start_time *time.Time
|
|
|
stop_time *time.Time
|
|
|
+ send_time *time.Time
|
|
|
_type *int32
|
|
|
add_type *int32
|
|
|
organization_id *uint64
|
|
@@ -1752,6 +1754,55 @@ func (m *BatchMsgMutation) ResetTag() {
|
|
|
delete(m.clearedFields, batchmsg.FieldTag)
|
|
|
}
|
|
|
|
|
|
+// SetTagids sets the "tagids" field.
|
|
|
+func (m *BatchMsgMutation) SetTagids(s string) {
|
|
|
+ m.tagids = &s
|
|
|
+}
|
|
|
+
|
|
|
+// Tagids returns the value of the "tagids" field in the mutation.
|
|
|
+func (m *BatchMsgMutation) Tagids() (r string, exists bool) {
|
|
|
+ v := m.tagids
|
|
|
+ if v == nil {
|
|
|
+ return
|
|
|
+ }
|
|
|
+ return *v, true
|
|
|
+}
|
|
|
+
|
|
|
+// OldTagids returns the old "tagids" field's value of the BatchMsg entity.
|
|
|
+// If the BatchMsg 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 *BatchMsgMutation) OldTagids(ctx context.Context) (v string, err error) {
|
|
|
+ if !m.op.Is(OpUpdateOne) {
|
|
|
+ return v, errors.New("OldTagids is only allowed on UpdateOne operations")
|
|
|
+ }
|
|
|
+ if m.id == nil || m.oldValue == nil {
|
|
|
+ return v, errors.New("OldTagids requires an ID field in the mutation")
|
|
|
+ }
|
|
|
+ oldValue, err := m.oldValue(ctx)
|
|
|
+ if err != nil {
|
|
|
+ return v, fmt.Errorf("querying old value for OldTagids: %w", err)
|
|
|
+ }
|
|
|
+ return oldValue.Tagids, nil
|
|
|
+}
|
|
|
+
|
|
|
+// ClearTagids clears the value of the "tagids" field.
|
|
|
+func (m *BatchMsgMutation) ClearTagids() {
|
|
|
+ m.tagids = nil
|
|
|
+ m.clearedFields[batchmsg.FieldTagids] = struct{}{}
|
|
|
+}
|
|
|
+
|
|
|
+// TagidsCleared returns if the "tagids" field was cleared in this mutation.
|
|
|
+func (m *BatchMsgMutation) TagidsCleared() bool {
|
|
|
+ _, ok := m.clearedFields[batchmsg.FieldTagids]
|
|
|
+ return ok
|
|
|
+}
|
|
|
+
|
|
|
+// ResetTagids resets all changes to the "tagids" field.
|
|
|
+func (m *BatchMsgMutation) ResetTagids() {
|
|
|
+ m.tagids = nil
|
|
|
+ delete(m.clearedFields, batchmsg.FieldTagids)
|
|
|
+}
|
|
|
+
|
|
|
// SetTotal sets the "total" field.
|
|
|
func (m *BatchMsgMutation) SetTotal(i int32) {
|
|
|
m.total = &i
|
|
@@ -2060,6 +2111,55 @@ func (m *BatchMsgMutation) ResetStopTime() {
|
|
|
delete(m.clearedFields, batchmsg.FieldStopTime)
|
|
|
}
|
|
|
|
|
|
+// SetSendTime sets the "send_time" field.
|
|
|
+func (m *BatchMsgMutation) SetSendTime(t time.Time) {
|
|
|
+ m.send_time = &t
|
|
|
+}
|
|
|
+
|
|
|
+// SendTime returns the value of the "send_time" field in the mutation.
|
|
|
+func (m *BatchMsgMutation) SendTime() (r time.Time, exists bool) {
|
|
|
+ v := m.send_time
|
|
|
+ if v == nil {
|
|
|
+ return
|
|
|
+ }
|
|
|
+ return *v, true
|
|
|
+}
|
|
|
+
|
|
|
+// OldSendTime returns the old "send_time" field's value of the BatchMsg entity.
|
|
|
+// If the BatchMsg 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 *BatchMsgMutation) OldSendTime(ctx context.Context) (v time.Time, err error) {
|
|
|
+ if !m.op.Is(OpUpdateOne) {
|
|
|
+ return v, errors.New("OldSendTime is only allowed on UpdateOne operations")
|
|
|
+ }
|
|
|
+ if m.id == nil || m.oldValue == nil {
|
|
|
+ return v, errors.New("OldSendTime requires an ID field in the mutation")
|
|
|
+ }
|
|
|
+ oldValue, err := m.oldValue(ctx)
|
|
|
+ if err != nil {
|
|
|
+ return v, fmt.Errorf("querying old value for OldSendTime: %w", err)
|
|
|
+ }
|
|
|
+ return oldValue.SendTime, nil
|
|
|
+}
|
|
|
+
|
|
|
+// ClearSendTime clears the value of the "send_time" field.
|
|
|
+func (m *BatchMsgMutation) ClearSendTime() {
|
|
|
+ m.send_time = nil
|
|
|
+ m.clearedFields[batchmsg.FieldSendTime] = struct{}{}
|
|
|
+}
|
|
|
+
|
|
|
+// SendTimeCleared returns if the "send_time" field was cleared in this mutation.
|
|
|
+func (m *BatchMsgMutation) SendTimeCleared() bool {
|
|
|
+ _, ok := m.clearedFields[batchmsg.FieldSendTime]
|
|
|
+ return ok
|
|
|
+}
|
|
|
+
|
|
|
+// ResetSendTime resets all changes to the "send_time" field.
|
|
|
+func (m *BatchMsgMutation) ResetSendTime() {
|
|
|
+ m.send_time = nil
|
|
|
+ delete(m.clearedFields, batchmsg.FieldSendTime)
|
|
|
+}
|
|
|
+
|
|
|
// SetType sets the "type" field.
|
|
|
func (m *BatchMsgMutation) SetType(i int32) {
|
|
|
m._type = &i
|
|
@@ -2220,7 +2320,7 @@ func (m *BatchMsgMutation) Type() string {
|
|
|
// order to get all numeric fields that were incremented/decremented, call
|
|
|
// AddedFields().
|
|
|
func (m *BatchMsgMutation) Fields() []string {
|
|
|
- fields := make([]string, 0, 16)
|
|
|
+ fields := make([]string, 0, 18)
|
|
|
if m.created_at != nil {
|
|
|
fields = append(fields, batchmsg.FieldCreatedAt)
|
|
|
}
|
|
@@ -2248,6 +2348,9 @@ func (m *BatchMsgMutation) Fields() []string {
|
|
|
if m.tag != nil {
|
|
|
fields = append(fields, batchmsg.FieldTag)
|
|
|
}
|
|
|
+ if m.tagids != nil {
|
|
|
+ fields = append(fields, batchmsg.FieldTagids)
|
|
|
+ }
|
|
|
if m.total != nil {
|
|
|
fields = append(fields, batchmsg.FieldTotal)
|
|
|
}
|
|
@@ -2263,6 +2366,9 @@ func (m *BatchMsgMutation) Fields() []string {
|
|
|
if m.stop_time != nil {
|
|
|
fields = append(fields, batchmsg.FieldStopTime)
|
|
|
}
|
|
|
+ if m.send_time != nil {
|
|
|
+ fields = append(fields, batchmsg.FieldSendTime)
|
|
|
+ }
|
|
|
if m._type != nil {
|
|
|
fields = append(fields, batchmsg.FieldType)
|
|
|
}
|
|
@@ -2295,6 +2401,8 @@ func (m *BatchMsgMutation) Field(name string) (ent.Value, bool) {
|
|
|
return m.Msg()
|
|
|
case batchmsg.FieldTag:
|
|
|
return m.Tag()
|
|
|
+ case batchmsg.FieldTagids:
|
|
|
+ return m.Tagids()
|
|
|
case batchmsg.FieldTotal:
|
|
|
return m.Total()
|
|
|
case batchmsg.FieldSuccess:
|
|
@@ -2305,6 +2413,8 @@ func (m *BatchMsgMutation) Field(name string) (ent.Value, bool) {
|
|
|
return m.StartTime()
|
|
|
case batchmsg.FieldStopTime:
|
|
|
return m.StopTime()
|
|
|
+ case batchmsg.FieldSendTime:
|
|
|
+ return m.SendTime()
|
|
|
case batchmsg.FieldType:
|
|
|
return m.GetType()
|
|
|
case batchmsg.FieldOrganizationID:
|
|
@@ -2336,6 +2446,8 @@ func (m *BatchMsgMutation) OldField(ctx context.Context, name string) (ent.Value
|
|
|
return m.OldMsg(ctx)
|
|
|
case batchmsg.FieldTag:
|
|
|
return m.OldTag(ctx)
|
|
|
+ case batchmsg.FieldTagids:
|
|
|
+ return m.OldTagids(ctx)
|
|
|
case batchmsg.FieldTotal:
|
|
|
return m.OldTotal(ctx)
|
|
|
case batchmsg.FieldSuccess:
|
|
@@ -2346,6 +2458,8 @@ func (m *BatchMsgMutation) OldField(ctx context.Context, name string) (ent.Value
|
|
|
return m.OldStartTime(ctx)
|
|
|
case batchmsg.FieldStopTime:
|
|
|
return m.OldStopTime(ctx)
|
|
|
+ case batchmsg.FieldSendTime:
|
|
|
+ return m.OldSendTime(ctx)
|
|
|
case batchmsg.FieldType:
|
|
|
return m.OldType(ctx)
|
|
|
case batchmsg.FieldOrganizationID:
|
|
@@ -2422,6 +2536,13 @@ func (m *BatchMsgMutation) SetField(name string, value ent.Value) error {
|
|
|
}
|
|
|
m.SetTag(v)
|
|
|
return nil
|
|
|
+ case batchmsg.FieldTagids:
|
|
|
+ v, ok := value.(string)
|
|
|
+ if !ok {
|
|
|
+ return fmt.Errorf("unexpected type %T for field %s", value, name)
|
|
|
+ }
|
|
|
+ m.SetTagids(v)
|
|
|
+ return nil
|
|
|
case batchmsg.FieldTotal:
|
|
|
v, ok := value.(int32)
|
|
|
if !ok {
|
|
@@ -2457,6 +2578,13 @@ func (m *BatchMsgMutation) SetField(name string, value ent.Value) error {
|
|
|
}
|
|
|
m.SetStopTime(v)
|
|
|
return nil
|
|
|
+ case batchmsg.FieldSendTime:
|
|
|
+ v, ok := value.(time.Time)
|
|
|
+ if !ok {
|
|
|
+ return fmt.Errorf("unexpected type %T for field %s", value, name)
|
|
|
+ }
|
|
|
+ m.SetSendTime(v)
|
|
|
+ return nil
|
|
|
case batchmsg.FieldType:
|
|
|
v, ok := value.(int32)
|
|
|
if !ok {
|
|
@@ -2597,6 +2725,9 @@ func (m *BatchMsgMutation) ClearedFields() []string {
|
|
|
if m.FieldCleared(batchmsg.FieldTag) {
|
|
|
fields = append(fields, batchmsg.FieldTag)
|
|
|
}
|
|
|
+ if m.FieldCleared(batchmsg.FieldTagids) {
|
|
|
+ fields = append(fields, batchmsg.FieldTagids)
|
|
|
+ }
|
|
|
if m.FieldCleared(batchmsg.FieldTotal) {
|
|
|
fields = append(fields, batchmsg.FieldTotal)
|
|
|
}
|
|
@@ -2612,6 +2743,9 @@ func (m *BatchMsgMutation) ClearedFields() []string {
|
|
|
if m.FieldCleared(batchmsg.FieldStopTime) {
|
|
|
fields = append(fields, batchmsg.FieldStopTime)
|
|
|
}
|
|
|
+ if m.FieldCleared(batchmsg.FieldSendTime) {
|
|
|
+ fields = append(fields, batchmsg.FieldSendTime)
|
|
|
+ }
|
|
|
if m.FieldCleared(batchmsg.FieldType) {
|
|
|
fields = append(fields, batchmsg.FieldType)
|
|
|
}
|
|
@@ -2650,6 +2784,9 @@ func (m *BatchMsgMutation) ClearField(name string) error {
|
|
|
case batchmsg.FieldTag:
|
|
|
m.ClearTag()
|
|
|
return nil
|
|
|
+ case batchmsg.FieldTagids:
|
|
|
+ m.ClearTagids()
|
|
|
+ return nil
|
|
|
case batchmsg.FieldTotal:
|
|
|
m.ClearTotal()
|
|
|
return nil
|
|
@@ -2665,6 +2802,9 @@ func (m *BatchMsgMutation) ClearField(name string) error {
|
|
|
case batchmsg.FieldStopTime:
|
|
|
m.ClearStopTime()
|
|
|
return nil
|
|
|
+ case batchmsg.FieldSendTime:
|
|
|
+ m.ClearSendTime()
|
|
|
+ return nil
|
|
|
case batchmsg.FieldType:
|
|
|
m.ClearType()
|
|
|
return nil
|
|
@@ -2703,6 +2843,9 @@ func (m *BatchMsgMutation) ResetField(name string) error {
|
|
|
case batchmsg.FieldTag:
|
|
|
m.ResetTag()
|
|
|
return nil
|
|
|
+ case batchmsg.FieldTagids:
|
|
|
+ m.ResetTagids()
|
|
|
+ return nil
|
|
|
case batchmsg.FieldTotal:
|
|
|
m.ResetTotal()
|
|
|
return nil
|
|
@@ -2718,6 +2861,9 @@ func (m *BatchMsgMutation) ResetField(name string) error {
|
|
|
case batchmsg.FieldStopTime:
|
|
|
m.ResetStopTime()
|
|
|
return nil
|
|
|
+ case batchmsg.FieldSendTime:
|
|
|
+ m.ResetSendTime()
|
|
|
+ return nil
|
|
|
case batchmsg.FieldType:
|
|
|
m.ResetType()
|
|
|
return nil
|