-
Notifications
You must be signed in to change notification settings - Fork 0
/
overridereferencesinverse_computer.go
42 lines (36 loc) · 2.48 KB
/
overridereferencesinverse_computer.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
// Code generated by badaas-cli v0.0.0, DO NOT EDIT.
package conditions
import (
condition "github.com/FrancoLiberali/cql/condition"
model "github.com/FrancoLiberali/cql/model"
overridereferencesinverse "github.com/FrancoLiberali/cql/cli/cmd/gen/conditions/tests/overridereferencesinverse"
"time"
)
func (computerConditions computerConditions) Processor(conditions ...condition.Condition[overridereferencesinverse.Processor]) condition.JoinCondition[overridereferencesinverse.Computer] {
return condition.NewJoinCondition[overridereferencesinverse.Computer, overridereferencesinverse.Processor](conditions, "Processor", "Name", computerConditions.Preload(), "ComputerName")
}
func (computerConditions computerConditions) PreloadProcessor() condition.JoinCondition[overridereferencesinverse.Computer] {
return computerConditions.Processor(Processor.Preload())
}
type computerConditions struct {
ID condition.Field[overridereferencesinverse.Computer, model.UUID]
CreatedAt condition.Field[overridereferencesinverse.Computer, time.Time]
UpdatedAt condition.Field[overridereferencesinverse.Computer, time.Time]
DeletedAt condition.Field[overridereferencesinverse.Computer, time.Time]
Name condition.StringField[overridereferencesinverse.Computer]
}
var Computer = computerConditions{
CreatedAt: condition.Field[overridereferencesinverse.Computer, time.Time]{Name: "CreatedAt"},
DeletedAt: condition.Field[overridereferencesinverse.Computer, time.Time]{Name: "DeletedAt"},
ID: condition.Field[overridereferencesinverse.Computer, model.UUID]{Name: "ID"},
Name: condition.StringField[overridereferencesinverse.Computer]{Field: condition.Field[overridereferencesinverse.Computer, string]{Name: "Name"}},
UpdatedAt: condition.Field[overridereferencesinverse.Computer, time.Time]{Name: "UpdatedAt"},
}
// Preload allows preloading the Computer when doing a query
func (computerConditions computerConditions) Preload() condition.Condition[overridereferencesinverse.Computer] {
return condition.NewPreloadCondition[overridereferencesinverse.Computer](computerConditions.ID, computerConditions.CreatedAt, computerConditions.UpdatedAt, computerConditions.DeletedAt, computerConditions.Name)
}
// PreloadRelations allows preloading all the Computer's relation when doing a query
func (computerConditions computerConditions) PreloadRelations() []condition.Condition[overridereferencesinverse.Computer] {
return []condition.Condition[overridereferencesinverse.Computer]{computerConditions.PreloadProcessor()}
}