|
@@ -36959,10 +36959,10 @@ type WhatsappMutation struct {
|
|
|
status *uint8
|
|
|
addstatus *int8
|
|
|
deleted_at *time.Time
|
|
|
- wa_id *uint64
|
|
|
- addwa_id *int64
|
|
|
+ wa_id *string
|
|
|
callback *string
|
|
|
account *string
|
|
|
+ cc *string
|
|
|
phone *string
|
|
|
phone_name *string
|
|
|
phone_status *int8
|
|
@@ -37283,13 +37283,12 @@ func (m *WhatsappMutation) ResetDeletedAt() {
|
|
|
}
|
|
|
|
|
|
// SetWaID sets the "wa_id" field.
|
|
|
-func (m *WhatsappMutation) SetWaID(u uint64) {
|
|
|
- m.wa_id = &u
|
|
|
- m.addwa_id = nil
|
|
|
+func (m *WhatsappMutation) SetWaID(s string) {
|
|
|
+ m.wa_id = &s
|
|
|
}
|
|
|
|
|
|
// WaID returns the value of the "wa_id" field in the mutation.
|
|
|
-func (m *WhatsappMutation) WaID() (r uint64, exists bool) {
|
|
|
+func (m *WhatsappMutation) WaID() (r string, exists bool) {
|
|
|
v := m.wa_id
|
|
|
if v == nil {
|
|
|
return
|
|
@@ -37300,7 +37299,7 @@ func (m *WhatsappMutation) WaID() (r uint64, exists bool) {
|
|
|
// OldWaID returns the old "wa_id" field's value of the Whatsapp entity.
|
|
|
// If the Whatsapp 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 *WhatsappMutation) OldWaID(ctx context.Context) (v uint64, err error) {
|
|
|
+func (m *WhatsappMutation) OldWaID(ctx context.Context) (v string, err error) {
|
|
|
if !m.op.Is(OpUpdateOne) {
|
|
|
return v, errors.New("OldWaID is only allowed on UpdateOne operations")
|
|
|
}
|
|
@@ -37314,28 +37313,9 @@ func (m *WhatsappMutation) OldWaID(ctx context.Context) (v uint64, err error) {
|
|
|
return oldValue.WaID, nil
|
|
|
}
|
|
|
|
|
|
-// AddWaID adds u to the "wa_id" field.
|
|
|
-func (m *WhatsappMutation) AddWaID(u int64) {
|
|
|
- if m.addwa_id != nil {
|
|
|
- *m.addwa_id += u
|
|
|
- } else {
|
|
|
- m.addwa_id = &u
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-// AddedWaID returns the value that was added to the "wa_id" field in this mutation.
|
|
|
-func (m *WhatsappMutation) AddedWaID() (r int64, exists bool) {
|
|
|
- v := m.addwa_id
|
|
|
- if v == nil {
|
|
|
- return
|
|
|
- }
|
|
|
- return *v, true
|
|
|
-}
|
|
|
-
|
|
|
// ClearWaID clears the value of the "wa_id" field.
|
|
|
func (m *WhatsappMutation) ClearWaID() {
|
|
|
m.wa_id = nil
|
|
|
- m.addwa_id = nil
|
|
|
m.clearedFields[whatsapp.FieldWaID] = struct{}{}
|
|
|
}
|
|
|
|
|
@@ -37348,7 +37328,6 @@ func (m *WhatsappMutation) WaIDCleared() bool {
|
|
|
// ResetWaID resets all changes to the "wa_id" field.
|
|
|
func (m *WhatsappMutation) ResetWaID() {
|
|
|
m.wa_id = nil
|
|
|
- m.addwa_id = nil
|
|
|
delete(m.clearedFields, whatsapp.FieldWaID)
|
|
|
}
|
|
|
|
|
@@ -37486,6 +37465,42 @@ func (m *WhatsappMutation) ResetAccount() {
|
|
|
delete(m.clearedFields, whatsapp.FieldAccount)
|
|
|
}
|
|
|
|
|
|
+// SetCc sets the "cc" field.
|
|
|
+func (m *WhatsappMutation) SetCc(s string) {
|
|
|
+ m.cc = &s
|
|
|
+}
|
|
|
+
|
|
|
+// Cc returns the value of the "cc" field in the mutation.
|
|
|
+func (m *WhatsappMutation) Cc() (r string, exists bool) {
|
|
|
+ v := m.cc
|
|
|
+ if v == nil {
|
|
|
+ return
|
|
|
+ }
|
|
|
+ return *v, true
|
|
|
+}
|
|
|
+
|
|
|
+// OldCc returns the old "cc" field's value of the Whatsapp entity.
|
|
|
+// If the Whatsapp 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 *WhatsappMutation) OldCc(ctx context.Context) (v string, err error) {
|
|
|
+ if !m.op.Is(OpUpdateOne) {
|
|
|
+ return v, errors.New("OldCc is only allowed on UpdateOne operations")
|
|
|
+ }
|
|
|
+ if m.id == nil || m.oldValue == nil {
|
|
|
+ return v, errors.New("OldCc requires an ID field in the mutation")
|
|
|
+ }
|
|
|
+ oldValue, err := m.oldValue(ctx)
|
|
|
+ if err != nil {
|
|
|
+ return v, fmt.Errorf("querying old value for OldCc: %w", err)
|
|
|
+ }
|
|
|
+ return oldValue.Cc, nil
|
|
|
+}
|
|
|
+
|
|
|
+// ResetCc resets all changes to the "cc" field.
|
|
|
+func (m *WhatsappMutation) ResetCc() {
|
|
|
+ m.cc = nil
|
|
|
+}
|
|
|
+
|
|
|
// SetPhone sets the "phone" field.
|
|
|
func (m *WhatsappMutation) SetPhone(s string) {
|
|
|
m.phone = &s
|
|
@@ -38103,7 +38118,7 @@ func (m *WhatsappMutation) Type() string {
|
|
|
// order to get all numeric fields that were incremented/decremented, call
|
|
|
// AddedFields().
|
|
|
func (m *WhatsappMutation) Fields() []string {
|
|
|
- fields := make([]string, 0, 18)
|
|
|
+ fields := make([]string, 0, 19)
|
|
|
if m.created_at != nil {
|
|
|
fields = append(fields, whatsapp.FieldCreatedAt)
|
|
|
}
|
|
@@ -38128,6 +38143,9 @@ func (m *WhatsappMutation) Fields() []string {
|
|
|
if m.account != nil {
|
|
|
fields = append(fields, whatsapp.FieldAccount)
|
|
|
}
|
|
|
+ if m.cc != nil {
|
|
|
+ fields = append(fields, whatsapp.FieldCc)
|
|
|
+ }
|
|
|
if m.phone != nil {
|
|
|
fields = append(fields, whatsapp.FieldPhone)
|
|
|
}
|
|
@@ -38182,6 +38200,8 @@ func (m *WhatsappMutation) Field(name string) (ent.Value, bool) {
|
|
|
return m.AgentID()
|
|
|
case whatsapp.FieldAccount:
|
|
|
return m.Account()
|
|
|
+ case whatsapp.FieldCc:
|
|
|
+ return m.Cc()
|
|
|
case whatsapp.FieldPhone:
|
|
|
return m.Phone()
|
|
|
case whatsapp.FieldPhoneName:
|
|
@@ -38227,6 +38247,8 @@ func (m *WhatsappMutation) OldField(ctx context.Context, name string) (ent.Value
|
|
|
return m.OldAgentID(ctx)
|
|
|
case whatsapp.FieldAccount:
|
|
|
return m.OldAccount(ctx)
|
|
|
+ case whatsapp.FieldCc:
|
|
|
+ return m.OldCc(ctx)
|
|
|
case whatsapp.FieldPhone:
|
|
|
return m.OldPhone(ctx)
|
|
|
case whatsapp.FieldPhoneName:
|
|
@@ -38285,7 +38307,7 @@ func (m *WhatsappMutation) SetField(name string, value ent.Value) error {
|
|
|
m.SetDeletedAt(v)
|
|
|
return nil
|
|
|
case whatsapp.FieldWaID:
|
|
|
- v, ok := value.(uint64)
|
|
|
+ v, ok := value.(string)
|
|
|
if !ok {
|
|
|
return fmt.Errorf("unexpected type %T for field %s", value, name)
|
|
|
}
|
|
@@ -38312,6 +38334,13 @@ func (m *WhatsappMutation) SetField(name string, value ent.Value) error {
|
|
|
}
|
|
|
m.SetAccount(v)
|
|
|
return nil
|
|
|
+ case whatsapp.FieldCc:
|
|
|
+ v, ok := value.(string)
|
|
|
+ if !ok {
|
|
|
+ return fmt.Errorf("unexpected type %T for field %s", value, name)
|
|
|
+ }
|
|
|
+ m.SetCc(v)
|
|
|
+ return nil
|
|
|
case whatsapp.FieldPhone:
|
|
|
v, ok := value.(string)
|
|
|
if !ok {
|
|
@@ -38393,9 +38422,6 @@ func (m *WhatsappMutation) AddedFields() []string {
|
|
|
if m.addstatus != nil {
|
|
|
fields = append(fields, whatsapp.FieldStatus)
|
|
|
}
|
|
|
- if m.addwa_id != nil {
|
|
|
- fields = append(fields, whatsapp.FieldWaID)
|
|
|
- }
|
|
|
if m.addphone_status != nil {
|
|
|
fields = append(fields, whatsapp.FieldPhoneStatus)
|
|
|
}
|
|
@@ -38412,8 +38438,6 @@ func (m *WhatsappMutation) AddedField(name string) (ent.Value, bool) {
|
|
|
switch name {
|
|
|
case whatsapp.FieldStatus:
|
|
|
return m.AddedStatus()
|
|
|
- case whatsapp.FieldWaID:
|
|
|
- return m.AddedWaID()
|
|
|
case whatsapp.FieldPhoneStatus:
|
|
|
return m.AddedPhoneStatus()
|
|
|
case whatsapp.FieldOrganizationID:
|
|
@@ -38434,13 +38458,6 @@ func (m *WhatsappMutation) AddField(name string, value ent.Value) error {
|
|
|
}
|
|
|
m.AddStatus(v)
|
|
|
return nil
|
|
|
- case whatsapp.FieldWaID:
|
|
|
- v, ok := value.(int64)
|
|
|
- if !ok {
|
|
|
- return fmt.Errorf("unexpected type %T for field %s", value, name)
|
|
|
- }
|
|
|
- m.AddWaID(v)
|
|
|
- return nil
|
|
|
case whatsapp.FieldPhoneStatus:
|
|
|
v, ok := value.(int8)
|
|
|
if !ok {
|
|
@@ -38581,6 +38598,9 @@ func (m *WhatsappMutation) ResetField(name string) error {
|
|
|
case whatsapp.FieldAccount:
|
|
|
m.ResetAccount()
|
|
|
return nil
|
|
|
+ case whatsapp.FieldCc:
|
|
|
+ m.ResetCc()
|
|
|
+ return nil
|
|
|
case whatsapp.FieldPhone:
|
|
|
m.ResetPhone()
|
|
|
return nil
|
|
@@ -38702,8 +38722,7 @@ type WhatsappChannelMutation struct {
|
|
|
deleted_at *time.Time
|
|
|
ak *string
|
|
|
sk *string
|
|
|
- wa_id *uint64
|
|
|
- addwa_id *int64
|
|
|
+ wa_id *string
|
|
|
wa_name *string
|
|
|
waba_id *uint64
|
|
|
addwaba_id *int64
|
|
@@ -39099,13 +39118,12 @@ func (m *WhatsappChannelMutation) ResetSk() {
|
|
|
}
|
|
|
|
|
|
// SetWaID sets the "wa_id" field.
|
|
|
-func (m *WhatsappChannelMutation) SetWaID(u uint64) {
|
|
|
- m.wa_id = &u
|
|
|
- m.addwa_id = nil
|
|
|
+func (m *WhatsappChannelMutation) SetWaID(s string) {
|
|
|
+ m.wa_id = &s
|
|
|
}
|
|
|
|
|
|
// WaID returns the value of the "wa_id" field in the mutation.
|
|
|
-func (m *WhatsappChannelMutation) WaID() (r uint64, exists bool) {
|
|
|
+func (m *WhatsappChannelMutation) WaID() (r string, exists bool) {
|
|
|
v := m.wa_id
|
|
|
if v == nil {
|
|
|
return
|
|
@@ -39116,7 +39134,7 @@ func (m *WhatsappChannelMutation) WaID() (r uint64, exists bool) {
|
|
|
// OldWaID returns the old "wa_id" field's value of the WhatsappChannel entity.
|
|
|
// If the WhatsappChannel 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 *WhatsappChannelMutation) OldWaID(ctx context.Context) (v uint64, err error) {
|
|
|
+func (m *WhatsappChannelMutation) OldWaID(ctx context.Context) (v string, err error) {
|
|
|
if !m.op.Is(OpUpdateOne) {
|
|
|
return v, errors.New("OldWaID is only allowed on UpdateOne operations")
|
|
|
}
|
|
@@ -39130,28 +39148,9 @@ func (m *WhatsappChannelMutation) OldWaID(ctx context.Context) (v uint64, err er
|
|
|
return oldValue.WaID, nil
|
|
|
}
|
|
|
|
|
|
-// AddWaID adds u to the "wa_id" field.
|
|
|
-func (m *WhatsappChannelMutation) AddWaID(u int64) {
|
|
|
- if m.addwa_id != nil {
|
|
|
- *m.addwa_id += u
|
|
|
- } else {
|
|
|
- m.addwa_id = &u
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-// AddedWaID returns the value that was added to the "wa_id" field in this mutation.
|
|
|
-func (m *WhatsappChannelMutation) AddedWaID() (r int64, exists bool) {
|
|
|
- v := m.addwa_id
|
|
|
- if v == nil {
|
|
|
- return
|
|
|
- }
|
|
|
- return *v, true
|
|
|
-}
|
|
|
-
|
|
|
// ClearWaID clears the value of the "wa_id" field.
|
|
|
func (m *WhatsappChannelMutation) ClearWaID() {
|
|
|
m.wa_id = nil
|
|
|
- m.addwa_id = nil
|
|
|
m.clearedFields[whatsappchannel.FieldWaID] = struct{}{}
|
|
|
}
|
|
|
|
|
@@ -39164,7 +39163,6 @@ func (m *WhatsappChannelMutation) WaIDCleared() bool {
|
|
|
// ResetWaID resets all changes to the "wa_id" field.
|
|
|
func (m *WhatsappChannelMutation) ResetWaID() {
|
|
|
m.wa_id = nil
|
|
|
- m.addwa_id = nil
|
|
|
delete(m.clearedFields, whatsappchannel.FieldWaID)
|
|
|
}
|
|
|
|
|
@@ -39623,7 +39621,7 @@ func (m *WhatsappChannelMutation) SetField(name string, value ent.Value) error {
|
|
|
m.SetSk(v)
|
|
|
return nil
|
|
|
case whatsappchannel.FieldWaID:
|
|
|
- v, ok := value.(uint64)
|
|
|
+ v, ok := value.(string)
|
|
|
if !ok {
|
|
|
return fmt.Errorf("unexpected type %T for field %s", value, name)
|
|
|
}
|
|
@@ -39675,9 +39673,6 @@ func (m *WhatsappChannelMutation) AddedFields() []string {
|
|
|
if m.addstatus != nil {
|
|
|
fields = append(fields, whatsappchannel.FieldStatus)
|
|
|
}
|
|
|
- if m.addwa_id != nil {
|
|
|
- fields = append(fields, whatsappchannel.FieldWaID)
|
|
|
- }
|
|
|
if m.addwaba_id != nil {
|
|
|
fields = append(fields, whatsappchannel.FieldWabaID)
|
|
|
}
|
|
@@ -39697,8 +39692,6 @@ func (m *WhatsappChannelMutation) AddedField(name string) (ent.Value, bool) {
|
|
|
switch name {
|
|
|
case whatsappchannel.FieldStatus:
|
|
|
return m.AddedStatus()
|
|
|
- case whatsappchannel.FieldWaID:
|
|
|
- return m.AddedWaID()
|
|
|
case whatsappchannel.FieldWabaID:
|
|
|
return m.AddedWabaID()
|
|
|
case whatsappchannel.FieldBusinessID:
|
|
@@ -39721,13 +39714,6 @@ func (m *WhatsappChannelMutation) AddField(name string, value ent.Value) error {
|
|
|
}
|
|
|
m.AddStatus(v)
|
|
|
return nil
|
|
|
- case whatsappchannel.FieldWaID:
|
|
|
- v, ok := value.(int64)
|
|
|
- if !ok {
|
|
|
- return fmt.Errorf("unexpected type %T for field %s", value, name)
|
|
|
- }
|
|
|
- m.AddWaID(v)
|
|
|
- return nil
|
|
|
case whatsappchannel.FieldWabaID:
|
|
|
v, ok := value.(int64)
|
|
|
if !ok {
|