initial commit

This commit is contained in:
Andreas Schröpfer
2020-12-13 08:26:15 +01:00
commit e1dcf9b740
3 changed files with 91 additions and 0 deletions

57
balance/balance.go Normal file
View File

@@ -0,0 +1,57 @@
package bil
// Folgende Strukturen sind für eine Abbildung der Bilanz in
// Textform. Hierüber könnte das Arbeitsbuch erzeugt werden
// Offene Punkte
// Alle Strukturen mit ID beinhalten auch die Version. Die Abstraktion
// des Models könnte hier aber auch anders gewählt werden.
// Beispielsweise über UUIDs.
// Matrix defines the structure of the Gemeinwohl-Matrix
type Matrix struct {
Version string // Semantic Version of the matrix 5.0.0
Target string // Unternehmen oder Gemeinde
Groups []string // Berührungsgruppen
Values []string // Wert
Subjects [][]string // Themen
}
// Subject is a Gemeinwohl-Thema of the matrix
type Subject struct {
Version string // Semantic Version of the matrix 5.0.0
Target string // Unternehmen oder Gemeinde
ID string // A1
Title string // Menschenwürde in der Zulieferkette
Description string // Anfangsbeschreibung
GoodCompany []string // Ein GWÖ-Unternehmen - Liste
WarmUpQuestions []string // Einstiegsfragen - Liste
Aspects []Aspect // Auflistung der einzelnen Aspekte
NegativeAspects []NegativeAspect // Negativaspekte
}
// Aspect defines the questions to the valuation
type Aspect struct {
Version string // Semantic Version of the matrix 5.0.0
Target string // Unternehmen oder Gemeinde
ID string // A1.1
Title string // Arbeitsbed. u gesellschaftl. Ausw. ...
Description string // Anfangsbeschreibung
Questions []string // Berichtsfragen
MustHaves []string // verpflichtende Indikatoren
EvaluationSteps []EvaluationStep // Bewertungsstufen
EvaluationHelp string // Bewertungshilfen/Interpretation
}
// NegativeAspect defines negative points to the balance
type NegativeAspect struct {
Aspect
}
// EvaluationStep defines how to valuate the company
type EvaluationStep struct {
Title string // Basislinie
Description string // Beschreibung
MinVal int // minimale Punkte 3
MaxVal int // maximale Punkte 5 -> 3 bis 5 Punkte
}

3
go.mod Normal file
View File

@@ -0,0 +1,3 @@
module git.ecogood.org/andreas.schroepfer/gobalance
go 1.15

31
valuation/valuation.go Normal file
View File

@@ -0,0 +1,31 @@
package valuation
type Matrix struct {
Version string // Semantic Version of the matrix 5.0.0
Target string // Unternehmen oder Gemeinde
Subjects [][]Subject
}
type Subject struct {
Version string // Semantic Version of the matrix 5.0.0
Target string // Unternehmen oder Gemeinde
ID string // A1
Weight Weight // 1.5
Aspects []Aspect // Auflistung der einzelnen Aspekte
NegativeAspects []Aspect // Negativaspekte
}
type Aspect struct {
Version string // Semantic Version of the matrix 5.0.0
Target string // Unternehmen oder Gemeinde
ID string // A1.1
Weight Weight // 1.5
Explanation string // ausführliche Begründung
EvaluationStepTitle string // Basislinie
Value int // Punkte
}
// Weight is used
type Weight struct {
w float32 // kann bei float-Problemen umgestellt werden
}