forked from mirrors/homebox
feat: maintenance log (#170)
* remove repo for document tokens * remove schema for doc tokens * fix id template and generate cmd * schema updates * code gen * bump dependencies * fix broken migrations + add maintenance entry type * spelling * remove debug logger * implement repository layer * routes * API client * wip: maintenance log * remove depreciated call
This commit is contained in:
parent
d6da63187b
commit
5bbb969763
79 changed files with 6320 additions and 4957 deletions
|
@ -71,6 +71,8 @@ const (
|
|||
EdgeLocation = "location"
|
||||
// EdgeFields holds the string denoting the fields edge name in mutations.
|
||||
EdgeFields = "fields"
|
||||
// EdgeMaintenanceEntries holds the string denoting the maintenance_entries edge name in mutations.
|
||||
EdgeMaintenanceEntries = "maintenance_entries"
|
||||
// EdgeAttachments holds the string denoting the attachments edge name in mutations.
|
||||
EdgeAttachments = "attachments"
|
||||
// Table holds the table name of the item in the database.
|
||||
|
@ -109,6 +111,13 @@ const (
|
|||
FieldsInverseTable = "item_fields"
|
||||
// FieldsColumn is the table column denoting the fields relation/edge.
|
||||
FieldsColumn = "item_fields"
|
||||
// MaintenanceEntriesTable is the table that holds the maintenance_entries relation/edge.
|
||||
MaintenanceEntriesTable = "maintenance_entries"
|
||||
// MaintenanceEntriesInverseTable is the table name for the MaintenanceEntry entity.
|
||||
// It exists in this package in order to avoid circular dependency with the "maintenanceentry" package.
|
||||
MaintenanceEntriesInverseTable = "maintenance_entries"
|
||||
// MaintenanceEntriesColumn is the table column denoting the maintenance_entries relation/edge.
|
||||
MaintenanceEntriesColumn = "item_id"
|
||||
// AttachmentsTable is the table that holds the attachments relation/edge.
|
||||
AttachmentsTable = "attachments"
|
||||
// AttachmentsInverseTable is the table name for the Attachment entity.
|
||||
|
|
|
@ -2300,6 +2300,34 @@ func HasFieldsWith(preds ...predicate.ItemField) predicate.Item {
|
|||
})
|
||||
}
|
||||
|
||||
// HasMaintenanceEntries applies the HasEdge predicate on the "maintenance_entries" edge.
|
||||
func HasMaintenanceEntries() predicate.Item {
|
||||
return predicate.Item(func(s *sql.Selector) {
|
||||
step := sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.To(MaintenanceEntriesTable, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.O2M, false, MaintenanceEntriesTable, MaintenanceEntriesColumn),
|
||||
)
|
||||
sqlgraph.HasNeighbors(s, step)
|
||||
})
|
||||
}
|
||||
|
||||
// HasMaintenanceEntriesWith applies the HasEdge predicate on the "maintenance_entries" edge with a given conditions (other predicates).
|
||||
func HasMaintenanceEntriesWith(preds ...predicate.MaintenanceEntry) predicate.Item {
|
||||
return predicate.Item(func(s *sql.Selector) {
|
||||
step := sqlgraph.NewStep(
|
||||
sqlgraph.From(Table, FieldID),
|
||||
sqlgraph.To(MaintenanceEntriesInverseTable, FieldID),
|
||||
sqlgraph.Edge(sqlgraph.O2M, false, MaintenanceEntriesTable, MaintenanceEntriesColumn),
|
||||
)
|
||||
sqlgraph.HasNeighborsWith(s, step, func(s *sql.Selector) {
|
||||
for _, p := range preds {
|
||||
p(s)
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
// HasAttachments applies the HasEdge predicate on the "attachments" edge.
|
||||
func HasAttachments() predicate.Item {
|
||||
return predicate.Item(func(s *sql.Selector) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue