-
Notifications
You must be signed in to change notification settings - Fork 0
/
inout.go
39 lines (31 loc) · 759 Bytes
/
inout.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
package quote
import (
"github.com/jamestrandung/go-cte/cte"
"github.com/jamestrandung/go-cte/sample/service/scaffolding/calculation"
"github.com/jamestrandung/go-cte/sample/service/scaffolding/fixedcost"
)
type inout interface {
Input
}
type Input interface {
fixedcost.Input
calculation.Input
GetIsFixedCostEnabled() bool
}
type result interface {
GetTotalCost() float64
GetVATAmount() float64
}
type FixedCostBranch cte.Result
func (c FixedCostBranch) CTEMetadata() any {
return struct {
computer computer
inout inout
}{}
}
func (c FixedCostBranch) GetTotalCost() float64 {
return cte.Outcome[result](c.Task).GetTotalCost()
}
func (c FixedCostBranch) GetVATAmount() float64 {
return cte.Outcome[result](c.Task).GetVATAmount()
}