###商户充值到外部账户记录 merchant_account_out
merchant_id: 关联商户的id merchant.id
account_num : 关联商户的外部账户记录的银行帐户编号 merchant_account_out.account_num
account_out_id : 关联商户的外部账户id merchant_account_out.id
account_num : 关联商户的外部账户记录的银行帐户编号 merchant_account_out.account_num
before: 交易前的余额
after:交易后的余额
amount: 交易的金额
CREATE TABLE `merchant_account_out_log` (
`id` int NOT NULL AUTO_INCREMENT,
`created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`updated_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
`deleted_at` datetime NOT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
`merchant_id` int NOT NULL DEFAULT '0' COMMENT '商户ID',
`account_num` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '外部账户关联的银行的账户编号',
`account_out_id` int 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 DEFAULT NULL COMMENT '备注',
`loan_mark` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '借贷标识',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC COMMENT='商户外部账户余额明细记录';