24 lines
525 B
Protocol Buffer
24 lines
525 B
Protocol Buffer
syntax = "proto3";
|
|
package common.money.v1;
|
|
option go_package = "github.com/tech/sendico/pkg/proto/common/money/v1;moneyv1";
|
|
|
|
message Decimal { string value = 1; } // exact decimal as string
|
|
|
|
message Money {
|
|
string amount = 1; // decimal string
|
|
string currency = 2; // ISO 4217 or your code set
|
|
}
|
|
|
|
enum RoundingMode {
|
|
ROUNDING_MODE_UNSPECIFIED = 0;
|
|
ROUND_HALF_EVEN = 1;
|
|
ROUND_HALF_UP = 2;
|
|
ROUND_DOWN = 3;
|
|
}
|
|
|
|
message CurrencyMeta {
|
|
string code = 1;
|
|
uint32 decimals = 2;
|
|
RoundingMode rounding = 3;
|
|
}
|