Persisted transaction posting (embedded schema).
Storage-layer counterpart of Beancount.Directives.Posting. Embedded inside
Beancount.Schemas.Transaction via embeds_many/3; it has no table of its
own and no file_order (ordering follows the enclosing transaction).
Fields
account- account the posting affects, e.g."Assets:Bank".amount- posting quantity asDecimal.t(), ornilfor an elided leg.currency- commodity ofamount, ornilwhen elided.cost- embeddedBeancount.Schemas.CostSpecfor lot cost, ornil.price- price annotation map (@/@@), ornil.flag- optional per-posting flag, e.g."!".metadata- arbitrary key/value map.
Example
%Beancount.Schemas.Posting{
account: "Assets:Stocks",
amount: Decimal.new("10"),
currency: "AAPL",
cost: %Beancount.Schemas.CostSpec{per_amount: Decimal.new("150"), per_currency: "USD"},
price: nil,
flag: nil,
metadata: %{}
}