|
@@ -11,7 +11,7 @@
|
|
|
Target Server Version : 80024
|
|
|
File Encoding : 65001
|
|
|
|
|
|
- Date: 24/04/2022 15:43:42
|
|
|
+ Date: 24/04/2022 16:20:04
|
|
|
*/
|
|
|
|
|
|
SET NAMES utf8mb4;
|
|
@@ -239,20 +239,16 @@ CREATE TABLE `merchant_account_sys` (
|
|
|
`updated_at` datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '修改时间',
|
|
|
`deleted_at` datetime(0) NOT NULL ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '修改时间',
|
|
|
`merchant_id` int(0) NOT NULL DEFAULT 0 COMMENT '商户ID',
|
|
|
- `bank_name` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '银行名称',
|
|
|
- `bank_code` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '0' COMMENT '银行代码',
|
|
|
- `account_code` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '账户编号',
|
|
|
- `account_name` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '账户名',
|
|
|
- `account_name_en` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '账户名 英文',
|
|
|
- `country` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '账户所属的国家/地区',
|
|
|
- `province` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '账户所属的省/州',
|
|
|
- `city` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '账户所属的省/州城市',
|
|
|
- `address` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '详细地址',
|
|
|
- `postal_code` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '邮政编码',
|
|
|
- `swift_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '0' COMMENT 'SWIFT CODE',
|
|
|
- `sys_account_id` int(0) NOT NULL COMMENT '关联的系统账户的子账户 id ',
|
|
|
+ `sys_account_id` int(0) NULL DEFAULT NULL COMMENT '关联的平台账户的id',
|
|
|
+ `account_num` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '银行的账户编号',
|
|
|
+ `balance_amount` decimal(10, 2) NOT NULL COMMENT '余额',
|
|
|
+ `freeze_amount` decimal(10, 2) NOT NULL COMMENT '冻结的余额',
|
|
|
+ `currency_id` int(0) NULL DEFAULT 0 COMMENT '关联的币种id',
|
|
|
+ `capital_prop` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '资金的属性',
|
|
|
+ `currency_type` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '币种',
|
|
|
+ `remark` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注',
|
|
|
PRIMARY KEY (`id`) USING BTREE
|
|
|
-) ENGINE = InnoDB AUTO_INCREMENT = 67 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '商户外部账户交易明细' ROW_FORMAT = Dynamic;
|
|
|
+) ENGINE = InnoDB AUTO_INCREMENT = 67 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '商户外部账户表' ROW_FORMAT = Dynamic;
|
|
|
|
|
|
-- ----------------------------
|
|
|
-- Records of merchant_account_sys
|
|
@@ -316,6 +312,7 @@ CREATE TABLE `payment_order` (
|
|
|
`updated_at` datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '修改时间',
|
|
|
`deleted_at` datetime(0) NOT NULL ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '修改时间',
|
|
|
`merchant_id` int(0) NOT NULL DEFAULT 0 COMMENT '商户ID',
|
|
|
+ `trade_no` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '品台生成的交易单号',
|
|
|
`from_account_no` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '来自银行的账户编号',
|
|
|
`from_account_id` int(0) NULL DEFAULT 0 COMMENT '来自账户的id',
|
|
|
`to_account_id` int(0) NULL DEFAULT 0 COMMENT '转到账户的id',
|
|
@@ -374,17 +371,13 @@ CREATE TABLE `payment_order_log` (
|
|
|
`created_at` datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '创建时间',
|
|
|
`updated_at` datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '修改时间',
|
|
|
`deleted_at` datetime(0) NOT NULL ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '修改时间',
|
|
|
- `merchant_id` int(0) NOT NULL DEFAULT 0 COMMENT '商户ID',
|
|
|
- `accout_num` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '账户关联的银行的账户编号',
|
|
|
- `accout_id` int(0) NULL DEFAULT 0 COMMENT '账户记录的id',
|
|
|
- `before` decimal(10, 2) NOT NULL COMMENT '交易前的余额',
|
|
|
- `after` decimal(10, 2) NOT NULL COMMENT '交易后的余额',
|
|
|
- `amount` decimal(10, 2) NOT NULL COMMENT '交易的金额',
|
|
|
- `currency_type` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '币种',
|
|
|
- `transfer_type` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '交易类型(汇兑、结汇、充值)',
|
|
|
- `transfer_state` tinyint(1) NOT NULL DEFAULT 0 COMMENT '交易状态',
|
|
|
- `remark` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注',
|
|
|
- `notify_msg` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '银行机构通知的消息',
|
|
|
+ `local_trade_no` int(0) NOT NULL DEFAULT 0 COMMENT '本地交易单号',
|
|
|
+ `order_id` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '本地交易单号的id',
|
|
|
+ `out_trade_no` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '交易单号,银行方',
|
|
|
+ `step_r` int(0) NULL DEFAULT 0 COMMENT '交易的步骤',
|
|
|
+ `step_name` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '交易的步骤名称',
|
|
|
+ `local_msg` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '本地向银行机构发起的请求信息',
|
|
|
+ `org_msg` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '银行机构通知的消息',
|
|
|
PRIMARY KEY (`id`) USING BTREE
|
|
|
) ENGINE = InnoDB AUTO_INCREMENT = 67 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '商户支付订单记录' ROW_FORMAT = Dynamic;
|
|
|
|