first calculation logic
This commit is contained in:
17
stakeholder.go
Normal file
17
stakeholder.go
Normal file
@@ -0,0 +1,17 @@
|
||||
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
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user