Files
goodcalc/stakeholder.go
Andreas Schröpfer d646a0d610 first calculation logic
2020-12-23 21:27:12 +01:00

18 lines
406 B
Go

package goodcalc
// Stakeholder can define a weight, which is calculated to
// all containing themes.
// No is the id like in the excel
// For example A for Suppliers
type Stakeholder struct {
No string `json:"no"`
Weight float32 `json:"weight"`
Themes []*Theme `json:"themes"`
}
func (s *Stakeholder) calcWeight() {
for _, t := range s.Themes {
t.Calc.CalcWeight = s.Weight * t.Weight
}
}