refactor: move currency to money package and add new type Price, refactor api and use price there too
This commit is contained in:
parent
18d1c98b76
commit
ef1526a1ac
7 changed files with 127 additions and 137 deletions
8
internal/money/price.go
Normal file
8
internal/money/price.go
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
package money
|
||||
|
||||
import "github.com/shopspring/decimal"
|
||||
|
||||
type Price struct {
|
||||
Amount decimal.Decimal
|
||||
Currency Currency
|
||||
}
|
||||
Reference in a new issue