|
@@ -15789,8 +15789,6 @@ type LabelMutation struct {
|
|
|
conditions *string
|
|
|
organization_id *uint64
|
|
|
addorganization_id *int64
|
|
|
- ctype *uint64
|
|
|
- addctype *int64
|
|
|
clearedFields map[string]struct{}
|
|
|
label_relationships map[uint64]struct{}
|
|
|
removedlabel_relationships map[uint64]struct{}
|
|
@@ -16369,62 +16367,6 @@ func (m *LabelMutation) ResetOrganizationID() {
|
|
|
delete(m.clearedFields, label.FieldOrganizationID)
|
|
|
}
|
|
|
|
|
|
-// SetCtype sets the "ctype" field.
|
|
|
-func (m *LabelMutation) SetCtype(u uint64) {
|
|
|
- m.ctype = &u
|
|
|
- m.addctype = nil
|
|
|
-}
|
|
|
-
|
|
|
-// Ctype returns the value of the "ctype" field in the mutation.
|
|
|
-func (m *LabelMutation) Ctype() (r uint64, exists bool) {
|
|
|
- v := m.ctype
|
|
|
- if v == nil {
|
|
|
- return
|
|
|
- }
|
|
|
- return *v, true
|
|
|
-}
|
|
|
-
|
|
|
-// OldCtype returns the old "ctype" field's value of the Label entity.
|
|
|
-// If the Label 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 *LabelMutation) OldCtype(ctx context.Context) (v uint64, err error) {
|
|
|
- if !m.op.Is(OpUpdateOne) {
|
|
|
- return v, errors.New("OldCtype is only allowed on UpdateOne operations")
|
|
|
- }
|
|
|
- if m.id == nil || m.oldValue == nil {
|
|
|
- return v, errors.New("OldCtype requires an ID field in the mutation")
|
|
|
- }
|
|
|
- oldValue, err := m.oldValue(ctx)
|
|
|
- if err != nil {
|
|
|
- return v, fmt.Errorf("querying old value for OldCtype: %w", err)
|
|
|
- }
|
|
|
- return oldValue.Ctype, nil
|
|
|
-}
|
|
|
-
|
|
|
-// AddCtype adds u to the "ctype" field.
|
|
|
-func (m *LabelMutation) AddCtype(u int64) {
|
|
|
- if m.addctype != nil {
|
|
|
- *m.addctype += u
|
|
|
- } else {
|
|
|
- m.addctype = &u
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-// AddedCtype returns the value that was added to the "ctype" field in this mutation.
|
|
|
-func (m *LabelMutation) AddedCtype() (r int64, exists bool) {
|
|
|
- v := m.addctype
|
|
|
- if v == nil {
|
|
|
- return
|
|
|
- }
|
|
|
- return *v, true
|
|
|
-}
|
|
|
-
|
|
|
-// ResetCtype resets all changes to the "ctype" field.
|
|
|
-func (m *LabelMutation) ResetCtype() {
|
|
|
- m.ctype = nil
|
|
|
- m.addctype = nil
|
|
|
-}
|
|
|
-
|
|
|
// AddLabelRelationshipIDs adds the "label_relationships" edge to the LabelRelationship entity by ids.
|
|
|
func (m *LabelMutation) AddLabelRelationshipIDs(ids ...uint64) {
|
|
|
if m.label_relationships == nil {
|
|
@@ -16513,7 +16455,7 @@ func (m *LabelMutation) Type() string {
|
|
|
// order to get all numeric fields that were incremented/decremented, call
|
|
|
// AddedFields().
|
|
|
func (m *LabelMutation) Fields() []string {
|
|
|
- fields := make([]string, 0, 10)
|
|
|
+ fields := make([]string, 0, 9)
|
|
|
if m.created_at != nil {
|
|
|
fields = append(fields, label.FieldCreatedAt)
|
|
|
}
|
|
@@ -16541,9 +16483,6 @@ func (m *LabelMutation) Fields() []string {
|
|
|
if m.organization_id != nil {
|
|
|
fields = append(fields, label.FieldOrganizationID)
|
|
|
}
|
|
|
- if m.ctype != nil {
|
|
|
- fields = append(fields, label.FieldCtype)
|
|
|
- }
|
|
|
return fields
|
|
|
}
|
|
|
|
|
@@ -16570,8 +16509,6 @@ func (m *LabelMutation) Field(name string) (ent.Value, bool) {
|
|
|
return m.Conditions()
|
|
|
case label.FieldOrganizationID:
|
|
|
return m.OrganizationID()
|
|
|
- case label.FieldCtype:
|
|
|
- return m.Ctype()
|
|
|
}
|
|
|
return nil, false
|
|
|
}
|
|
@@ -16599,8 +16536,6 @@ func (m *LabelMutation) OldField(ctx context.Context, name string) (ent.Value, e
|
|
|
return m.OldConditions(ctx)
|
|
|
case label.FieldOrganizationID:
|
|
|
return m.OldOrganizationID(ctx)
|
|
|
- case label.FieldCtype:
|
|
|
- return m.OldCtype(ctx)
|
|
|
}
|
|
|
return nil, fmt.Errorf("unknown Label field %s", name)
|
|
|
}
|
|
@@ -16673,13 +16608,6 @@ func (m *LabelMutation) SetField(name string, value ent.Value) error {
|
|
|
}
|
|
|
m.SetOrganizationID(v)
|
|
|
return nil
|
|
|
- case label.FieldCtype:
|
|
|
- v, ok := value.(uint64)
|
|
|
- if !ok {
|
|
|
- return fmt.Errorf("unexpected type %T for field %s", value, name)
|
|
|
- }
|
|
|
- m.SetCtype(v)
|
|
|
- return nil
|
|
|
}
|
|
|
return fmt.Errorf("unknown Label field %s", name)
|
|
|
}
|
|
@@ -16703,9 +16631,6 @@ func (m *LabelMutation) AddedFields() []string {
|
|
|
if m.addorganization_id != nil {
|
|
|
fields = append(fields, label.FieldOrganizationID)
|
|
|
}
|
|
|
- if m.addctype != nil {
|
|
|
- fields = append(fields, label.FieldCtype)
|
|
|
- }
|
|
|
return fields
|
|
|
}
|
|
|
|
|
@@ -16724,8 +16649,6 @@ func (m *LabelMutation) AddedField(name string) (ent.Value, bool) {
|
|
|
return m.AddedMode()
|
|
|
case label.FieldOrganizationID:
|
|
|
return m.AddedOrganizationID()
|
|
|
- case label.FieldCtype:
|
|
|
- return m.AddedCtype()
|
|
|
}
|
|
|
return nil, false
|
|
|
}
|
|
@@ -16770,13 +16693,6 @@ func (m *LabelMutation) AddField(name string, value ent.Value) error {
|
|
|
}
|
|
|
m.AddOrganizationID(v)
|
|
|
return nil
|
|
|
- case label.FieldCtype:
|
|
|
- v, ok := value.(int64)
|
|
|
- if !ok {
|
|
|
- return fmt.Errorf("unexpected type %T for field %s", value, name)
|
|
|
- }
|
|
|
- m.AddCtype(v)
|
|
|
- return nil
|
|
|
}
|
|
|
return fmt.Errorf("unknown Label numeric field %s", name)
|
|
|
}
|
|
@@ -16852,9 +16768,6 @@ func (m *LabelMutation) ResetField(name string) error {
|
|
|
case label.FieldOrganizationID:
|
|
|
m.ResetOrganizationID()
|
|
|
return nil
|
|
|
- case label.FieldCtype:
|
|
|
- m.ResetCtype()
|
|
|
- return nil
|
|
|
}
|
|
|
return fmt.Errorf("unknown Label field %s", name)
|
|
|
}
|
|
@@ -16955,8 +16868,6 @@ type LabelRelationshipMutation struct {
|
|
|
addstatus *int8
|
|
|
organization_id *uint64
|
|
|
addorganization_id *int64
|
|
|
- ctype *uint64
|
|
|
- addctype *int64
|
|
|
clearedFields map[string]struct{}
|
|
|
contacts *uint64
|
|
|
clearedcontacts bool
|
|
@@ -17355,62 +17266,6 @@ func (m *LabelRelationshipMutation) ResetOrganizationID() {
|
|
|
delete(m.clearedFields, labelrelationship.FieldOrganizationID)
|
|
|
}
|
|
|
|
|
|
-// SetCtype sets the "ctype" field.
|
|
|
-func (m *LabelRelationshipMutation) SetCtype(u uint64) {
|
|
|
- m.ctype = &u
|
|
|
- m.addctype = nil
|
|
|
-}
|
|
|
-
|
|
|
-// Ctype returns the value of the "ctype" field in the mutation.
|
|
|
-func (m *LabelRelationshipMutation) Ctype() (r uint64, exists bool) {
|
|
|
- v := m.ctype
|
|
|
- if v == nil {
|
|
|
- return
|
|
|
- }
|
|
|
- return *v, true
|
|
|
-}
|
|
|
-
|
|
|
-// OldCtype returns the old "ctype" field's value of the LabelRelationship entity.
|
|
|
-// If the LabelRelationship 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 *LabelRelationshipMutation) OldCtype(ctx context.Context) (v uint64, err error) {
|
|
|
- if !m.op.Is(OpUpdateOne) {
|
|
|
- return v, errors.New("OldCtype is only allowed on UpdateOne operations")
|
|
|
- }
|
|
|
- if m.id == nil || m.oldValue == nil {
|
|
|
- return v, errors.New("OldCtype requires an ID field in the mutation")
|
|
|
- }
|
|
|
- oldValue, err := m.oldValue(ctx)
|
|
|
- if err != nil {
|
|
|
- return v, fmt.Errorf("querying old value for OldCtype: %w", err)
|
|
|
- }
|
|
|
- return oldValue.Ctype, nil
|
|
|
-}
|
|
|
-
|
|
|
-// AddCtype adds u to the "ctype" field.
|
|
|
-func (m *LabelRelationshipMutation) AddCtype(u int64) {
|
|
|
- if m.addctype != nil {
|
|
|
- *m.addctype += u
|
|
|
- } else {
|
|
|
- m.addctype = &u
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-// AddedCtype returns the value that was added to the "ctype" field in this mutation.
|
|
|
-func (m *LabelRelationshipMutation) AddedCtype() (r int64, exists bool) {
|
|
|
- v := m.addctype
|
|
|
- if v == nil {
|
|
|
- return
|
|
|
- }
|
|
|
- return *v, true
|
|
|
-}
|
|
|
-
|
|
|
-// ResetCtype resets all changes to the "ctype" field.
|
|
|
-func (m *LabelRelationshipMutation) ResetCtype() {
|
|
|
- m.ctype = nil
|
|
|
- m.addctype = nil
|
|
|
-}
|
|
|
-
|
|
|
// SetContactsID sets the "contacts" edge to the Contact entity by id.
|
|
|
func (m *LabelRelationshipMutation) SetContactsID(id uint64) {
|
|
|
m.contacts = &id
|
|
@@ -17525,7 +17380,7 @@ func (m *LabelRelationshipMutation) Type() string {
|
|
|
// order to get all numeric fields that were incremented/decremented, call
|
|
|
// AddedFields().
|
|
|
func (m *LabelRelationshipMutation) Fields() []string {
|
|
|
- fields := make([]string, 0, 7)
|
|
|
+ fields := make([]string, 0, 6)
|
|
|
if m.created_at != nil {
|
|
|
fields = append(fields, labelrelationship.FieldCreatedAt)
|
|
|
}
|
|
@@ -17544,9 +17399,6 @@ func (m *LabelRelationshipMutation) Fields() []string {
|
|
|
if m.organization_id != nil {
|
|
|
fields = append(fields, labelrelationship.FieldOrganizationID)
|
|
|
}
|
|
|
- if m.ctype != nil {
|
|
|
- fields = append(fields, labelrelationship.FieldCtype)
|
|
|
- }
|
|
|
return fields
|
|
|
}
|
|
|
|
|
@@ -17567,8 +17419,6 @@ func (m *LabelRelationshipMutation) Field(name string) (ent.Value, bool) {
|
|
|
return m.ContactID()
|
|
|
case labelrelationship.FieldOrganizationID:
|
|
|
return m.OrganizationID()
|
|
|
- case labelrelationship.FieldCtype:
|
|
|
- return m.Ctype()
|
|
|
}
|
|
|
return nil, false
|
|
|
}
|
|
@@ -17590,8 +17440,6 @@ func (m *LabelRelationshipMutation) OldField(ctx context.Context, name string) (
|
|
|
return m.OldContactID(ctx)
|
|
|
case labelrelationship.FieldOrganizationID:
|
|
|
return m.OldOrganizationID(ctx)
|
|
|
- case labelrelationship.FieldCtype:
|
|
|
- return m.OldCtype(ctx)
|
|
|
}
|
|
|
return nil, fmt.Errorf("unknown LabelRelationship field %s", name)
|
|
|
}
|
|
@@ -17643,13 +17491,6 @@ func (m *LabelRelationshipMutation) SetField(name string, value ent.Value) error
|
|
|
}
|
|
|
m.SetOrganizationID(v)
|
|
|
return nil
|
|
|
- case labelrelationship.FieldCtype:
|
|
|
- v, ok := value.(uint64)
|
|
|
- if !ok {
|
|
|
- return fmt.Errorf("unexpected type %T for field %s", value, name)
|
|
|
- }
|
|
|
- m.SetCtype(v)
|
|
|
- return nil
|
|
|
}
|
|
|
return fmt.Errorf("unknown LabelRelationship field %s", name)
|
|
|
}
|
|
@@ -17664,9 +17505,6 @@ func (m *LabelRelationshipMutation) AddedFields() []string {
|
|
|
if m.addorganization_id != nil {
|
|
|
fields = append(fields, labelrelationship.FieldOrganizationID)
|
|
|
}
|
|
|
- if m.addctype != nil {
|
|
|
- fields = append(fields, labelrelationship.FieldCtype)
|
|
|
- }
|
|
|
return fields
|
|
|
}
|
|
|
|
|
@@ -17679,8 +17517,6 @@ func (m *LabelRelationshipMutation) AddedField(name string) (ent.Value, bool) {
|
|
|
return m.AddedStatus()
|
|
|
case labelrelationship.FieldOrganizationID:
|
|
|
return m.AddedOrganizationID()
|
|
|
- case labelrelationship.FieldCtype:
|
|
|
- return m.AddedCtype()
|
|
|
}
|
|
|
return nil, false
|
|
|
}
|
|
@@ -17704,13 +17540,6 @@ func (m *LabelRelationshipMutation) AddField(name string, value ent.Value) error
|
|
|
}
|
|
|
m.AddOrganizationID(v)
|
|
|
return nil
|
|
|
- case labelrelationship.FieldCtype:
|
|
|
- v, ok := value.(int64)
|
|
|
- if !ok {
|
|
|
- return fmt.Errorf("unexpected type %T for field %s", value, name)
|
|
|
- }
|
|
|
- m.AddCtype(v)
|
|
|
- return nil
|
|
|
}
|
|
|
return fmt.Errorf("unknown LabelRelationship numeric field %s", name)
|
|
|
}
|
|
@@ -17771,9 +17600,6 @@ func (m *LabelRelationshipMutation) ResetField(name string) error {
|
|
|
case labelrelationship.FieldOrganizationID:
|
|
|
m.ResetOrganizationID()
|
|
|
return nil
|
|
|
- case labelrelationship.FieldCtype:
|
|
|
- m.ResetCtype()
|
|
|
- return nil
|
|
|
}
|
|
|
return fmt.Errorf("unknown LabelRelationship field %s", name)
|
|
|
}
|