feat(backend): license_purchases 增 amount_minor/currency/pay_url/renewed_to 列 + 存量回填(pay v2 金额口径)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
wangjia
2026-07-10 20:26:59 +08:00
parent ceabc7977b
commit bc183ab7df
6 changed files with 60 additions and 2 deletions
+5 -1
View File
@@ -167,7 +167,11 @@ CREATE TABLE IF NOT EXISTS `license_purchases` (
`shop_id` BIGINT UNSIGNED NOT NULL,
`user_id` BIGINT UNSIGNED NOT NULL COMMENT '下单管理员',
`product_biz_code` VARCHAR(64) NOT NULL COMMENT '套餐稳定码(monthly_standard/annual_standard/monthly_pro/annual_pro)',
`amount` VARCHAR(16) DEFAULT NULL COMMENT 'pay 下单回传金额,如 2999.00',
`amount_minor` BIGINT NOT NULL DEFAULT 0 COMMENT 'v2 口径:最小单位金额(CNY=分)',
`currency` VARCHAR(8) NOT NULL DEFAULT '' COMMENT 'v2 口径:币种,如 CNY',
`pay_url` VARCHAR(512) DEFAULT NULL COMMENT 'v2 下单 session payload.url,订单管理「继续支付」复用',
`renewed_to` DATETIME DEFAULT NULL COMMENT 'settle 续期后的授权到期日(订单流水「授权续期至」展示)',
`amount` VARCHAR(16) DEFAULT NULL COMMENT 'Deprecated: v1 元字符串,如 2999.00,观察一版后 DROP',
`out_trade_no` VARCHAR(64) DEFAULT NULL COMMENT 'pay 订单号',
`status` ENUM('pending','paid','failed') NOT NULL DEFAULT 'pending',
`trade_no` VARCHAR(64) DEFAULT NULL COMMENT '渠道交易号(支付宝/微信)',