chore: apply stashed changes
This commit is contained in:
@@ -5542,6 +5542,8 @@ type GroupMutation struct {
|
||||
model_routing *map[string][]int64
|
||||
model_routing_enabled *bool
|
||||
mcp_xml_inject *bool
|
||||
supported_model_scopes *[]string
|
||||
appendsupported_model_scopes []string
|
||||
clearedFields map[string]struct{}
|
||||
api_keys map[int64]struct{}
|
||||
removedapi_keys map[int64]struct{}
|
||||
@@ -6843,6 +6845,57 @@ func (m *GroupMutation) ResetMcpXMLInject() {
|
||||
m.mcp_xml_inject = nil
|
||||
}
|
||||
|
||||
// SetSupportedModelScopes sets the "supported_model_scopes" field.
|
||||
func (m *GroupMutation) SetSupportedModelScopes(s []string) {
|
||||
m.supported_model_scopes = &s
|
||||
m.appendsupported_model_scopes = nil
|
||||
}
|
||||
|
||||
// SupportedModelScopes returns the value of the "supported_model_scopes" field in the mutation.
|
||||
func (m *GroupMutation) SupportedModelScopes() (r []string, exists bool) {
|
||||
v := m.supported_model_scopes
|
||||
if v == nil {
|
||||
return
|
||||
}
|
||||
return *v, true
|
||||
}
|
||||
|
||||
// OldSupportedModelScopes returns the old "supported_model_scopes" field's value of the Group entity.
|
||||
// If the Group 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 *GroupMutation) OldSupportedModelScopes(ctx context.Context) (v []string, err error) {
|
||||
if !m.op.Is(OpUpdateOne) {
|
||||
return v, errors.New("OldSupportedModelScopes is only allowed on UpdateOne operations")
|
||||
}
|
||||
if m.id == nil || m.oldValue == nil {
|
||||
return v, errors.New("OldSupportedModelScopes requires an ID field in the mutation")
|
||||
}
|
||||
oldValue, err := m.oldValue(ctx)
|
||||
if err != nil {
|
||||
return v, fmt.Errorf("querying old value for OldSupportedModelScopes: %w", err)
|
||||
}
|
||||
return oldValue.SupportedModelScopes, nil
|
||||
}
|
||||
|
||||
// AppendSupportedModelScopes adds s to the "supported_model_scopes" field.
|
||||
func (m *GroupMutation) AppendSupportedModelScopes(s []string) {
|
||||
m.appendsupported_model_scopes = append(m.appendsupported_model_scopes, s...)
|
||||
}
|
||||
|
||||
// AppendedSupportedModelScopes returns the list of values that were appended to the "supported_model_scopes" field in this mutation.
|
||||
func (m *GroupMutation) AppendedSupportedModelScopes() ([]string, bool) {
|
||||
if len(m.appendsupported_model_scopes) == 0 {
|
||||
return nil, false
|
||||
}
|
||||
return m.appendsupported_model_scopes, true
|
||||
}
|
||||
|
||||
// ResetSupportedModelScopes resets all changes to the "supported_model_scopes" field.
|
||||
func (m *GroupMutation) ResetSupportedModelScopes() {
|
||||
m.supported_model_scopes = nil
|
||||
m.appendsupported_model_scopes = nil
|
||||
}
|
||||
|
||||
// AddAPIKeyIDs adds the "api_keys" edge to the APIKey entity by ids.
|
||||
func (m *GroupMutation) AddAPIKeyIDs(ids ...int64) {
|
||||
if m.api_keys == nil {
|
||||
@@ -7201,7 +7254,7 @@ func (m *GroupMutation) Type() string {
|
||||
// order to get all numeric fields that were incremented/decremented, call
|
||||
// AddedFields().
|
||||
func (m *GroupMutation) Fields() []string {
|
||||
fields := make([]string, 0, 23)
|
||||
fields := make([]string, 0, 24)
|
||||
if m.created_at != nil {
|
||||
fields = append(fields, group.FieldCreatedAt)
|
||||
}
|
||||
@@ -7271,6 +7324,9 @@ func (m *GroupMutation) Fields() []string {
|
||||
if m.mcp_xml_inject != nil {
|
||||
fields = append(fields, group.FieldMcpXMLInject)
|
||||
}
|
||||
if m.supported_model_scopes != nil {
|
||||
fields = append(fields, group.FieldSupportedModelScopes)
|
||||
}
|
||||
return fields
|
||||
}
|
||||
|
||||
@@ -7325,6 +7381,8 @@ func (m *GroupMutation) Field(name string) (ent.Value, bool) {
|
||||
return m.ModelRoutingEnabled()
|
||||
case group.FieldMcpXMLInject:
|
||||
return m.McpXMLInject()
|
||||
case group.FieldSupportedModelScopes:
|
||||
return m.SupportedModelScopes()
|
||||
}
|
||||
return nil, false
|
||||
}
|
||||
@@ -7380,6 +7438,8 @@ func (m *GroupMutation) OldField(ctx context.Context, name string) (ent.Value, e
|
||||
return m.OldModelRoutingEnabled(ctx)
|
||||
case group.FieldMcpXMLInject:
|
||||
return m.OldMcpXMLInject(ctx)
|
||||
case group.FieldSupportedModelScopes:
|
||||
return m.OldSupportedModelScopes(ctx)
|
||||
}
|
||||
return nil, fmt.Errorf("unknown Group field %s", name)
|
||||
}
|
||||
@@ -7550,6 +7610,13 @@ func (m *GroupMutation) SetField(name string, value ent.Value) error {
|
||||
}
|
||||
m.SetMcpXMLInject(v)
|
||||
return nil
|
||||
case group.FieldSupportedModelScopes:
|
||||
v, ok := value.([]string)
|
||||
if !ok {
|
||||
return fmt.Errorf("unexpected type %T for field %s", value, name)
|
||||
}
|
||||
m.SetSupportedModelScopes(v)
|
||||
return nil
|
||||
}
|
||||
return fmt.Errorf("unknown Group field %s", name)
|
||||
}
|
||||
@@ -7860,6 +7927,9 @@ func (m *GroupMutation) ResetField(name string) error {
|
||||
case group.FieldMcpXMLInject:
|
||||
m.ResetMcpXMLInject()
|
||||
return nil
|
||||
case group.FieldSupportedModelScopes:
|
||||
m.ResetSupportedModelScopes()
|
||||
return nil
|
||||
}
|
||||
return fmt.Errorf("unknown Group field %s", name)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user