统一订单单状态模型

This commit is contained in:
yml2213
2026-07-31 17:02:19 +08:00
parent 677bdbbc1c
commit 04130e5ec8
19 changed files with 300 additions and 345 deletions
@@ -201,8 +201,7 @@ CREATE TABLE IF NOT EXISTS fulfillment_orders (
service_fee_amount BIGINT NOT NULL DEFAULT 0,
amount BIGINT NOT NULL,
currency VARCHAR(12) NOT NULL DEFAULT 'POINT',
payment_status VARCHAR(16) NOT NULL DEFAULT 'pending',
fulfillment_status VARCHAR(16) NOT NULL DEFAULT 'pending',
order_status VARCHAR(16) NOT NULL DEFAULT 'paid',
buyer_reference VARCHAR(128),
request_data TEXT,
result_data TEXT,
@@ -217,8 +216,7 @@ CREATE UNIQUE INDEX IF NOT EXISTS idx_order_client_no ON fulfillment_orders (mer
CREATE INDEX IF NOT EXISTS idx_fulfillment_orders_deleted_at ON fulfillment_orders (deleted_at);
CREATE INDEX IF NOT EXISTS idx_fulfillment_orders_merchant_id ON fulfillment_orders (merchant_id);
CREATE INDEX IF NOT EXISTS idx_fulfillment_orders_merchant_product_id ON fulfillment_orders (merchant_product_id);
CREATE INDEX IF NOT EXISTS idx_fulfillment_orders_payment_status ON fulfillment_orders (payment_status);
CREATE INDEX IF NOT EXISTS idx_fulfillment_orders_fulfillment_status ON fulfillment_orders (fulfillment_status);
CREATE INDEX IF NOT EXISTS idx_fulfillment_orders_order_status ON fulfillment_orders (order_status);
CREATE INDEX IF NOT EXISTS idx_fulfillment_orders_provider_order_no ON fulfillment_orders (provider_order_no);
CREATE TABLE IF NOT EXISTS fulfillment_jobs (