merchant

Merchant backend to process payments, run by merchants
Log | Files | Refs | Submodules | README | LICENSE

commit 7f55a69d3c4cf54d8f6df16081b966f6a8b5bf7c
parent 8f84f6576471c94b16624c44e1b46356e2353268
Author: Christian Grothoff <grothoff@gnunet.org>
Date:   Wed, 19 Mar 2025 14:45:06 +0100

add comments to columns

Diffstat:
Msrc/backenddb/merchant-0001.sql | 40+++++++++++++++++++++++++++++++++++++++-
1 file changed, 39 insertions(+), 1 deletion(-)

diff --git a/src/backenddb/merchant-0001.sql b/src/backenddb/merchant-0001.sql @@ -182,6 +182,10 @@ COMMENT ON COLUMN merchant_accounts.credit_facade_credentials IS 'JSON with credentials needed to access the credit facade'; COMMENT ON COLUMN merchant_accounts.last_bank_serial IS 'Serial number of the bank of the last transaction we successfully imported'; +COMMENT ON COLUMN merchant_accounts.account_serial + IS 'Unique identifier for this account, used to reference this account from other tables'; +COMMENT ON COLUMN merchant_accounts.merchant_serial + IS 'Merchant instance that controls this bank account'; -------------------------- Inventory --------------------------- @@ -489,6 +493,16 @@ CREATE TABLE IF NOT EXISTS merchant_transfers ); COMMENT ON TABLE merchant_transfers IS 'table represents the information provided by the (trusted) merchant about incoming wire transfers'; +COMMENT ON COLUMN merchant_transfers.credit_serial + IS 'Unique identifier for this wire transfer in this backend'; +COMMENT ON COLUMN merchant_transfers.account_serial + IS 'Merchant bank account that received this wire transfer; also implies the merchant instance implicated by the wire transfer'; +COMMENT ON COLUMN merchant_transfers.ready_time + IS 'Time when we should next inquire at the exchange about this wire transfer; used by taler-merchant-reconciliation to limit retries with the exchange in case of failures'; +COMMENT ON COLUMN merchant_transfers.exchange_url + IS 'Base URL of the exchange that originated the wire transfer as extracted from the wire transfer subject'; +COMMENT ON COLUMN merchant_transfers.wtid + IS 'Unique wire transfer identifier (or at least, should be unique by protocol) as selected by the exchange and extracted from the wire transfer subject'; COMMENT ON COLUMN merchant_transfers.verified IS 'true once we got an acceptable response from the exchange for this transfer'; COMMENT ON COLUMN merchant_transfers.confirmed @@ -520,6 +534,14 @@ CREATE TABLE IF NOT EXISTS merchant_transfer_signatures ); COMMENT ON TABLE merchant_transfer_signatures IS 'table represents the main information returned from the /transfer request to the exchange.'; +COMMENT ON COLUMN merchant_transfer_signatures.credit_serial + IS 'wire transfer this signature is about'; +COMMENT ON COLUMN merchant_transfer_signatures.signkey_serial + IS 'Online signing key by the exchange that was used for the exchange_sig signature'; +COMMENT ON COLUMN merchant_transfer_signatures.wire_fee + IS 'wire fee charged by the exchange for this transfer'; +COMMENT ON COLUMN merchant_transfer_signatures.exchange_sig + IS 'signature by the exchange of purpose TALER_SIGNATURE_EXCHANGE_CONFIRM_WIRE_DEPOSIT'; COMMENT ON COLUMN merchant_transfer_signatures.execution_time IS 'Execution time as claimed by the exchange, roughly matches time seen by merchant'; COMMENT ON COLUMN merchant_transfer_signatures.credit_amount @@ -540,6 +562,12 @@ CREATE INDEX IF NOT EXISTS merchant_transfers_by_credit (credit_serial); COMMENT ON TABLE merchant_transfer_to_coin IS 'Mapping of (credit) transfers to (deposited) coins'; +COMMENT ON COLUMN merchant_transfer_to_coin.deposit_serial + IS 'Identifies the deposited coin that the wire transfer presumably settles'; +COMMENT ON COLUMN merchant_transfer_to_coin.credit_serial + IS 'Identifies the wire transfer that settles the given deposited coin'; +COMMENT ON COLUMN merchant_transfer_to_coin.offset_in_exchange_list + IS 'The exchange settlement data includes an array of the settled coins; this is the index of the coin in that list, useful to reconstruct the correct sequence of coins as needed to check the exchange signature'; COMMENT ON COLUMN merchant_transfer_to_coin.exchange_deposit_value IS 'Deposit value as claimed by the exchange, should match our values in merchant_deposits minus refunds'; COMMENT ON COLUMN merchant_transfer_to_coin.exchange_deposit_fee @@ -558,9 +586,19 @@ CREATE TABLE IF NOT EXISTS merchant_deposit_to_transfer ,UNIQUE(deposit_serial,credit_serial) ); COMMENT ON TABLE merchant_deposit_to_transfer - IS 'Mapping of deposits to (possibly unconfirmed) wire transfers; NOTE: not used yet'; + IS 'Mapping of deposits to (possibly unconfirmed) wire transfers; note: currently taler-merchant-depositcheck only INSERTs into this table, but we never use it'; +COMMENT ON COLUMN merchant_deposit_to_transfer.deposit_serial + IS 'identifies the deposited coin for which we inquired about the wire transfer status at the exchange'; +COMMENT ON COLUMN merchant_deposit_to_transfer.coin_contribution_value + IS 'Contribution of this coin to the overall wire transfer made by the exchange'; +COMMENT ON COLUMN merchant_deposit_to_transfer.credit_serial + IS 'Identifies the wire transfer from the exchange to the merchant that settled the deposit of coin'; COMMENT ON COLUMN merchant_deposit_to_transfer.execution_time IS 'Execution time as claimed by the exchange, roughly matches time seen by merchant'; +COMMENT ON COLUMN merchant_deposit_to_transfer.signkey_serial + IS 'Identifies the online signing key of the exchange used to make the exchange_sig'; +COMMENT ON COLUMN merchant_deposit_to_transfer.exchange_sig + IS 'Exchange signature of purpose TALER_SIGNATURE_EXCHANGE_CONFIRM_WIRE'; -------------------------- Rewards ---------------------------