Documentation ¶
Index ¶
- type AbsURL
- type Bool
- type Currency
- type Money
- func (m Money) Equal(m2 Money) bool
- func (m Money) Format(currency Currency) Money
- func (m Money) MarshalJSON() ([]byte, error)
- func (m Money) Multiply(ratio float64) Money
- func (m *Money) Scan(dest interface{}) error
- func (m *Money) UnmarshalJSON(data []byte) error
- func (m *Money) Validate() bool
- func (m Money) Value() (driver.Value, error)
- type Percent
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Money ¶
type Money struct { Amount float64 `json:"amount" format:"float64"` // 金额 Currency Currency `json:"currency"` // 单位(CNF,CNJ,CNY,USD) }
Money 金额值对象
func (Money) MarshalJSON ¶
func (*Money) UnmarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.