chore: 清理敏感与开发文档,仅同步代码
- 永久忽略并从仓库移除 开发文档/ - 移除并忽略 .env 与小程序私有配置 - 同步小程序/管理端/API与脚本改动 Made-with: Cursor
This commit is contained in:
25
soul-api/scripts/add-gift-pay-requests.sql
Normal file
25
soul-api/scripts/add-gift-pay-requests.sql
Normal file
@@ -0,0 +1,25 @@
|
||||
-- 代付请求表 + 订单表代付字段
|
||||
-- 执行:mysql -u user -p db < soul-api/scripts/add-gift-pay-requests.sql
|
||||
-- 注:orders 表新增字段由 GORM AutoMigrate 自动添加;若需手动执行:
|
||||
-- ALTER TABLE orders ADD COLUMN gift_pay_request_id VARCHAR(50) DEFAULT NULL;
|
||||
-- ALTER TABLE orders ADD COLUMN payer_user_id VARCHAR(50) DEFAULT NULL;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS gift_pay_requests (
|
||||
id VARCHAR(50) PRIMARY KEY,
|
||||
request_sn VARCHAR(32) NOT NULL UNIQUE,
|
||||
initiator_user_id VARCHAR(50) NOT NULL,
|
||||
product_type VARCHAR(30) NOT NULL,
|
||||
product_id VARCHAR(50) NOT NULL DEFAULT '',
|
||||
amount DECIMAL(10,2) NOT NULL,
|
||||
description VARCHAR(200) NOT NULL DEFAULT '',
|
||||
status VARCHAR(20) NOT NULL DEFAULT 'pending',
|
||||
payer_user_id VARCHAR(50) DEFAULT NULL,
|
||||
order_id VARCHAR(50) DEFAULT NULL,
|
||||
expire_at DATETIME NOT NULL,
|
||||
created_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
updated_at DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
INDEX idx_initiator (initiator_user_id),
|
||||
INDEX idx_payer (payer_user_id),
|
||||
INDEX idx_status (status),
|
||||
INDEX idx_request_sn (request_sn)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||||
Reference in New Issue
Block a user