CREATE TABLE `wx_merchant_ocr_model` (
  `id` bigint(20) NOT NULL,
  `merchant_id` bigint(20) NOT NULL COMMENT '商户编号',
  `ocr_model_id` bigint(20) NOT NULL COMMENT 'ocr模板编号',
  `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `tenant_id` varchar(5) DEFAULT NULL COMMENT '租户id',
  `parent_tenant_id` varchar(5) DEFAULT NULL,
  `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE KEY `UNIQUE` (`merchant_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

CREATE TABLE `wx_ocr_model` (
  `id` bigint(20) NOT NULL,
  `lang_code` varchar(20) NOT NULL DEFAULT 'iformallLang' COMMENT '语言定义',
  `font_name` varchar(20) NOT NULL COMMENT '字库名称',
  `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `remark` text COMMENT '说明',
  `status` tinyint(1) DEFAULT '0' COMMENT '0-有效 1-无效',
  PRIMARY KEY (`id`),
  UNIQUE KEY `UNIQUE` (`font_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

