mirror of
https://github.com/hay-kot/homebox.git
synced 2025-06-27 22:28:35 +00:00
chore: bump all go deps (#507)
* bump all deps
* run code-gen
Former-commit-id: a042496c71
This commit is contained in:
parent
feab9f4c46
commit
a3e607a887
96 changed files with 1651 additions and 491 deletions
|
@ -7,6 +7,7 @@ import (
|
|||
"strings"
|
||||
"time"
|
||||
|
||||
"entgo.io/ent"
|
||||
"entgo.io/ent/dialect/sql"
|
||||
"github.com/google/uuid"
|
||||
"github.com/hay-kot/homebox/backend/internal/data/ent/group"
|
||||
|
@ -35,7 +36,8 @@ type Notifier struct {
|
|||
IsActive bool `json:"is_active,omitempty"`
|
||||
// Edges holds the relations/edges for other nodes in the graph.
|
||||
// The values are being populated by the NotifierQuery when eager-loading is set.
|
||||
Edges NotifierEdges `json:"edges"`
|
||||
Edges NotifierEdges `json:"edges"`
|
||||
selectValues sql.SelectValues
|
||||
}
|
||||
|
||||
// NotifierEdges holds the relations/edges for other nodes in the graph.
|
||||
|
@ -89,7 +91,7 @@ func (*Notifier) scanValues(columns []string) ([]any, error) {
|
|||
case notifier.FieldID, notifier.FieldGroupID, notifier.FieldUserID:
|
||||
values[i] = new(uuid.UUID)
|
||||
default:
|
||||
return nil, fmt.Errorf("unexpected column %q for type Notifier", columns[i])
|
||||
values[i] = new(sql.UnknownType)
|
||||
}
|
||||
}
|
||||
return values, nil
|
||||
|
@ -151,11 +153,19 @@ func (n *Notifier) assignValues(columns []string, values []any) error {
|
|||
} else if value.Valid {
|
||||
n.IsActive = value.Bool
|
||||
}
|
||||
default:
|
||||
n.selectValues.Set(columns[i], values[i])
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Value returns the ent.Value that was dynamically selected and assigned to the Notifier.
|
||||
// This includes values selected through modifiers, order, etc.
|
||||
func (n *Notifier) Value(name string) (ent.Value, error) {
|
||||
return n.selectValues.Get(name)
|
||||
}
|
||||
|
||||
// QueryGroup queries the "group" edge of the Notifier entity.
|
||||
func (n *Notifier) QueryGroup() *GroupQuery {
|
||||
return NewNotifierClient(n.config).QueryGroup(n)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue