mirror of
https://github.com/hay-kot/homebox.git
synced 2025-07-26 04:20:28 +00:00
feat: items-editor (#5)
* format readme * update logo * format html * add logo to docs * repository for document and document tokens * add attachments type and repository * autogenerate types via scripts * use autogenerated types * attachment type updates * add insured and quantity fields for items * implement HasID interface for entities * implement label updates for items * implement service update method * WIP item update client side actions * check err on attachment * finish types for basic items editor * remove unused var * house keeping
This commit is contained in:
parent
fbc364dcd2
commit
95ab14b866
125 changed files with 15626 additions and 1791 deletions
|
@ -40,9 +40,11 @@ type GroupEdges struct {
|
|||
Items []*Item `json:"items,omitempty"`
|
||||
// Labels holds the value of the labels edge.
|
||||
Labels []*Label `json:"labels,omitempty"`
|
||||
// Documents holds the value of the documents edge.
|
||||
Documents []*Document `json:"documents,omitempty"`
|
||||
// loadedTypes holds the information for reporting if a
|
||||
// type was loaded (or requested) in eager-loading or not.
|
||||
loadedTypes [4]bool
|
||||
loadedTypes [5]bool
|
||||
}
|
||||
|
||||
// UsersOrErr returns the Users value or an error if the edge
|
||||
|
@ -81,6 +83,15 @@ func (e GroupEdges) LabelsOrErr() ([]*Label, error) {
|
|||
return nil, &NotLoadedError{edge: "labels"}
|
||||
}
|
||||
|
||||
// DocumentsOrErr returns the Documents value or an error if the edge
|
||||
// was not loaded in eager-loading.
|
||||
func (e GroupEdges) DocumentsOrErr() ([]*Document, error) {
|
||||
if e.loadedTypes[4] {
|
||||
return e.Documents, nil
|
||||
}
|
||||
return nil, &NotLoadedError{edge: "documents"}
|
||||
}
|
||||
|
||||
// scanValues returns the types for scanning values from sql.Rows.
|
||||
func (*Group) scanValues(columns []string) ([]interface{}, error) {
|
||||
values := make([]interface{}, len(columns))
|
||||
|
@ -162,6 +173,11 @@ func (gr *Group) QueryLabels() *LabelQuery {
|
|||
return (&GroupClient{config: gr.config}).QueryLabels(gr)
|
||||
}
|
||||
|
||||
// QueryDocuments queries the "documents" edge of the Group entity.
|
||||
func (gr *Group) QueryDocuments() *DocumentQuery {
|
||||
return (&GroupClient{config: gr.config}).QueryDocuments(gr)
|
||||
}
|
||||
|
||||
// Update returns a builder for updating this Group.
|
||||
// Note that you need to call Group.Unwrap() before calling this method if this Group
|
||||
// was returned from a transaction, and the transaction was committed or rolled back.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue