aboutsummaryrefslogtreecommitdiff
path: root/src/backenddb/merchant-0004.sql
diff options
context:
space:
mode:
Diffstat (limited to 'src/backenddb/merchant-0004.sql')
-rw-r--r--src/backenddb/merchant-0004.sql24
1 files changed, 20 insertions, 4 deletions
diff --git a/src/backenddb/merchant-0004.sql b/src/backenddb/merchant-0004.sql
index 26440816..cd7ecece 100644
--- a/src/backenddb/merchant-0004.sql
+++ b/src/backenddb/merchant-0004.sql
@@ -47,6 +47,21 @@ COMMENT ON COLUMN merchant_template.image
COMMENT ON COLUMN merchant_template.template_contract
IS 'The template contract will contains some additional information.';
+/*
+CREATE TABLE IF NOT EXISTS merchant_using_template
+ (template_serial BIGINT GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY
+ ,merchant_serial BIGINT NOT NULL
+ REFERENCES merchant_instances (nerchant_serial) ON DELETE CASCADE
+ ,summary VERCHAR NOT
+ ,amount_val INT8 NOT NULL
+ ,amount_frac INT4 NOT NULL
+ ,UNIQUE (merchant_serial, template_id)
+ COMMENT ON TABLE merchant_using_template
+ IS 'template used by the curstomer (may be incomplete, frontend can override)';
+ COMMENT ON COLUMN merchant_usign_template.summary
+ IS 'Human-readable summary';
+COMMENT ON COLUMN merchant_using_template.amount_val
+ IS 'Overall amoount that need to pay';*/
CREATE TABLE IF NOT EXISTS merchant_webhook
(webhook_serial BIGINT GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY
@@ -73,7 +88,7 @@ COMMENT ON COLUMN merchant_webhook.header_template
COMMENT ON COLUMN merchant_webhook.body_template
IS 'Template for the body of the webhook, to be modified based on trigger data';
-
+/*
CREATE TABLE IF NOT EXISTS merchant_pending_webhooks
(webhook_pending_serial BIGINT GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY
,merchant_serial BIGINT NOT NULL
@@ -92,7 +107,7 @@ COMMENT ON TABLE merchant_pending_webhooks
IS 'webhooks that still need to be executed by the merchant';
COMMENT ON COLUMN merchant_pending_webhooks.url
IS 'URL to make the request to';
-COMMENT ON COLUMN merchant_pending_webhooks.webhook_id
+COMMENT ON COLUMN merchant_pending_webhooks.webhook_serial
IS 'Reference to the configured webhook template';
COMMENT ON COLUMN merchant_pending_webhooks.retries
IS 'How often have we tried this request so far';
@@ -100,10 +115,11 @@ COMMENT ON COLUMN merchant_pending_webhooks.next_attempt
IS 'Time when we should make the next request to the webhook';
COMMENT ON COLUMN merchant_pending_webhooks.http_method
IS 'http method use for the webhook';
-COMMENT ON COLUMN merchant_pending_webhooks.header_template
+COMMENT ON COLUMN merchant_pending_webhooks.header
IS 'Header of the webhook';
-COMMENT ON COLUMN merchant_pending_webhooks.body_template
+COMMENT ON COLUMN merchant_pending_webhooks.body
IS 'Body of the webhook';
+*/
COMMIT;