###商户外部账户表 merchant_account_out
CREATE TABLE `merchant_account_out` (
`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 '银行的账户编号',
`balance_amount` decimal(10,2) NOT NULL COMMENT '余额',
`freeze_amount` decimal(10,2) NOT NULL COMMENT '冻结的余额',
`capital_prop` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '资金的属性',
`currency_id` int DEFAULT '0' COMMENT '关联的币种id',
`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 DEFAULT NULL COMMENT '备注',
PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC COMMENT='商户外部账户表';
merchant_id 关联 merchant.id
currency_id
关联 currency.id,currency_type
关联 currency.currency_type