-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Zu- and Abschläge for Rechnungspositionen (#331)
* Add Zu- and Abschläge for Rechnungspositionen corresponding to Hochfrequenz/BO4E-dotnet#572 Hochfrequenz/BO4E-dotnet#580
- Loading branch information
1 parent
aa2abc8
commit f3776b9
Showing
10 changed files
with
291 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
enum/rechnungspositionsabschlag/rechnungspositionsabschlag.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package rechnungspositionsabschlag | ||
|
||
// Zeitreihentyp sind die Codes der Summenzeitreihentypen | ||
// Note that this enum is not official BO4E standard (yet)! | ||
// | ||
//go:generate stringer --type RechnungspositionsAbschlag | ||
//go:generate jsonenums --type RechnungspositionsAbschlag | ||
type RechnungspositionsAbschlag int | ||
|
||
const ( | ||
GEMEINDERABATT RechnungspositionsAbschlag = iota + 1 // Gemeinderabatt nach Konzessionsabgabenverordnung | ||
ABSCHLAG_ANPASSUNG // Anpassung nach § 19, Absatz 2 Stromnetzentgeltverordnung | ||
) |
56 changes: 56 additions & 0 deletions
56
enum/rechnungspositionsabschlag/rechnungspositionsabschlag_jsonenums.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
32 changes: 32 additions & 0 deletions
32
enum/rechnungspositionsabschlag/rechnungspositionsabschlag_scanner_valuer.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// Code auto-generated; DO NOT EDIT. | ||
package rechnungspositionsabschlag | ||
|
||
import ( | ||
"database/sql/driver" | ||
"fmt" | ||
|
||
"github.com/hochfrequenz/go-bo4e/internal/typemapper" | ||
) | ||
|
||
// Value returns the string representation of r or an error, if no string representation exists. | ||
// It implements the sql.Valuer interface to be useable by sql drivers when storing enums. | ||
func (r RechnungspositionsAbschlag) Value() (driver.Value, error) { | ||
s, ok := _RechnungspositionsAbschlagValueToName[r] | ||
if ok { | ||
return s, nil | ||
} | ||
return nil, fmt.Errorf("could not stringify %s", r) | ||
} | ||
|
||
// Scan sets r to the enum value represented by src. | ||
// It implements the sql.Scanner interface to be useable by sql drivers when reading from database. | ||
func (r *RechnungspositionsAbschlag) Scan(src interface{}) error { | ||
f := typemapper.TypeFromValue[RechnungspositionsAbschlag] | ||
v, err := f(src, _RechnungspositionsAbschlagNameToValue) | ||
if err != nil { | ||
return err | ||
} | ||
|
||
*r = v | ||
return nil | ||
} |
25 changes: 25 additions & 0 deletions
25
enum/rechnungspositionsabschlag/rechnungspositionsabschlag_string.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
15 changes: 15 additions & 0 deletions
15
enum/rechnungspositionszuschlag/rechnungspositionszuschlag.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package rechnungspositionszuschlag | ||
|
||
// Zeitreihentyp sind die Codes der Summenzeitreihentypen | ||
// Note that this enum is not official BO4E standard (yet)! | ||
// | ||
//go:generate stringer --type RechnungspositionsZuschlag | ||
//go:generate jsonenums --type RechnungspositionsZuschlag | ||
type RechnungspositionsZuschlag int | ||
|
||
const ( | ||
UMSPANNUNGSZUSCHLAG RechnungspositionsZuschlag = iota + 1 // | ||
ALLEIN_GENUTZTE_BETRIEBSMITTEL | ||
ZUSCHLAG_ANPASSUNG | ||
ANPASSUNG_PAUSCHALE_NETZENTGELTREDUZIERUNG | ||
) |
62 changes: 62 additions & 0 deletions
62
enum/rechnungspositionszuschlag/rechnungspositionszuschlag_jsonenums.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
32 changes: 32 additions & 0 deletions
32
enum/rechnungspositionszuschlag/rechnungspositionszuschlag_scanner_valuer.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// Code auto-generated; DO NOT EDIT. | ||
package rechnungspositionszuschlag | ||
|
||
import ( | ||
"database/sql/driver" | ||
"fmt" | ||
|
||
"github.com/hochfrequenz/go-bo4e/internal/typemapper" | ||
) | ||
|
||
// Value returns the string representation of r or an error, if no string representation exists. | ||
// It implements the sql.Valuer interface to be useable by sql drivers when storing enums. | ||
func (r RechnungspositionsZuschlag) Value() (driver.Value, error) { | ||
s, ok := _RechnungspositionsZuschlagValueToName[r] | ||
if ok { | ||
return s, nil | ||
} | ||
return nil, fmt.Errorf("could not stringify %s", r) | ||
} | ||
|
||
// Scan sets r to the enum value represented by src. | ||
// It implements the sql.Scanner interface to be useable by sql drivers when reading from database. | ||
func (r *RechnungspositionsZuschlag) Scan(src interface{}) error { | ||
f := typemapper.TypeFromValue[RechnungspositionsZuschlag] | ||
v, err := f(src, _RechnungspositionsZuschlagNameToValue) | ||
if err != nil { | ||
return err | ||
} | ||
|
||
*r = v | ||
return nil | ||
} |
27 changes: 27 additions & 0 deletions
27
enum/rechnungspositionszuschlag/rechnungspositionszuschlag_string.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.