18 lines
406 B
Go
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
|
|
}
|
|
}
|