
###商户外部账户表 `merchant_account_out`
```mysql
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_bank` 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_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 '备注',
    `account_code` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '账户识别码，用于标识',
    PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 ROW_FORMAT=DYNAMIC COMMENT='商户外部账户表';
```

> merchant_id 关联 [merchant.id](./merchant_struct.md)
> 
> `account_code` 账户识别码，用于标识当前账户,
> 
> `currency_type`  来自于创建时选择的外部钱包模板 [currency.currency_type](./currency.md)
