mirror of
https://github.com/hay-kot/homebox.git
synced 2025-07-26 12:30:27 +00:00
remove currency validation
This commit is contained in:
parent
2240617c8e
commit
e647419eed
11 changed files with 92 additions and 143 deletions
|
@ -25,7 +25,7 @@ type Group struct {
|
|||
// Name holds the value of the "name" field.
|
||||
Name string `json:"name,omitempty"`
|
||||
// Currency holds the value of the "currency" field.
|
||||
Currency group.Currency `json:"currency,omitempty"`
|
||||
Currency string `json:"currency,omitempty"`
|
||||
// Edges holds the relations/edges for other nodes in the graph.
|
||||
// The values are being populated by the GroupQuery when eager-loading is set.
|
||||
Edges GroupEdges `json:"edges"`
|
||||
|
@ -170,7 +170,7 @@ func (gr *Group) assignValues(columns []string, values []any) error {
|
|||
if value, ok := values[i].(*sql.NullString); !ok {
|
||||
return fmt.Errorf("unexpected type %T for field currency", values[i])
|
||||
} else if value.Valid {
|
||||
gr.Currency = group.Currency(value.String)
|
||||
gr.Currency = value.String
|
||||
}
|
||||
default:
|
||||
gr.selectValues.Set(columns[i], values[i])
|
||||
|
@ -253,7 +253,7 @@ func (gr *Group) String() string {
|
|||
builder.WriteString(gr.Name)
|
||||
builder.WriteString(", ")
|
||||
builder.WriteString("currency=")
|
||||
builder.WriteString(fmt.Sprintf("%v", gr.Currency))
|
||||
builder.WriteString(gr.Currency)
|
||||
builder.WriteByte(')')
|
||||
return builder.String()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue