diff --git a/docs/docs/_book_deploy_prepare_amore_open_weixin.md b/docs/docs/_book_deploy_prepare_amore_open_weixin.md
new file mode 100644
index 0000000..a43686f
--- /dev/null
+++ b/docs/docs/_book_deploy_prepare_amore_open_weixin.md
@@ -0,0 +1,139 @@
+---
+url: _book_deploy_prepare_amore_open_weixin
+---
+
+# 微信开放平台-第三方平台配置
+
+
+## 注册微信平台账号
+
+[注册微信平台注册](https://open.weixin.qq.com/cgi-bin/readtemplate?t=regist/regist_tmpl&lang=zh_CN)
+
+
+## 开发者资质认证
+
+[第三方平台申请流程](https://open.weixin.qq.com/cgi-bin/frame?t=home/wx_plugin_tmpl&lang=zh_CN)
+
+点击`开发者资质认证`, 并进行认证.
+
+> 开发者资质认证介绍
+
+> 微信开放平台帐号的开发者资质认证提供更安全、更严格的真实性认证、也能够更好的保护企业及用户的合法权益
+开发者资质认证通过后,微信开放平台帐号下的应用,将获得微信登录、智能接口、第三方平台开发等高级能力
+审核费用:中国大陆地区:300元,非中国大陆地区:99美元
+
+
+认证时间大概2-3天, 已微信实际认证时间为准
+
+
+## 创建第三方平台
+
+管理中心->第三方平台
+
+
+点击`创建第三方平台`
+
+
+## 输入基本信息
+
+平台类型选择`平台型服务商`
+
+
+
+## 选择权限
+
+公众号权限
+
+小程序权限
+
+
+
+## 填写开发资料
+
+为了表述方便, 下文将以源源客正式站站为例.
+
+websocket地址: **dev-websocket-wmp.amorepacific.com.cn**
+
+授权流程相关
+
+- 授权发起页域名: dev-wmp.amorepacific.com.cn
+
+> 必须从本域名内网页跳转到登录授权页,才可完成登录授权。无需填写`http://等域名协议前缀`
+
+
+- 授权测试公众号列表: ghhh_fff6479ae2c8;gh_7bc47f612ba6
+
+> 在全网发布之前,仅该列表内公众号才可进行授权,以便测试。请填写公众号的原始ID(可在公众平台网站的公众号设置页找到),最多10个,以英文“;”隔开。
+
+
+- 授权事件接收URL: dev-wmp.amorepacific.com.cn/wechatAuth/events
+
+::: danger
+**url前缀**选择https
+:::
+
+> 用于接收取消授权通知、授权成功通知、授权更新通知,也用于接收ticket,ticket是验证平台方的重要凭据。
+
+
+授权后实现业务
+
+- 消息校验Token: qwn2995ktj024
+
+> 开发者在代替公众号或小程序接收到消息时,用此Token来校验消息。
+
+
+::: danger
+**消息校验Token**前后, 绝不能有空格
+:::
+
+- 消息加解密Key: sklfjkfgeiawwwqvn65997wlj01ndnfoqoe8x2k0nck
+
+> 在代替公众号或小程序收发消息过程中使用。必须是长度为43位的字符串,只能是字母和数字。
+
+
+::: danger
+**消息加解密Key**前后, 绝不能有空格. 长度必须43位
+:::
+
+- 消息与事件接收URL: dev-wmp.amorepacific.com.cn/wechatAuth/callback/$APPID$
+
+::: danger
+**url前缀**选择https
+:::
+
+> 通过该URL接收公众号或小程序消息和事件推送,该参数按规则填写(需包含/$APPID$,如www.abc.com/$APPID$/callback),实际接收消息时$APPID$将被替换为公众号或小程序AppId。
+
+
+- 公众号开发域名: dev-wmp.amorepacific.com.cn
+
+> 第三方平台在代公众号做网页授权、调用JS SDK等网页开发工作时所用的域名,以;隔开。为了满足开发者管理需要,符合以下要求的下级域名也将生效:$APPID$.wx.abc.com($APPID$为公众号的AppID的替换符)
+请**下载校验文件**,并将文件放置在域名根目录下,例如wx.qq.com,并确保可以访问该文件。
+每月可提交修改申请3次,本月有3次机会
+
+
+- 小程序服务器域名: dev-wmp.amorepacific.com.cn;dev-websocket-wmp.amorepacific.com.cn;mmbiz.qpic.cn;wx.qlogo.cn;
+
+> 第三方平台旗下授权的小程序,只可配置本平台服务器域名列表中的域名,以;隔开。
+每月可提交修改申请3次,本月有2次机会
+
+
+::: info
+需要访问的小程序服务器域名, 同时需要后端接口**dev-wmp.amorepacific.com.cn** 和 websocket服务: **dev-websocket-wmp.amorepacific.com.cn**
+:::
+
+- 小程序业务域名:
+
+> 请**下载校验文件**,并将文件放置在域名根目录下,例如wx.qq.com,并确保可以访问该文件。
+每月可提交修改申请3次,本月有3次机会
+
+
+其他
+
+- 白名单IP地址列表: 40.73.103.142
+
+> 仅当开发者IP地址在该列表中时,才被允许调用相关接口。最多填写100个IP地址,以英文“;”隔开。
+
+
+::: info
+服务器出口ip地址, 如果是vpc. 否则访问微信接口会被拒
+:::
diff --git a/docs/docs/_book_deploy_prepare_appoint.md b/docs/docs/_book_deploy_prepare_appoint.md
new file mode 100644
index 0000000..3f8fed2
--- /dev/null
+++ b/docs/docs/_book_deploy_prepare_appoint.md
@@ -0,0 +1,8 @@
+---
+url: _book_deploy_prepare_appoint
+---
+
+# 约定
+
+- 部署文档以源源客官方平台作为例子, 域名为: yuanyuanke.cn
+-
diff --git a/docs/docs/_book_deploy_prepare_license.md b/docs/docs/_book_deploy_prepare_license.md
new file mode 100644
index 0000000..eb7ba2d
--- /dev/null
+++ b/docs/docs/_book_deploy_prepare_license.md
@@ -0,0 +1,17 @@
+---
+url: _book_deploy_prepare_license
+---
+
+# 域名备案
+
+如果由商派提供采购阿里云服务器, 可以选用我们的备案服务.
+
+
+## 阿里云备案
+
+[阿里云备案](https://beian.aliyun.com)
+
+
+## 腾讯云备案
+
+[腾讯云备案](https://cloud.tencent.com/product/ba)
diff --git a/docs/docs/_book_deploy_prepare_readme.md b/docs/docs/_book_deploy_prepare_readme.md
new file mode 100644
index 0000000..e4d5518
--- /dev/null
+++ b/docs/docs/_book_deploy_prepare_readme.md
@@ -0,0 +1,14 @@
+---
+url: _book_deploy_prepare_readme
+---
+
+# README.md
+
+---
+
+
+
+## description: Shortcut keys allows an easy and quick method for navigating or editing con
+
+
+# 准备工作
diff --git a/docs/docs/_book_framework_bundle_database-orm.md b/docs/docs/_book_framework_bundle_database-orm.md
new file mode 100644
index 0000000..b883791
--- /dev/null
+++ b/docs/docs/_book_framework_bundle_database-orm.md
@@ -0,0 +1,29 @@
+---
+url: _book_framework_bundle_database-orm
+---
+
+# Doctrine ORM
+
+
+## 什么是 ORM ?
+
+ORM 是 Object-Relation Mapping (对象-关系映射)的简称,是随着面向对象的软件开发方法发展而产生的。
+Doctrine ORM 是 PHP 的对象关系映射器(ORM),可以将PHP对象持久化到数据库中。它以Data Mapper模式为核心,旨在将您的业务逻辑与数据库中的持久化完全分离。
+
+ORM 主要做了两件事:
+
+- ORM 使用对象,封装了数据库操作,因此可以不碰 SQL 语言就可以从数据库获取数据
+- ORM 将数据库映射为对象,或将对象持久化到数据库
+
+ORM 把数据库映射成对象关系如下:
+
+- 数据库的表(table) --> 类(class)
+- 记录(record,行数据)--> 对象(object)
+- 字段(field)--> 对象的属性(attribute)
+
+
+## 如何使用 Doctrine ORM ?
+
+PHP 数据对象(PDO)扩展为PHP访问数据库定义了一个轻量级的一致接口,通过此扩展从数据库获取数据其结果集为一个数组。
+
+在 ECOS 中,我们也对数据访问做了封装,可以通过 model 去获取数据,其结果也是也是一个数组,程序员通过 model 获取一个结果后,即可针对这个结果的数组做相关的业务处理。
diff --git a/docs/docs/_book_framework_bundle_database-relations.md b/docs/docs/_book_framework_bundle_database-relations.md
new file mode 100644
index 0000000..418df67
--- /dev/null
+++ b/docs/docs/_book_framework_bundle_database-relations.md
@@ -0,0 +1,6 @@
+---
+url: _book_framework_bundle_database-relations
+---
+
+# 数据库和 Doctrine ORM
+
diff --git a/docs/docs/_book_framework_standard-base.md b/docs/docs/_book_framework_standard-base.md
new file mode 100644
index 0000000..0310112
--- /dev/null
+++ b/docs/docs/_book_framework_standard-base.md
@@ -0,0 +1,14 @@
+---
+url: _book_framework_standard-base
+---
+
+# 规范
+
+
+## 代码规范
+
+
+## 数据库升级
+
+
+## 业务规范
diff --git a/docs/docs/_book_summary_1.md b/docs/docs/_book_summary_1.md
new file mode 100644
index 0000000..2590914
--- /dev/null
+++ b/docs/docs/_book_summary_1.md
@@ -0,0 +1,81 @@
+---
+url: _book_summary_1
+---
+
+# SUMMARY_1.md
+
+-
+[介绍](_book_README)
+
+-
+[技术说明](_book_technical)
+
+-
+系统部署
+
+ -
+准备工作
+
+ -
+[域名](_book_deploy_prepare_domain)
+
+ -
+[七牛](_book_deploy_prepare_qiniu)
+
+ -
+[微信开放平台第三方平台申请](_book_deploy_prepare_open_weixin)
+
+ -
+[域名备案](_book_deploy_prepare_domain_record)
+
+ -
+[服务器方案](_book_deploy_prepare_solution)
+
+ -
+[支付申请]
+
+ -
+[腾讯位置服务](_book_deploy_prepare_lbs)
+
+ -
+[ECShopX授权](_book_deplloy_prepare_license)
+
+ -
+短信方案
+
+ -
+物流跟踪
+
+ -
+客服工具
+
+ -
+微信小程序支付
+
+ -
+商品初始化/模版初始化
+
+ -
+部署方案
+
+ - [单机部署方案](_book_deploy_install)
+ - [集群部署方案](_book_deploy_cluster_install)
+-
+框架
+
+ - 目录结构
+ - 队列
+ - orm
+ -
+-
+快速入门
+
+-
+API文档
+
+-
+数据辞典
+
+-
+数据库migration规则
+
diff --git a/docs/docs/_book_test.md b/docs/docs/_book_test.md
new file mode 100644
index 0000000..4cdc442
--- /dev/null
+++ b/docs/docs/_book_test.md
@@ -0,0 +1,287 @@
+---
+url: _book_test
+---
+
+# Laravel Cashier
+
+- [Introduction](_book_billing.md#introduction)
+- [Configuration](_book_billing.md#configuration)
+- [Subscribing To A Plan](_book_billing.md#subscribing-to-a-plan)
+- [No Card Up Front](_book_billing.md#no-card-up-front)
+- [Swapping Subscriptions](_book_billing.md#swapping-subscriptions)
+- [Subscription Quantity](_book_billing.md#subscription-quantity)
+- [Cancelling A Subscription](_book_billing.md#cancelling-a-subscription)
+- [Resuming A Subscription](_book_billing.md#resuming-a-subscription)
+- [Checking Subscription Status](_book_billing.md#checking-subscription-status)
+- [Handling Failed Payments](_book_billing.md#handling-failed-payments)
+- [Invoices](_book_billing.md#invoices)
+
+
+## Introduction
+
+Laravel Cashier provides an expressive, fluent interface to [Stripe's](https://stripe.com) subscription billing services. It handles almost all of the boilerplate subscription billing code you are dreading writing. In addition to basic subscription management, Cashier can handle coupons, swapping subscription, subscription "quantites", cancellation grace periods, and even generate invoice PDFs.
+
+
+## Configuration
+
+
+### Composer
+
+First, add the Cashier package to your `composer.json` file:
+
+```
+"laravel/cashier": "~2.0"
+```
+
+
+### Service Provider
+
+Next, register the `Laravel\Cashier\CashierServiceProvider` in your `app` configuration file.
+
+
+### Migration
+
+Before using Cashier, we'll need to add several columns to your database. Don't worry, you can use the `cashier:table` Artisan command to create a migration to add the necessary column. Once the migration has been created, simply run the `migrate` command.
+
+
+### Model Setup
+
+Next, add the BillableTrait and appropriate date mutators to your model definition:
+
+```
+use Laravel\Cashier\BillableTrait;
+use Laravel\Cashier\BillableInterface;
+
+class User extends Eloquent implements BillableInterface {
+
+ use BillableTrait;
+
+ protected $dates = ['trial_ends_at', 'subscription_ends_at'];
+
+}
+```
+
+
+### Stripe Key
+
+Finally, set your Stripe key in one of your bootstrap files:
+
+```
+User::setStripeKey('stripe-key');
+```
+
+
+## Subscribing To A Plan
+
+Once you have a model instance, you can easily subscribe that user to a given Stripe plan:
+
+```
+$user = User::find(1);
+
+$user->subscription('monthly')->create($creditCardToken);
+```
+
+If you would like to apply a coupon when creating the subscription, you may use the `withCoupon` method:
+
+```
+$user->subscription('monthly')
+ ->withCoupon('code')
+ ->create($creditCardToken);
+```
+
+The `subscription` method will automatically create the Stripe subscription, as well as update your database with Stripe customer ID and other relevant billing information.
+
+If your plan has a trial period, make sure to set the trial end date on your model after subscribing:
+
+```
+$user->trial_ends_at = Carbon::now()->addDays(14);
+
+$user->save();
+```
+
+
+## No Card Up Front
+
+If your application offers a free-trial with no credit-card up front, set the `cardUpFront` property on your model to `false`:
+
+```
+protected $cardUpFront = false;
+```
+
+On account creation, be sure to set the trial end date on the model:
+
+```
+$user->trial_ends_at = Carbon::now()->addDays(14);
+
+$user->save();
+```
+
+
+## Swapping Subscriptions
+
+To swap a user to a new subscription, use the `swap` method:
+
+```
+$user->subscription('premium')->swap();
+```
+
+If the user is on trial, the trial will be maintained as normal. Also, if a "quantity" exists for the subscription, that quantity will also be maintained.
+
+
+## Subscription Quantity
+
+Sometimes subscriptions are affected by "quantity". For example, your application might charge $10 per month per user on an account. To easily increment or decrement your subscription quantity, use the `increment` and `decrement` methods:
+
+```
+$user = User::find(1);
+
+$user->subscription()->increment();
+
+// Add five to the subscription's current quantity...
+$user->subscription()->increment(5)
+
+$user->subscription->decrement();
+
+// Subtract five to the subscription's current quantity...
+$user->subscription()->decrement(5)
+```
+
+
+## Cancelling A Subscription
+
+Cancelling a subscription is a walk in the park:
+
+```
+$user->subscription()->cancel();
+```
+
+When a subscription is cancelled, Cashier will automatically set the `subscription_ends_at` column on your database. This column is used to know when the `subscribed` method should begin returning `false`. For example, if a customer cancels a subscription on March 1st, but the subscription was not scheduled to end until March 5th, the `subscribed` method will continue to return `true` until March 5th.
+
+
+## Resuming A Subscription
+
+If a user has cancelled their subscription and you wish to resume it, use the `resume` method:
+
+```
+$user->subscription('monthly')->resume($creditCardToken);
+```
+
+If the user cancels a subscription and then resumes that subscription before the subscription has fully expired, they will not be billed immediately. Their subscription will simply be re-activated, and they will be billed on the original billing cycle.
+
+
+## Checking Subscription Status
+
+To verify that a user is subscribed to your application, use the `subscribed` command:
+
+```
+if ($user->subscribed())
+{
+ //
+}
+```
+
+The `subscribed` method makes a great candidate for a route filter:
+
+```
+Route::filter('subscribed', function()
+{
+ if (Auth::user() && ! Auth::user()->subscribed())
+ {
+ return Redirect::to('billing');
+ }
+});
+```
+
+You may also determine if the user is still within their trial period (if applicable) using the `onTrial` method:
+
+```
+if ($user->onTrial())
+{
+ //
+}
+```
+
+To determine if the user was once an active subscriber, but has cancelled their subscription, you may use the `cancelled` method:
+
+```
+if ($user->cancelled())
+{
+ //
+}
+```
+
+You may also determine if a user has cancelled their subscription, but are still on their "grace period" until the subscription fully expires. For example, if a user cancels a subscription on March 5th that was scheduled to end on March 10th, the user is on their "grace period" until March 10th. Note that the `subscribed` method still returns `true` during this time.
+
+```
+if ($user->onGracePeriod())
+{
+ //
+}
+```
+
+The `everSubscribed` method may be used to determine if the user has ever subscribed to a plan in your application:
+
+```
+if ($user->everSubscribed())
+{
+ //
+}
+```
+
+
+## Handling Failed Payments
+
+What if a customer's credit card expires? No worries - Cashier includes a Webhook controller that can easily cancel the customer's subscription for you. Just point a route to the controller:
+
+```
+Route::post('stripe/webhook', 'Laravel\Cashier\WebhookController@handleWebhook');
+```
+
+That's it! Failed payments will be captured and handled by the controller. The controller will cancel the customer's subscription after three failed payment attempts. The `stripe/webhook` URI in this example is just for example. You will need to configure the URI in your Stripe settings.
+
+If you have additional Stripe webhook events you would like to handle, simply extend the Webhook controller:
+
+```
+class WebhookController extends Laravel\Cashier\WebhookController {
+
+ public function handleWebhook()
+ {
+ // Handle other events...
+
+ // Fallback to failed payment check...
+ return parent::handleWebhook();
+ }
+
+}
+```
+
+> **Note:** In addition to updating the subscription information in your database, the Webhook controller will also cancel the subscription via the Stripe API.
+
+
+
+## Invoices
+
+You can easily retrieve an array of a user's invoices using the `invoices` method:
+
+```
+$invoices = $user->invoices();
+```
+
+When listing the invoices for the customer, you may use these helper methods to display the relevant invoice information:
+
+```
+{{ $invoice->id }}
+
+{{ $invoice->dateString() }}
+
+{{ $invoice->dollars() }}
+```
+
+Use the `downloadInvoice` method to generate a PDF download of the invoice. Yes, it's really this easy:
+
+```
+return $user->downloadInvoice($invoice->id, [
+ 'vendor' => 'Your Company',
+ 'product' => 'Your Product',
+]);
+```
diff --git a/docs/docs/ad1v2f.md b/docs/docs/ad1v2f.md
new file mode 100644
index 0000000..15a4b30
--- /dev/null
+++ b/docs/docs/ad1v2f.md
@@ -0,0 +1,37 @@
+---
+url: ad1v2f
+---
+
+# API控制器规范
+
+
+## 资源控制器
+
+
**必须** 优先使用 [Restful 资源控制器](http://learnku.com/docs/laravel/5.5/controllers#restful-resource-controllers) 。
+
+
+## 单数 or 复数?
+
+
**必须** 使用资源的复数形式,如:
+
+> - 类名:PhotosController
+> - 文件名:PhotosController.php
+
+
+
错误的例子:
+
+> - 类名:PhotoController
+> - 文件名:PhotoController.php
+
+
+
+
+## 保持短小精炼
+
+
**必须** 保持控制器文件代码行数最小化,还有可读性。
+
+- **不应该** 为「方法」书写注释,这要求方法取名要足够合理,不需要过多注释;
+- **应该** 为一些复杂的逻辑代码块书写注释,主要介绍产品逻辑 - `为什么要这么做。`;
+- **不应该** 在控制器中书写「私有方法」,控制器里 `应该` 只存放「路由动作方法」;
+- **绝不** 遗留「死方法」,就是没有用到的方法,控制器里的所有方法,都应该被使用到,否则应该删除;
+- **绝不** 在控制器里批量注释掉代码,无用的逻辑代码就必须清除掉。
diff --git a/docs/docs/baota_install.md b/docs/docs/baota_install.md
new file mode 100644
index 0000000..95c9286
--- /dev/null
+++ b/docs/docs/baota_install.md
@@ -0,0 +1,925 @@
+## 约定
+
+- 操作系统:Centos 7.x x64
+- 操作权限:root
+- 宝塔面板:[宝塔Linux面板 7.9](https://www.bt.cn/bbs/thread-19376-1-1.html)
+- 以下安装仅供参考,也可自行安装,关键配置对照文档即可。
+
+## 软件版本清单
+
+- supervisorctl > 2.0
+- mysql 5.7或者更高版本
+- nginx
+- node = 16.16.0 & 20.19.0(PC商城必须)
+- redis > 4.0
+- php 8.2
+
+## 文档示例中主要配置展示
+
+**注意:根据实际情况修改对应目录、域名、数据库配置、redis配置、其他配置等等!**
+
+**如果使用小程序,域名一定是要https协议的,所以参照文档的时候,注意跳转http、https等是否一致**
+
+***生产环境一定要全部用https协议*,这里ecshopx.demo.com是我绑定了本地hosts来使用,所以如果没有域名,也可以这样做绑定本地hosts吧。**
+
+```bash
+● 测试域名
+ecshopx.demo.com
+● 测试H5域名
+ecshopx-h5.demo.com
+● 代码主目录
+/www/wwwroot/ecshopx.demo.com
+● php代码目录
+/www/wwwroot/ecshopx.demo.com/ECShopX
+● 管理后台代码目录
+/www/wwwroot/ecshopx.demo.com/ECShopX_admin-frontend
+● H5代码目录
+/www/wwwroot/ecshopx.demo.com/ECShopX_mobile-frontend
+● PC代码目录
+/www/wwwroot/ecshopx.demo.com/ECShopX_desktop-frontend
+● php的配置文件位置
+/www/wwwroot/ecshopx.demo.com/ECShopX_-frontend/.env
+```
+
+## 安装宝塔Linux面板
+
+本文档编写时基于宝塔Linux面板 7.9.1版本,本文不做宝塔面板本身的安装教程。具体可以点击下面链接参照宝塔官方文档安装宝塔面板,并且需要按照宝塔的要求进行基础设施搭建
+
+[https://www.bt.cn/bbs/thread-19376-1-1.html](https://www.bt.cn/bbs/thread-19376-1-1.html)
+
+> **附宝塔安装要求(摘自官方):**
+>
+> 内存:512M以上,推荐768M以上(纯面板约占系统60M内存)
+>
+> 硬盘:300M以上可用硬盘空间(纯面板约占20M磁盘空间)
+>
+> 系统:CentOS 7.1+ (Ubuntu16.04+.、Debian9.0+),**确保是干净的操作系统,没有安装过其它环境带的Apache/Nginx/php/MySQL/pgsql/gitlab/java(已有环境不可安装)**
+>
+> 架构:x86_64(主流服务器均是此架构),ARM不完整兼容(面板环境安装慢,部分软件可能安装不上)
+
+## 基础软件部署
+
+### 安装PHP-8.2
+
+
+### 安装扩展fileinfo
+composer install 的时候需要这个php扩展,在php管理面板中安装此扩展,并重启php
+
+
+
+### 删除部分php被禁用函数
+在php管理面板中的`禁用函数`菜单中删除以下被禁用函数
+
+> `putenv`
+>
+> `shell_exec`
+>
+> `symlink`
+>
+> `proc_open`
+>
+> `pcntl_alarm`
+>
+> `pcntl_fork`
+>
+> `pcntl_wait`
+>
+> `pcntl_signal`
+>
+> `pcntl_signal_dispatch`
+
+### 安装composer
+
+> 默认composer源网站是在国外,国内访问速度慢,这里换成国内的阿里云的composer镜像源
+
+在终端中执行以下命令安装php的包管理工具 composer
+
+
+
+```bash
+curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/bin --filename=composer
+/usr/bin/composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/
+```
+
+安装好后在终端中执行以下命令检查是否安装好
+
+### 安装Nginx
+
+> 本文选择的是nginx1.20版本
+
+
+
+### 安装MySQL
+
+> 本文选择的是mysql5.7.37版本,一般mysql8.0也是可以的
+
+
+
+### 添加数据库
+
+在宝塔面板`**数据库**`中,点击`**添加数据库**`**,**填写对应的数据库名、用户名、密码,字符编码选择 `**utf8mb4**`**,**添加好数据库后,安装应用的时候需要配置进去,所以需要记下来对应配置
+
+
+
+例如我们这里设置成`数据库名:ecshopx,用户名:ecshopx,密码:ecshopx123`
+
+### 安装phpMyAdmin
+
+> 本文选择的是phpMyAdmin 5.0.0 Stable版本,宝塔默认通过phpmyadmin管理mysql
+
+
+
+### 安装Redis
+
+> 本文选择的是redis 6.2.6版本
+
+
+
+修改redis密码
+
+打开redis管理界面,点击`配置文件`,搜索 `requirepass`,取消这一行的注释,然后修改redis密码
+
+
+
+例如我们修改为
+
+```bash
+requirepass 123456
+```
+
+然后保存并重启redis
+
+### 安装Supervisor管理器
+
+本文选选择的是supervisor 2.2版本
+
+
+
+### 安装nodejs
+
+本文选择的是PM2管理器2,node.js管理器,内置 node.js + npm + nvm + pm2.!
+
+
+
+在宝塔后台修改node版本,建议在宝塔后台选择版本,下文还有终端修改的命令
+
+
+
+在终端中修改版本,终端中直接改,下次再进终端,版本又会变成v16,这里需要注意
+
+```bash
+使用nvm安装版本v16的node
+nvm install v16.16.0
+
+切换成v16版本的node
+nvm use v16.16.0
+
+查看版本
+node -v
+```
+
+如下,版本显示 v16.16.0,下文安装编译管理后台和H5都需要v16版本的node
+
+
+
+**注意:在终端中可能每次重新打开后node版本又会变掉,这里需要注意,每次执行node命令需要检查一次node版本是否为v16**
+
+## 系统应用部署
+
+代码部署分以下几部分
+
+> 系统是前后端分离的。
+>
+> API服务(PHP开发,提供api服务)
+>
+> 平台管理端(VUE开发)
+>
+> 小程序/H5端(TARO开发)
+
+### 部署API服务(php)
+
+- 克隆代码
+
+```bash
+git clone https://gitee.com/ShopeX/ECShopX.git
+```
+
+- 修改目录权限为www,因为宝塔站点默认权限是www
+
+```bash
+chown -R www:www /www/wwwroot/ecshopx.demo.com/ECShopX
+```
+
+- 进入目录
+
+```bash
+cd /www/wwwroot/demo.ecshopx.com/ECShopX
+```
+
+- 安装composer包
+
+```bash
+# 安装composer包
+composer install
+```
+
+- 生成配置文件
+
+```bash
+# 生成env配置文件
+# .env.full 文件是完整配置,.env.example 文件是基础配置。
+cp .env.example .env
+```
+
+- **生成APP_KEY密钥**
+
+> 注意:2.8.0及以后版本才有这个命令,之前的需要手动修改.env中的APP_KEY配置
+
+```bash
+# 生成密钥,用于敏感数据加密等使用
+php artisan key:generate
+```
+
+- **生成api token密钥**
+
+```bash
+# 生成api token密钥
+php artisan jwt:secret
+```
+
+- **配置域名**
+
+> **注意:这个一定要配置正确,是后台php访问域名,许多配置依赖于此**
+
+```bash
+# 修改成您访问php对应的域名,例如我的后台域名是:https//ecshopx.demo.com
+APP_URL=http://ecshopx.demo.com
+```
+
+- **配置MYSQL数据库**
+
+```bash
+# 数据库相关配置
+## DB_CONNECTION默认不需要改
+DB_CONNECTION=default
+DB_HOST=127.0.0.1
+DB_PORT=3306
+DB_DATABASE=ecshopx
+DB_USERNAME=ecshopx
+DB_PASSWORD=ecshopx123
+```
+
+- **配置REDIS**
+
+```bash
+# REDIS配置
+REDIS_CLIENT=predis
+REDIS_HOST=127.0.0.1
+## 必须要设置密码
+REDIS_PASSWORD=123456
+REDIS_PORT=6379
+## 如果按照服务配置,则参考config/database.php中redis部分进行配置,并注释下面这条默认项,按需配置
+REDIS_DATABASE=0
+```
+
+- 配置云存储
+
+> 默认使用阿里云的OSS云存储,存储图片、视频、上传私有文件等,如果没有云存储可以跳过配置下一步的本地存储
+
+```bash
+
+# 文件存储相关配置
+## oss(阿里云OSS)、qiniu(七牛云)、aws(亚马逊s3)、local(本地存储)
+DISK_DRIVER=oss
+## 当前客户文件存放目录
+OSS_PROJECT_NAME=default_project
+
+## OSS密钥配置
+OSS_ACCESS_KEY=
+OSS_SECRET_KEY=
+
+## OSS私有文件配置
+OSS_FILE_ENDPOINT=https://oss-cn-shanghai.aliyuncs.com
+### OSS私有文件存储bucket
+OSS_FILE_BUCKET=oss-cdn
+### 是否开启cname,私有文件不需要开
+OSS_FILE_IS_CNAME=false
+
+## OSS公共读图片配置
+OSS_IMAGE_ENDPOINT=https://oss-cn-shanghai.aliyuncs.com
+### OSS公有图片bucket
+OSS_IMAGE_BUCKET=oss-cdn
+### 是否开启cdn
+OSS_IMAGE_IS_CNAME=false
+### 图片cdn,开启cdn则该配置必填
+OSS_IMAGE_DOMAIN=
+
+## OSS公共读视频配置
+OSS_VIDEO_ENDPOINT=https://oss-cn-shanghai.aliyuncs.com
+### OSS公有视频bucket
+OSS_VIDEO_BUCKET=oss-cdn
+### 是否开启cdn
+OSS_VIDEO_IS_CNAME=flase
+### 视频cdn,开启cdn则该配置必填
+OSS_VIDEO_DOMAIN=
+```
+
+- 配置本地存储
+
+> 如果还没有云存储,也可以配置本地存储
+
+```bash
+# 会在public目录下生成一个连接storage目录的软连
+php artisan storage:link
+```
+
+> 修改存储驱动为
+
+```bash
+# 文件存储相关配置
+## oss(阿里云OSS)、qiniu(七牛云)、aws(亚马逊s3)、local(本地存储)
+DISK_DRIVER=local
+```
+
+- 配置支付通知接口(以微信支付为例)
+
+> 2.8.0及以后的版本可以不配置,只用配置APP_URL即可
+
+```bash
+WECHAT_PAYMENT_NOTIFY=https://您的网址/wechatAuth/wxpay/notify
+```
+
+- 完整的例子
+
+```bash
+# 应用名称
+APP_NAME=EcshopX2.0
+# 标识应用环境, 本地环境设置为local,生产环境为production
+APP_ENV=local
+# 数据加密密钥
+APP_KEY=
+# 调试模式, 正式环境需要关闭(true,false)
+APP_DEBUG=true
+# php访问域名,不要带最后的斜杠,一定要配置
+APP_URL=http://ecshopx.demo.com
+# 时区不要修改
+APP_TIMEZONE=PRC
+
+# 数据库相关配置
+## DB_CONNECTION默认不需要改
+DB_CONNECTION=default
+DB_HOST=127.0.0.1
+DB_PORT=3306
+DB_DATABASE=ecshopx
+DB_USERNAME=ecshopx
+DB_PASSWORD=ecshopx123
+
+# REDIS配置
+REDIS_CLIENT=predis
+REDIS_HOST=127.0.0.1
+## 必须要设置密码
+REDIS_PASSWORD=123456
+REDIS_PORT=6379
+## 如果按照服务配置,则参考config/database.php中redis部分进行配置,并注释下面这条默认项,按需配置
+REDIS_DATABASE=0
+
+# 文件存储相关配置
+## oss(阿里云OSS)、qiniu(七牛云)、aws(亚马逊s3)、local(本地存储)
+DISK_DRIVER=local
+## 当前客户文件存放目录
+OSS_PROJECT_NAME=default_project
+
+## OSS密钥配置
+OSS_ACCESS_KEY=
+OSS_SECRET_KEY=
+
+## OSS私有文件配置
+OSS_FILE_ENDPOINT=https://oss-cn-shanghai.aliyuncs.com
+### OSS私有文件存储bucket
+OSS_FILE_BUCKET=oss-cdn
+### 是否开启cname,私有文件不需要开
+OSS_FILE_IS_CNAME=false
+
+## OSS公共读图片配置
+OSS_IMAGE_ENDPOINT=https://oss-cn-shanghai.aliyuncs.com
+### OSS公有图片bucket
+OSS_IMAGE_BUCKET=oss-cdn
+### 是否开启cdn
+OSS_IMAGE_IS_CNAME=false
+### 图片cdn,开启cdn则该配置必填
+OSS_IMAGE_DOMAIN=
+
+## OSS公共读视频配置
+OSS_VIDEO_ENDPOINT=https://oss-cn-shanghai.aliyuncs.com
+### OSS公有视频bucket
+OSS_VIDEO_BUCKET=oss-cdn
+### 是否开启cdn
+OSS_VIDEO_IS_CNAME=flase
+### 视频cdn,开启cdn则该配置必填
+OSS_VIDEO_DOMAIN=
+
+# 微信第三方平台配置,本地开发环境不配置, 会影响到调用微信的相关页面, 整体不影响后台开发。
+## 第三方平台APPID
+WECHAT_APPID=
+## 第三方平台SECRET
+WECHAT_SECRET=
+## 消息校验Token
+WECHAT_TOKEN=
+## 消息加解密Key
+WECHAT_AES_KEY=
+## 是否需要服务号,false则需要自己绑定到开放平台
+WX_OPEN_THIRD=true
+## 是否需要第三方平台
+WXA_NEED_OPEN_PLATFORM=true
+
+## 支付宝配置
+ALIPAY_PAYMENT_RETURN_H5=https://h5域名
+
+# JWT相关配置,通过php artisan jwt:secret生成密钥,线上务必重新生成
+JWT_SECRET=ker4H1Gp4TsddddWJMac2SMA8Zsh3drv
+JWT_TTL=7200
+JWT_REFRESH_TTL=20160
+
+# 缓存驱动, 默认使用redis
+CACHE_DRIVER=redis
+
+# 队列驱动, 默认使用redis
+QUEUE_DRIVER=redis
+
+# 是否saas
+SYSTEM_IS_SAAS=false
+# 设置系统主要的企业id,用于pc和h5
+SYSTEM_MAIN_COMPANYS_ID=1
+# 是否使用系统菜单,false则是固定菜单,true则更新storage/static/目录下的菜单
+USE_SYSTEM_MENU=true
+# 系统版本
+PRODUCT_MODEL=platform
+
+# 腾讯地图接口KEY, 建议根据项目进行申请
+QQMAP_KEY=
+# 腾讯地图配置, 建议根据项目进行申请
+API_TENCENT_POSITION_APP_KEY=
+API_TENCENT_POSITION_APP_SECRET=
+
+# 高德地图key
+AMAP_LBS_KEY=
+
+# 汇付企账通相关配置
+## true启用汇付支付渠道其他支付渠道则隐藏
+HFPAY_IS_OPEN=false
+
+# 达达同城配送相关配置
+DADA_APP_KEY=
+DADA_APP_SECRET=
+DADA_IS_ONLINE=true
+
+# 是否加密敏感数据,配合配置APP_KEY使用
+ENCRYPT_SENSITIVE_DATA=false
+```
+
+#### 更新数据库
+
+- 数据库迁移(将表和初始化数据更新到数据库中)
+
+```bash
+php artisan doctrine:migrations:migrate
+```
+
+#### 配置定时任务
+
+- 在面板`计划任务`菜单中,添加一个计划任务如下,每分钟跑一次
+
+```bash
+sudo -E -u www php /www/wwwroot/ecshopx.demo.com/ECShopX/artisan schedule:run >> /www/wwwroot/ecshopx.demo.com/ECShopX/storage/logs/ecshopx-cront.log 2>&1
+```
+
+- 添加上述脚本内容后保存
+
+
+
+#### 配置队列服务
+
+- 打开`Supervisor管理器`界面,点击`添加守护进程`,如下界面
+
+
+
+- 例如添加队列
+
+名称:`ecshopx-queue-default`
+
+启动用户:`www`
+
+运行目录选择php目录: `/www/wwwroot/ecshopx.demo.com/ECShopX`
+
+启动命令:`php artisan queue:work --queue=default --delay=3 --memory=128 --timeout=30 --sleep=1 --tries=3`
+
+进程数量:`1`
+
+点击确定,然后在`守护进程管理菜单`启动队列
+
+
+
+- 添加默认队列:`ecshopx-queue-default`
+
+```bash
+[program:ecshopx-queue-default]
+command=/www/wwwroot/ecshopx.demo.com/ECShopX/artisan queue:work --queue=default --delay=3 --memory=128 --timeout=30 --sleep=1 --tries=3
+stdout_logfile=/www/wwwroot/ecshopx.demo.com/ECShopX/storage/logs/supervisor-bloated-queue-default.log
+redirect_stderr=true
+process_name=%(program_name)s_%(process_num)02d
+autostart=true
+autorestart=true
+numprocs=1
+user=www
+startsecs=3
+startretries=100000
+```
+
+- 添加慢队列:`ecshopx-queue-slow`
+
+```bash
+[program:ecshopx-queue-slow]
+command=/www/wwwroot/ecshopx.demo.com/ECShopX/artisan queue:work --queue=slow --delay=3 --memory=128 --timeout=1800 --sleep=1 --tries=3
+stdout_logfile=/www/wwwroot/ecshopx.demo.com/ECShopX/storage/logs/supervisor-bloated-queue-slow.log
+redirect_stderr=true
+process_name=%(program_name)s_%(process_num)02d
+redirect_stderr=true
+autostart=true
+autorestart=true
+numprocs=1
+user=www
+startsecs=3
+startretries=100000
+```
+
+- 添加短信队列:`ecshopx-queue-sms`
+
+```bash
+[program:ecshopx-queue-sms]
+command=/www/wwwroot/ecshopx.demo.com/ECShopX/artisan queue:work --queue=sms --delay=3 --memory=128 --timeout=1800 --sleep=1 --tries=3
+stdout_logfile=/www/wwwroot/ecshopx.demo.com/ECShopX/storage/logs/supervisor-bloated-queue-sms.log
+redirect_stderr=true
+process_name=%(program_name)s_%(process_num)02d
+redirect_stderr=true
+autostart=true
+autorestart=true
+numprocs=1
+user=www
+startsecs=3
+startretries=100000
+```
+
+> 也可以添加好后在`子配置文件`中切换并修改,填写上面的配置
+
+### 部署管理后台(vue)
+
+- 克隆代码
+
+```bash
+git clone https://gitee.com/ShopeX/ECShopX_admin-frontend.git
+```
+
+- 进入目录
+
+```bash
+cd /www/wwwroot/demo.ecshopx.com/ECShopX_admin-frontend
+```
+
+- 检查配置文件
+
+```bash
+vim .env.production
+```
+
+- 安装npm包
+
+```bash
+// 先安装@shopex/finder
+npm i @shopex/finder --registry=http://registry.npm.ishopex.cn/
+
+// 安装其余依赖
+npm install
+```
+
+- 项目部署
+
+品牌云店模式
+```plain
+npm run build:b2c
+```
+
+多商户入驻平台模式
+```plain
+npm run build:bbc
+```
+
+> 编译好后,代码生成在dist目录下,如下图
+
+
+
+#### 新建API和管理后台站点
+
+> 例如说这里新建了一个 `ecshopx.demo.com` 的站点,由于数据库我们前面已经创建过了,这里就不要再重新创建了
+
+
+
+#### 配置API和管理后台Nginx配置
+
+这里提前将php、vue的nginx配置配好了,有些目录是下一步才建的,所以这里需要注意,具体配置如下
+
+注意:下面配置中如果没有域名,可以改为ip地址
+
+```bash
+server
+{
+ listen 80;
+ server_name ecshopx.demo.com;
+
+ add_header 'Access-Control-Allow-Origin' '*' always;
+ add_header Access-Control-Allow-Headers "Content-Type, Access-Control-Allow-Headers, Authorization, X-Requested-With";
+ add_header Access-Control-Expose-Headers "Authorization";
+ add_header Access-Control-Allow-Methods "DELETE, GET, HEAD, POST, PUT, OPTIONS, TRACE, PATCH";
+
+ if ($request_method = OPTIONS ) {
+ return 200;
+ }
+
+ location /api/ {
+ proxy_set_header Host $host;
+ proxy_set_header X-Real-IP $remote_addr;
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+ client_max_body_size 32m;
+ client_body_buffer_size 256k;
+ proxy_pass http://127.0.0.1:8081;
+ }
+
+ location /wechatAuth/ {
+ proxy_pass http://127.0.0.1:8081;
+ }
+
+ location /storage/ {
+ alias /data/httpd/ECShopX/storage/app/public/;
+ #autoindex on;
+ }
+
+ location / {
+ root /www/wwwroot/ecshopx.demo.com/ECShopX_admin-frontend/dist;
+ index index.html index.htm;
+ try_files $uri $uri/ /index.html =404;
+ }
+
+ access_log /www/wwwlogs/ecshopx.demo.com.log;
+ error_log /www/wwwlogs/ecshopx.demo.com.error.log;
+}
+
+server
+{
+ listen 8081;
+ server_name _;
+ index index.php index.html index.htm;
+ root /www/wwwroot/ecshopx.demo.com/ECShopX_admin-frontend/public;
+
+ #SSL-START SSL相关配置,请勿删除或修改下一行带注释的404规则
+ #error_page 404/404.html;
+ #SSL-END
+
+ #ERROR-PAGE-START 错误页配置,可以注释、删除或修改
+ #error_page 404 /404.html;
+ #error_page 502 /502.html;
+ #ERROR-PAGE-END
+
+ #PHP-INFO-START PHP引用配置,可以注释或修改
+ include enable-php-74.conf;
+ #PHP-INFO-END
+
+ #REWRITE-START URL重写规则引用,修改后将导致面板设置的伪静态规则失效
+ location / {
+ try_files $uri $uri/ /index.php$is_args$args;
+ }
+ #REWRITE-END
+
+ #禁止访问的文件或目录
+ location ~ ^/(\.user.ini|\.htaccess|\.git|\.svn|\.project|LICENSE|README.md)
+ {
+ return 404;
+ }
+
+ #一键申请SSL证书验证目录相关设置
+ location ~ \.well-known{
+ allow all;
+ }
+
+ location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
+ {
+ expires 30d;
+ error_log /dev/null;
+ access_log /dev/null;
+ }
+
+ location ~ .*\.(js|css)?$
+ {
+ expires 12h;
+ error_log /dev/null;
+ access_log /dev/null;
+ }
+
+}
+```
+
+打开nginx站点修改,点击左侧菜单`配置文件`,将上面的配置复制进去,修改对应的域名和目录位置,如果没有域名,用ip也是可以的,如下图
+
+
+
+### 小程序/H5编译打包(taro)
+
+#### 编译H5
+
+- 检查node版本是否为v16
+
+```bash
+# 不要完全复制,看看您本地的v16的小版本是哪个,然后就使用哪个版本
+# 本文档编写的时候是v16.16.0
+# 检查版本
+node -v
+# 如果版本不是 v16,则执行下面或者去宝塔后台的pm2面板进行修改切换,
+# 或者用下面命令行切换,建议去宝塔后台切换node版本
+nvm use v16.16.0
+```
+
+- 克隆代码
+
+```bash
+git clone https://gitee.com/ShopeX/ECShopX_mobile-frontend.git
+```
+
+- 进入目录
+
+```bash
+cd /www/wwwroot/ecshopx.demo.com/ECShopX_mobile-frontend
+```
+
+- 依赖安装
+
+```bash
+# 如遇初始化下载时间过长或者network timeout,可更换npm镜像源
+# npm更换淘宝镜像,使用此命令后,npm指令关键词改为(cnpm),例如:npm i 改为 cnpm i
+# 更换命令:npm install -g cnpm --registry=https://registry.npm.taobao.org
+
+# 先安装插件
+npm install @shopex/taro-plugin-modules -S --registry=http://registry.npm.ishopex.cn
+
+# 再安装其他依赖
+npm install
+```
+
+- 环境变量
+
+> 复制一个配置文件
+
+```bash
+cp .env.example .env
+```
+
+> 需要申请一个高德地图的key,配置中只需要修改域名的部分
+>
+> 注意:小程序需要配置APP_ID,编译H5则可以忽略
+
+```json
+APP_BASE_URL=http://ecshopx.demo.com/api/h5app/wxapp
+APP_WEBSOCKET=wss://ecshopx.demo.com/ws
+APP_COMPANY_ID=1
+APP_PLATFORM=platform
+APP_CUSTOM_SERVER=http://ecshopx.demo.com/
+APP_HOME_PAGE=/pages/index
+APP_TRACK=youshu
+APP_YOUSHU_TOKEN=
+APP_ID= // 小程序APPID
+APP_MAP_KEY= // 高德地图key
+APP_MAP_NAME=门店定位
+APP_IMAGE_CDN=https://b-img-cdn.yuanyuanke.cn/ecshopx-vshop
+
+```
+
+- npm打包指令
+
+> 执行生产环境H5打包命令`npm run build:h5`
+>
+> 注意:小程序需要本地执行,在开发者工具进行推送,注意命令差异
+
+```bash
+# 小程序本地开发编译
+npm run dev:weapp
+
+# 小程序生产打包
+npm run build:weapp
+
+# H5本地开发编译
+npm run dev:h5
+
+# H5生产打包
+npm run build:h5
+```
+
+#### 新建H5站点
+
+> 例如说这里新建了一个 `ecshopx-h5.demo.com` 的站点,由于数据库我们前面已经创建过了,这里就不要再重新创建了,php版本选择`纯静态`,根目录选择编译后的h5目录,如下图
+>
+> `/www/wwwroot/ecshopx.demo.com/ECShopX_mobile-frontend/dist/h5`
+
+
+
+#### 配置H5的Nginx配置
+
+```bash
+server
+{
+ listen 80;
+ server_name ecshopx-h5.demo.com;
+ index index.php index.html index.htm default.php default.htm default.html;
+ root /www/wwwroot/ecshopx.demo.com/ECShopX_mobile-frontend/dist/h5;
+
+ #SSL-START SSL相关配置,请勿删除或修改下一行带注释的404规则
+ #error_page 404/404.html;
+ #SSL-END
+
+ #ERROR-PAGE-START 错误页配置,可以注释、删除或修改
+ #error_page 404 /404.html;
+ #error_page 502 /502.html;
+ #ERROR-PAGE-END
+
+ #PHP-INFO-START PHP引用配置,可以注释或修改
+ include enable-php-00.conf;
+ #PHP-INFO-END
+
+ #REWRITE-START URL重写规则引用,修改后将导致面板设置的伪静态规则失效
+ location / {
+ index index.html index.htm;
+ try_files $uri $uri/ /index.html =404;
+ }
+ #REWRITE-END
+
+ #禁止访问的文件或目录
+ location ~ ^/(\.user.ini|\.htaccess|\.git|\.svn|\.project|LICENSE|README.md)
+ {
+ return 404;
+ }
+
+ #一键申请SSL证书验证目录相关设置
+ location ~ \.well-known{
+ allow all;
+ }
+
+ location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
+ {
+ expires 30d;
+ error_log /dev/null;
+ access_log /dev/null;
+ }
+
+ location ~ .*\.(js|css)?$
+ {
+ expires 12h;
+ error_log /dev/null;
+ access_log /dev/null;
+ }
+ access_log /www/wwwlogs/ecshopx-h5.demo.com.log;
+ error_log /www/wwwlogs/ecshopx-h5.demo.com.error.log;
+}
+```
+
+打开nginx站点修改,点击左侧菜单`配置文件`,将上面的配置复制进去,修改对应的域名和目录位置,如果是纯静态的H5应该直接新建站点选好对应目录就能用了,比php和管理后台的部署要简单的,如下图
+
+
+
+#### 注意事项
+
+> - 关于小程序预览,dev:weapp本地开发编译模式下因为主包过大无法上传预览,需要使用build:weapp打包后选择小程序开发工具中的详情->本地设置->上传代码时自动压缩混淆。
+> - H5编译文件生成在目录 ECShopX_mobile-frontend/dist/h5/ 下。
+> - 小程序编译文件生成在目录 ECShopX_mobile-frontend/dist/weapp/ 下。
+> - 小程序需要将相关域名配置到小程序的白名单当中
+
+```bash
+# request合法域名
+https://api域名
+# 下面这行一般配置oss原始域名或者cdn域名
+https://oss-cn-shanghai.aliyuncs.com
+https://restapi.amap.com
+https://zhls.qq.com
+
+
+# uploadFile合法域名:
+https://api域名
+# 下面这行一般配置oss原始域名或者cdn域名
+https://oss-cn-shanghai.aliyuncs.com;
+
+# downloadFile合法域名
+https://api域名
+# 下面这行一般配置oss原始域名或者cdn域名
+https://oss-cn-shanghai.aliyuncs.com
+https://b-img-cdn.yuanyuanke.cn
+https://mmbiz.qpic.cn
+https://wx.qlogo.cn
+https://thirdwx.qlogo.cn
+https://wework.qpic.cn
+```
+
diff --git a/docs/docs/bbzfmn.md b/docs/docs/bbzfmn.md
new file mode 100644
index 0000000..6c66aeb
--- /dev/null
+++ b/docs/docs/bbzfmn.md
@@ -0,0 +1,7 @@
+---
+url: bbzfmn
+---
+
+# 版本列表
+
+{"format":"lakesheet","type":"Sheet","version":"3.5.5","larkJson":true,"sheet":"xí}ës\u0015Gç¿rù0ê\r3³Þ8v#z{vf¼±³=1îÞÙ\bÈÊÊ\u0002M\u000b]\u001eØî\u0010\u0006!\u0000óF\u0018\tó2\u0018\tÛ\u0018$àiÕ½Wú_Øy²®êÖCííÚ\u000fõ\u0005tïÌÊúåÉsÎïäÉS\u001fÿÇQ~XîÙ¿ç£CRNÒ=ïí\u0019oúöÔèäý÷öLÈ\u0011)&Û£\u0013{öÿúqÏ~\n_öÈývöjª¿ÜùÀ¡Õ\u0011ù/i\u0003üø\u001bÝìOºîª&ÿ\bC`\u001e|oe>3èqjb²}ø#ó\u0019~·3¿[û\u001cßó\\ßql×÷ÜÕ¹_¡½×>ê9åQ\u0012X
¦?BKw§¥£Fïezr᳿óZd\u001f³\\7°-Ë)ö]ø\u0019Z\u0007;-kðrËß)Ù¹ÀÎb³?ýI\u0003?u\u0018geb{¹ÛÞ Ú¹+¨>îÀ×\f>5\rh®a@Õ@âáI9\u000e×ÁßãülÏ~\u000b\u0016¼·ç°\u001c?(#GFôxÉ~Ò\u0017¬T®H¥\\¹ê&Ã\u0011Èë?ünì´·'A>?ÊHéÇÀ8ÆÛ£(|ïíø$×÷êÿ3¡or\u0004úùo¿ùè\u001fûÏÿ»³4Ì访ÞÚøº»t´;?×Yü¶·ü`Âß´ ð73³¾¬â÷væ{'ó½ùÞ3[}Á¿Ìßd?Ðì\u0007ý`e?ØÙ\u000fNöý½?Í\u000efGÀ²#`Ù\u0011°ì\bXv\u0004,;\u0002\u001d\u0001ËeGÀvFbÞÙÆ©I\u0016Ϋy¸r·³x+;\u000f\u000eþüëþphìÐØ¯öd¦ÅÅþáÃßýßþÃ\u0010\u001f\u001bî>ZÕ\u0017XmÕÃOCG¦¤þÙ\u001elpxr¤}phâP{,íÀ\u0019ì ¹t\"¹u6y²Ð}p*Y_\u0018äãm}[ÚSÿB}M\n×tV\u0017¶Ö\u001eö^?\u0006ÙëÜxÚ¹ü¤ûí·[ë§·^é\\z²§´°¬´ÊL³å\u0005\u001ehW¼X\b3ÛgíÏH\u0011ÂEvæ\"gð\"k\u001f(ñìdûÅIÝz½Ò¹ø\":¸½8Ý»w\u0014d99=óÍÓø½àµùf«&ØÚe}fê\tv\u0006&\u0018øOÓú'etZá8\u001f\u0015Z\u001bÉ#r¤=ö·!Ë\u0012a\u0018r\"Õ\u001a\u001aú÷©ÑÏõo£Ð ³±Üûq©sõU÷ÎúÖÚÓÎg½û_''~ØZÞZ;Õ\u001ar=\"\u001d\u001eR+ß0y°}ìÁÖæÕα¥dnmûÊÊöí«p£Àâ\u001eqý×Û
)?ÞS~Á¹ÕíÙ3ËO¹\u001bÉÆúÎ$üu%ÁÛM\u0012ë±JI\bJ$\u0001(ôöÅ\u0015 ¡½§÷«X¦[2ùvÍÌþüõ+gÖ'Ô¡[>³ö>ÒXÑ\u001b&A}\u001fcçàÆtά/\u0012\rÇqçò,p?\u0015\u0004á\f%\u00139ËÐ9z;¹s¦ûôv²y\t\u001c\u0014\t;<¿JÇF{\u000bÊå\u0019\u0002\t\u000eÃòWÑ?O\u001fU*ãöWÆÆ¬nö>\u0006«sön²ð5þ´µvrûÚ9ãj½Ì=k1h÷áïºVU(bþt²°1öújü\u0012\\@È¡2·''Q.m_î\u001bÔÞÙçàm_y FsñZouU\u0005c`p'ð'ì\r«ïO¯'s'¶Öîô¦gZC¾¤Ò¡¡\u0015æ0Û%z½ÛÀoÏÜZ?\u0001Ýt.¾\u0002í\t\u001d¶°E$Y®îæåÞ«óØ\u0001F]àñÔí5`ÛÇ^v®®v\u0016.$3wáK\u001c4x\u0001\u0011\r%ÀÍó³rënwñT®³í\u0019\u0015\u0014PCù~Y\u0005\u001e´gkF|îL÷þ\u0013à®\u0013\u0012Á©ë/Û\u0013ÆðLôFº®\u001dÇÏOý§Ïa\u0000åÏÓçÑÙØÛÝ8C>££\u0007\u000bà÷[\u001bÏ;K0\u0016Ï\u0007°-WÅ\u000eJðc9z\u0010}\u0016íS\u001bIÒ5ºÜª/-´ø%Æ\"²\\\u0019G¹ñèÎãsØGgzCq-t×\u001f_é¬üØ\u001aò\u0002ÛuýPägÞlVíe\u0016ësò6èº ND<Ë\t\u000b®ØÙ\r°¹Éé¥í/×û§epkóèÖÚõäÕÊÖëeì&»Ó¹ü\u0018æø\u0002\f~\u0007¼?\u001e\u001a¼×9û yñ\u001aæ¾{ñÞêóιîÙ'\n¦E58ü¸={~ûöM\\B(\u0019Ý·:æ`\t \u000e\u0015\"òÒµµvJ!5ÿu2»\u0005|@D\u00004\u0007¢)=×+¸Î̼½¾\bHQ\u0001J(\b\n:¨xé\rX&8ÍÚ#%~lÑ |R3íLÔrîɸ'\u0014z°\n\u0005'ñ;·ô9\u001c+âN~¬·Ã|Ád\b©\u0005rîtçñ]\u0015KãÜqh Dïð°8ÄåH\u0006TÃÚ\u0000']ò¼GoÆñÅ\u0007Ùðaâék\u0005\u0016º ½<*&¤»q«·²\fÒÌ®ëÐ\u001dÄåDTAñé845\ní`áÞ&ïôQ\u001eæÂ±\u0015Øv\u001eªæ\u0000Il ðýüjDs \u001f®\r©\u0013:¢ 1autç¿é½¼×»\u001c~ëÅwú\"DBz\u0014\bMoõv\u000b§©¥+°8®\u001fïÌO\u0003¶ð\u0007\b÷\u0006Î^\u000b\u0014nrî^òüûîÆB«»q^EeôÀà\u0006o¾Ól*;£Åáo\u001b¢]$°`[\u001bw;7ïªP\u000e3¨Õød-y~³·úTÝÈõm[¸×38V5Ðï¾2òõäzgñavdª³+K\u001f.¥¢ÇÝ(t%ZÄì@b\u000eMÍ\u0014¥#î[F\\m½é£¸Í\u0001º>\bm*1v\u001d¢ÚøÀ¡á`[f\u0018F%àíÌxg~èþ°¡ÂG!\u0011_t$\u000eAú¬ z</Ïl½\\ÜÚI^G×ã/7Z*þyêÛßôlªßÀºÅ^\u0018:ZA\u0015'<ûH+Ï@Îà\u000e#ö®ì*x\f¡mñÖ<B/´ÐË5?Ü\u000eGdòz&Y~\u0004\u0006\n.cÜ\u0015NéMP'\u0017N\u001báWÂ68\u0017\"\u0014<\f#êäÞ\u0017¯\u0016Ñ6´¹kfX\u001a4ü\t¼\tíZª_[µî7ëÉÙ[Ê\\?>pÞ´Úô2CRû}óÀóì Ì?\u0012-P¿ãÃáÔd{üÃ\b\u0016!ñÃqi¿ùRø\u000e(í8ÿä8$(RÑ\u001ak\u001e¥ÜÞ\u0000gâN2t\u001f\u0013p°\u0002¿DÊsýÇ, qL°d(»Á\u0001³7Tö\u001eu\u000bH=\bxÌG&$L¼íØy^~ܪ_Ñ><ÆG??0\u001c¥\u0002@Eà\u001e¦ùùËÚ$¼ýk¼¼ýð´ö\tæÕÜ\u001a?\rª\t¯ÝZ7jegæ\\+b\f\"Rö¼ºCÜIò}\nTobæ®Tî\u0007®×Ë£Êhq@G ÇÝHó\fè\u0007áFÅ}F\u0000Í×àvöeÓ(\u000fÿN©Õ§«gAµgçA¹Ù3s8ð¾ÖWÓ¹\u0006ÜWóhÛÓ×{¯gs}½ö\u001c`Z X~ ¨äq^\\\u0013ßw\u001f\u001e\u0005¶Ì-)Ktù\u0005èoãàL|>*~?!Ç×þÈ19>Ñ\u001eÕkø üW\tLþk{ü\u000f\u001fÆm`?2ð¢¸UªJ{ÏW»\u0017¿\u0003-ár×åt©ã^eÇ
\u000f\u001dÕ¾ó§\u001d3Â`E¸;뺽+µþ\u0017<Èp{\u0006ä\u0000Ý7vh¬Qr&Á¸Æy4s0ä\f}Ôö½(\u000e#7'csììó\fËkµs\u001a¤~þ\u0005ðF\u001dc±´\u0002Ó3Å#è.$/d¯éôãÔ-(/ÿÒ\t\u0018Î'½swÁQ\u0007õ½}åé¡öÔøD2\u0003>Ï\u001a¬åÑ©\u000fZ4m\u000fÑ7ÜY\u0007\u001fGòáß\u0001²ù[|OýAí5°l\u0010ÈX>ÕqàS\u0003\u001cããåè$(\u000fZVÚ\u001a\u001f½xs\\>°Zùå×\u000f\u0019ùµñAËîw}ò\u001bµ÷1û\u0012 ýt¤}\u0010Äuk\u001d¸û|gé<~ûAË)\u001bG÷\"ø\rÏÓuÒüòQ´Êá¦=kwÝ\u0010 [ëÝåé\u001dþ«¿4|ïÊ3à:}J\u0004ßæISôèʳ\u000fZ^ÚÝ\u0000T©8)\u001b~?\u001d>÷Vïu7Nà?hùo÷
Óè1áG¥\u0006t`ä\u0003µÝk4\n_Õ&\u0019cãªÞ²%ÇÈÀ^Rñ²Xx\u0004(ÞÖ\u001f¼\f×0\bÒÅ\u0015³w¬åÍd¶¤.^`9$öóíaYÁ=\u0015õ\u0018&êä³Î4¸b!©Oi(\n·Ôª ¹s}ëå5\u001c%|u¢óì\u001eP¬\u0018\b¡oi÷:×F] \u0012'´¾Hî\u001cï;¡r$x\u00189¾S|z\u0014 l¥'FÙëºáBÆ®£\u0019îàóà¬Á º\u001bÇ{/¿U¢û\u0012\fâ¯Àk\u0002cå¸5\u0014xܲ#\"òp7¡Qʬûh5\r})uß\u001aÐ\råà®ãr¬=>rÜ}<ÎÈ\u001eõ\u001d?ïäï:\blhíÝ«\fJë}¥2P{¼÷'Hì\u0004ÜÊ\u001bp´\u0004Éó[ë'RímG¡\rww»ûO\u001f%'®%3w;Wî&¯¯ÀÂ\u0005\u0007z\u001fÐÆl\\NLL¶P{¥>åÕUD_\u0019ç¹kèt7/+iÔé^ê{àå_<fÝoïm}ÿçé/ZCNh\u0011\u0011!÷\u001b\u0000C'ßtn¼HÀ\u001f»~|x\u0012¦ »x\nÙ°Ñ·zÇ^\u0013\u001cG2\u0004w;ïõ\u0001[k\u001d棣@$'´\u001c^\\
çï=9Ö¹ô´Õ\u000f¬\"\u0012jÏl\u0019hË\u0002Ht\tó1B\u001dÎöí\u0013z¦Í¦ïÙLwý~çñFòêa÷ìªf±$æ±JÛÈÓø·hÊ-©r.E>g2}2¦J\u0005Æ\u0002fD\u0014LuɵÂb 1+Ðv\ft\u001aö\u0015Ù\u0004*á»\u0018@ÒøÈ\bø+Z6çÅ0
V\fjJÒGé'w¾Ó)ê\u0010ÏõÁÇ(,x-fÛ\u0013g\tDXx\"r\\«°Ê³êÁ\u0004û.=Õ\u001a
2\u0019:¶d\u0005E9\u0010ÎLã{
æâôÖ˳ýX\u0013PN\\\u0012\u0016\u0003
û§I+\" Ô\u000b\u001aÍXº
¯è° ê\u0005y[ë§@\n·^él*\u0011ôÜÀ\u0005EUPÚóн±\u0006^+.\u000f5wÌ÷\u0002Gå7ÆÐk?cÄq\f\u001e[AOcÏÆéþÓ\u0007\fh-¬Bÿ*Íí¤þ÷\u0014Þk0h1\"ÁÏ\nS÷ê,Ív\u001f¿2÷Âã\u0002\u001bO;'áH\u0000´\b¸\\\u0001J\u0015æ;gîã+ÉÌ\u001a6L¡´âØw¼¼6ë¯<̵\u00058ÄrX\\5U÷ä¼1Z@\u0013\u0002\u0012^ì2b\u0015Mvoùn23xÆ<V\"n\u0004ܼ\u0000\u001b¦Ä*ÿac¹sòªÚgÙXNf\u0017à\u000fµråYwþ\u0005v'X,,%' Gâ©,Û(.,\n\u001dìk´ÔÈP\u0010\u000b\u00162'B2\fÊÔLDÖ{èÜ\\\u0007NÑ\t|ÙÒ±íòe\b]\u0014{ÈëÛãH PohÜ\u0005u\u0004!¸J$&»/á3Çß¿0ïj_åú¹Þ
t\u0000½ÞìCå¿ß^þqûæmè/\n\u0003\u001ap5;¸³óæO\u0006¶K\u0004\b:)«\u001eesV®\fHx)\n¸¿Bày,\nlZ¥ÈÔ$\u0018Æ\u001eÉà\"òÜ;Ôs\u000bÎ\u0018Þmkí±J\u0001Ì,^cß|aÇ\u0001²0wojèÆ!\u0017Âá
YxSCûAä0Y1Ý&ª·\u0006\u0006rzvÔó\u0017Å\u0001£\u00063wÔw7\u001d×[ǶUÜ\u0019Ü]ÎôÑà\u0014êý\u000fCøõh@a;\u0004D#\b+Û\fËdçöSýtB\u0019æ°«\u0014MJ3«\u0004ª_,K\u0003Ô\u001a\t¬Ä^á6Æ£ÓF\u0013Ÿ\u001f@\u0004bàܨ_7·µí\u0000dHÄ\u0005Ùˬñ\u0007`{⸠àY=\u0010D` |«0~³ü/6\u0012¢C1Ê\u0015;ö\u0000\u0006éÁöl\u0017\u001cU«Â\u0018æÓ'\u0018eí>¾±==é%b®\u0013X,¬ð\u0001\r²\u0004%Y¹rJ¨\u001b\u0007\u0011CRhß¿GjmGÂB\b½l:#³sÇ2»ùRb*\u0007ñ|²¦¾IV;Kki¼¥>>¹Ù[½¿\u000e¶F\u000f+\u0017]\u0016ÜCÒ`\fêó ¦vP$z)@>º·îfç:\u0011\u000b¤\u0003Û%6PÍ¥\u0016)peRz0(±\\\u0016WøÀI\u0001¢º¨NྺõnÆ\u0017î\u0017Oê#Z4-ÙN
B\u001beÌ3PؾËâ¢\u0006Ô·Ê5W\u000b)³ÒñrÇýHð7\n=øsZ/!±Ãe\tÚÉ#Q\u001cºQq\f«U´q@\u000f\u0001\u000eAsº\u0005Çä-ïÅ\"î;Ò+¬á¬£«\u0003Ý\"ô|1ÛPí»Ä\u0004-rÜ\u000f×k(Ýx$Aè\u0006aÄód-»0vNGè{¤\u000eíä´0×Ñ|\u0017VYµÐm\u00016?ã·oÑ.Ýwl\u0002²I=ZX=\u0003\u000bVó«½\u0003\u0004+ÙLV^ôÀÃí!\u0000Âu¥\u001d\u0014¹C±+\u0015|Êt¦Ú¹î¨\rfÕ\u000fìÝ»ÛqpõÖ·îh'\u0003}{ú\u000b°a° \bw%qôÖbu_9fr\"DZX\u001cƼ\u0014\"\u0004Y=×ëGÛÓ\u0017¶×néü\u0019\u0015¸ÝZÿvkm\u0011<ÙÎG»¼¾µöd{ú\u0016\\\u0006Jöjïé\u000b\u0013Ñ\u0018²bYa¨7ÝßÜ É\u0005¶\u000e¦\n°¬e?ÒhΡ¶¶o^Ø~u\rGá\t\\È /J\u0012\u001c¡·`K\u0007±y59}9«ºU²\u0011\u0001ç¶<êcE»tSÖÒ\u0013Â\u000e¹&Ê» ñó~ï\b\u000få¢\u000bÒ¥1\t];Úa\u0019i~B?Ç\u0018\u000epTÚ@ÿÕVré]'ô(µwïtð\u0018²lZ\u0004Ó\u0003\u0011eq\u0011RJ\n½ü<\"Ç'[ÿ¶§dâ\u0000ë÷Ð}ì\u001e\u0007±T\u001bòwÎüÛ\u001eEÌ\u00188ú¤\u0002í\næMúکΩùÎò\t°SßÁ§g\u0011é\u0017ÇùÖÃSf(BNlñ\u0006ÈôqåÞÊ\u001d\u0018P!>¡½þä&\b£ÀpOu7\u0016Ú yò]Ö8¦ct\u0016\u0016z¯\u0000~@]OºEWb`À§^¨vnûÉrE\n\u0006ÊË\u0018ß]\b³ÃÑ«ÐRß\u0004ç¥ÀçÓúùh
^ü»6좰\u001a\u0007C'n¡eêç!ÈØU<ʷѰE\u001aóÝq=û\rT-bù(Ù\u0006ÓA§\u0013Jb{ùô¬P¡\böîØ¾}^=¡>qÔýn#ùê\u0014þ´ÿ8óª·²W\u001e\u0019\u0006º\u0010Ð8tÂ\u00141W\u0019«çS\u0002ds\bÂØnÚ÷f|\u0007ü$_©ì=Ý£c\u0002W\u0011>ø
\u001c²L§èPô½-éZ^`ù%\u001eA\u001f¬¾5ûà\u001d¢Øf§]E«ü\b,yTª>ûýåWî²ß#@\u0018;$$a¹üíª|\bàøÇ>\u0017Ò+]\u0001YôàpC\u0019 p=*½²$vÆ©2óÂ\b\u0001J\u0012øù\u0014´aêe\u001d#JÖx\u001bæ<\u0002\u0000Þ¨9\u0007\u001e¢4ÏÜd1\u0017\u000f3gskUPkå$nÿ$g7:gç>·ýü\n\u001bsÂuJRö\u001b9-ê\tÜØ@\u001fg0C.\u0002W$1rxêP{ôàgSùþ²=á¿e=1ÁBéÛq±'É'÷§9
Ù®v¦!\u0006OÄ#¦7Ð6Ý\u001cÑ»ªCëÑIÀÅ#Çènç}°Ü¼b¶m_~¹ýð4¨#µAàêÓïÞØ\t}éH¿üøt\u0006ªÒ--Å\u000b4C\u0007ïÄN\u0018rYxP£a2éª 8\u001bP©w+JF\\Ò@\u0012âZ_~$;²¦Â²'ïjK\u001a3æX\"*¥$«B)ä\u000b§FjÃïzn@\b)È£uÜéÞ_\u0005î¸}íJ\u001f\"\u0016ó(F¯JD\u000e.\u0007#-Òôy\u001bh_\u0014¢²->g®PßÁ\u001b\u0014LbÐøÜb÷)ØéØcÁ¿µê\u0007ÏÉ«ù¯M T\u000b78ôøSïÚõΩ[XDÀB3aU+\b¹ÅE\u001cÊåBïì\u0019æ6$e\u0014aõw[fö6_t\u001f^1ùz\u0014¸-g\u000bûÙ\u001d`i\u0004ßÀr¢°#È;fß\u001c8ÅÀ»¾_\u000eÎÚÚ\u0018Ó±\u0017\u0013Z_;³µqV\u0017.VXécÛ
\u000e×ç9F¨);þ\u0004ÚÄb\u0016QQ#à\u0018×N\u000b«¼/SrëB\u000béÍÀÎS¡Oa\u0012H²}=V׸tlwWù0fêÜÙ.¨¥\u000bU¼iùÅÖÚm\u0003/d±ñ«Jä\u0000ÈÊý¾üÄT¸<ÛYS©£úË4×\u000eüP\u001d¥/\u001bIÛää1¬ª\u0013à2ed\f\u0000\u001eã¡ÐRáy¾O$zkåwTª\u001a°i\u00018J^é-\u001b¯Ô9\u0013X}wnÅ[i^íic<\u001b(¼¢ÍkàL«ý[*<Ë%zQ+fTÃ¥çÚ7\u0004;cy»hòÁ\u0006n$\u001cߵʵwY\u0003ñ\u001eb\\³ÒVdLÚ\fdÇ\u00112ÞÕ>4sY,\u0005\tÊõ
+
+
+## 创建 espier-image 和 espier-vue (公共读)
+
+### 一、创建 bucket
+
+
+
+
+
+### 二、设置跨域
+进入详情:

点击访问控制,下拉找到跨域设置

+
设置规则

+
+
+### 三、绑定域名
+
+

+
+

+
+
+
+## 创建 espier-import-files (私有)
+
+### 一、创建
+
+
+> 私有存储不需要配置 cdn 和跨域
+
+
+
diff --git a/docs/docs/data_dictionary.md b/docs/docs/data_dictionary.md
new file mode 100644
index 0000000..004145e
--- /dev/null
+++ b/docs/docs/data_dictionary.md
@@ -0,0 +1,13953 @@
+ # 数据辞典
+
+数据库表数量: 431个
+
+- [Hfpay\_withdraw\_set(提现设置表)](#table-Hfpay_withdraw_set)
+- [activate\_log(激活表)](#table-activate_log)
+- [adapay\_alipay\_industry\_category(支付宝行业分类)](#table-adapay_alipay_industry_category)
+- [adapay\_bank\_codes(银行代码)](#table-adapay_bank_codes)
+- [adapay\_corp\_member(企业用户对象)](#table-adapay_corp_member)
+- [adapay\_div\_fee(分账金额表)](#table-adapay_div_fee)
+- [adapay\_draw\_cash(adapay提现表)](#table-adapay_draw_cash)
+- [adapay\_entry\_apply(开户申请表)](#table-adapay_entry_apply)
+- [adapay\_member(实名用户对象)](#table-adapay_member)
+- [adapay\_member\_update\_log(adapay子账户修改log(审核成功后修改))](#table-adapay_member_update_log)
+- [adapay\_merchant\_entry(adapay开户进件)](#table-adapay_merchant_entry)
+- [adapay\_merchant\_resident(adapay商户入驻)](#table-adapay_merchant_resident)
+- [adapay\_operation\_log(adapay操作日志表)](#table-adapay_operation_log)
+- [adapay\_paymemt\_confirm(adapay支付确认表)](#table-adapay_paymemt_confirm)
+- [adapay\_payment\_reverse(adapay支付撤销表)](#table-adapay_payment_reverse)
+- [adapay\_regions(省市编码(四位码))](#table-adapay_regions)
+- [adapay\_regions\_third(省市区编码(六位码或九位码))](#table-adapay_regions_third)
+- [adapay\_settle\_account(结算账户)](#table-adapay_settle_account)
+- [adapay\_sms\_log(adapay短信提醒日志表)](#table-adapay_sms_log)
+- [adapay\_submit\_license(adapay提交商户证照)](#table-adapay_submit_license)
+- [adapay\_upload\_license(adapay上传商户证照)](#table-adapay_upload_license)
+- [adapay\_withdraw\_set(提现设置表)](#table-adapay_withdraw_set)
+- [adapay\_wx\_business\_category(微信经营类目)](#table-adapay_wx_business_category)
+- [aftersales(售后主表)](#table-aftersales)
+- [aftersales\_detail(售后明细子表)](#table-aftersales_detail)
+- [aftersales\_offline\_refund(线下转账退款)](#table-aftersales_offline_refund)
+- [aftersales\_refund(退款表)](#table-aftersales_refund)
+- [ali\_mini\_app\_setting(支付宝小程序配置表)](#table-ali_mini_app_setting)
+- [aliyunsms\_accesskey(AccessKey表)](#table-aliyunsms_accesskey)
+- [aliyunsms\_record(短信发送记录)](#table-aliyunsms_record)
+- [aliyunsms\_scene(场景表)](#table-aliyunsms_scene)
+- [aliyunsms\_scene\_item(场景实例表)](#table-aliyunsms_scene_item)
+- [aliyunsms\_sign(短信签名表)](#table-aliyunsms_sign)
+- [aliyunsms\_task(短信群发任务)](#table-aliyunsms_task)
+- [aliyunsms\_template(模板表)](#table-aliyunsms_template)
+- [bspay\_div\_fee(分账金额表)](#table-bspay_div_fee)
+- [bspay\_entry\_apply(开户申请表)](#table-bspay_entry_apply)
+- [bspay\_paymemt\_confirm(斗拱支付确认表)](#table-bspay_paymemt_confirm)
+- [bspay\_regions\_third(省市区编码(六位码或九位码))](#table-bspay_regions_third)
+- [bspay\_user\_card(用户结算账户)](#table-bspay_user_card)
+- [bspay\_user\_ent(企业用户对象)](#table-bspay_user_ent)
+- [bspay\_user\_indv(个人用户)](#table-bspay_user_indv)
+- [bspay\_user\_update\_log(用户进件修改log(审核成功后修改))](#table-bspay_user_update_log)
+- [business\_rep\_user(业务员关联会员)](#table-business_rep_user)
+- [business\_representative(业务员)](#table-business_representative)
+- [card\_package(卡券包)](#table-card_package)
+- [card\_package\_items(卡券包关联表)](#table-card_package_items)
+- [card\_package\_receive(卡券包领取记录表)](#table-card_package_receive)
+- [card\_package\_receive\_details(卡券包领取记录详情表)](#table-card_package_receive_details)
+- [card\_package\_receive\_record(等级卡券包领取记录表)](#table-card_package_receive_record)
+- [card\_package\_trigger(卡券包触发关联表)](#table-card_package_trigger)
+- [chinaumspay\_division(银联商务支付分账流水)](#table-chinaumspay_division)
+- [chinaumspay\_division\_detail(银联商务支付分账流水明细)](#table-chinaumspay_division_detail)
+- [chinaumspay\_division\_error\_log(银联商务支付分账错误日志)](#table-chinaumspay_division_error_log)
+- [chinaumspay\_division\_upload\_detail(银联商务支付sftp上传明细)](#table-chinaumspay_division_upload_detail)
+- [chinaumspay\_division\_upload\_log(银联商务支付上传文件日志)](#table-chinaumspay_division_upload_log)
+- [community\_activity(社区拼团活动表)](#table-community_activity)
+- [community\_activity\_item(社区拼团活动商品表)](#table-community_activity_item)
+- [community\_activity\_ziti(社区拼团活动自提表)](#table-community_activity_ziti)
+- [community\_cart(社区团购购物车)](#table-community_cart)
+- [community\_chief(社区拼团团长表)](#table-community_chief)
+- [community\_chief\_apply\_info(社区拼团团长申请表)](#table-community_chief_apply_info)
+- [community\_chief\_cash\_withdrawal(团长提现表)](#table-community_chief_cash_withdrawal)
+- [community\_chief\_distributor(社区拼团团长关联店铺表)](#table-community_chief_distributor)
+- [community\_chief\_ziti(社区拼团团长自提点管理表)](#table-community_chief_ziti)
+- [community\_items(社区拼团商品池)](#table-community_items)
+- [community\_order\_rel\_activity(社区团购购物车)](#table-community_order_rel_activity)
+- [company\_rel\_dada(商城关联达达同城配表)](#table-company_rel_dada)
+- [company\_rel\_delivery(商城关联配送配置表)](#table-company_rel_delivery)
+- [company\_rel\_kuaizhen(商城关联580快诊配置)](#table-company_rel_kuaizhen)
+- [company\_rel\_logistics(商城物流启用表)](#table-company_rel_logistics)
+- [company\_rel\_shansong(商城关联闪送应用配置信息表)](#table-company_rel_shansong)
+- [companys(公司表)](#table-companys)
+- [companys\_article(文章表)](#table-companys_article)
+- [companys\_article\_category(文章类目表)](#table-companys_article_category)
+- [companys\_currency\_exchange\_rate(货币汇率)](#table-companys_currency_exchange_rate)
+- [companys\_employee\_rel\_roles(员工绑定角色表)](#table-companys_employee_rel_roles)
+- [companys\_operator\_cart(导购员购物车)](#table-companys_operator_cart)
+- [companys\_operator\_logs(商家操作日志表)](#table-companys_operator_logs)
+- [companys\_operator\_pending\_order(导购挂单)](#table-companys_operator_pending_order)
+- [companys\_profit(分润记录表)](#table-companys_profit)
+- [companys\_profit\_log(分润记录表)](#table-companys_profit_log)
+- [companys\_profit\_statistics(分润记录表)](#table-companys_profit_statistics)
+- [companys\_protocol\_update\_log(协议更新日志表)](#table-companys_protocol_update_log)
+- [companys\_regionauth(地区权限)](#table-companys_regionauth)
+- [companys\_roles(员工角色表)](#table-companys_roles)
+- [companys\_saleman\_customer\_complaints(导购客诉表)](#table-companys_saleman_customer_complaints)
+- [companys\_saleperson\_cart(导购员购物车)](#table-companys_saleperson_cart)
+- [companys\_sales\_promotions(导购促销单)](#table-companys_sales_promotions)
+- [companys\_salesperson\_statistics(导购员销售额数据统计表)](#table-companys_salesperson_statistics)
+- [companys\_setting(企业设置表)](#table-companys_setting)
+- [companys\_statistics(商城数据统计表)](#table-companys_statistics)
+- [companys\_store\_statistics(商城数据统计表)](#table-companys_store_statistics)
+- [config\_request\_fields(配置信息, 配置传递的请求字段)](#table-config_request_fields)
+- [coupon\_give\_error\_log(优惠券赠送失败记录表)](#table-coupon_give_error_log)
+- [coupon\_give\_log(优惠券赠送表)](#table-coupon_give_log)
+- [crossborder\_identity(跨境-身份证信息)](#table-crossborder_identity)
+- [crossborder\_origincountry(跨境-产地国表)](#table-crossborder_origincountry)
+- [crossborder\_set(跨境-设置)](#table-crossborder_set)
+- [crossborder\_taxstrategy(跨境-税费策略)](#table-crossborder_taxstrategy)
+- [custom\_declare\_order\_result(订单附加信息提交信息接口请求结果表)](#table-custom_declare_order_result)
+- [customs\_data(接收海关支付数据请求表)](#table-customs_data)
+- [datacube\_company\_data(商城数据统计表)](#table-datacube_company_data)
+- [datacube\_distributor\_data(商城门店数据统计表)](#table-datacube_distributor_data)
+- [datacube\_goods\_data(商品数据统计表)](#table-datacube_goods_data)
+- [datacube\_merchant\_data(商户数据统计表)](#table-datacube_merchant_data)
+- [datacube\_monitors(小程序页面监控)](#table-datacube_monitors)
+- [datacube\_relsources(小程序页面与来源关联表)](#table-datacube_relsources)
+- [datacube\_statistics(小程序页面与来源关联表)](#table-datacube_statistics)
+- [deposit\_recharge\_agreement(充值协议表)](#table-deposit_recharge_agreement)
+- [deposit\_recharge\_rule(储值规则,充值固定金额送钱或送礼品)](#table-deposit_recharge_rule)
+- [deposit\_trade(预存款交易记录表)](#table-deposit_trade)
+- [distribution\_basic\_config(分销商基础配置)](#table-distribution_basic_config)
+- [distribution\_cash\_withdrawal(分销商佣金提现记录表)](#table-distribution_cash_withdrawal)
+- [distribution\_distribute\_logs(分销商佣金记录表)](#table-distribution_distribute_logs)
+- [distribution\_distributor(店铺表)](#table-distribution_distributor)
+- [distribution\_distributor\_geofence(店铺围栏信息)](#table-distribution_distributor_geofence)
+- [distribution\_distributor\_items(店铺导购员表)](#table-distribution_distributor_items)
+- [distribution\_distributor\_sales\_count(店铺销量表)](#table-distribution_distributor_sales_count)
+- [distribution\_distributor\_salesman(店铺导购员表)](#table-distribution_distributor_salesman)
+- [distribution\_distributor\_salesman\_role(店铺权限表)](#table-distribution_distributor_salesman_role)
+- [distribution\_distributor\_user(会员对应的导购员信息表)](#table-distribution_distributor_user)
+- [distribution\_distributor\_white\_list(店铺表)](#table-distribution_distributor_white_list)
+- [distribution\_pickup\_location(店铺自提点)](#table-distribution_pickup_location)
+- [distribution\_shopScreen\_advertisement(广告表)](#table-distribution_shopScreen_advertisement)
+- [distribution\_shopScreen\_slider()](#table-distribution_shopScreen_slider)
+- [distributor\_aftersales\_address(店铺售后地址)](#table-distributor_aftersales_address)
+- [distributor\_rel\_tags(店铺关联标签表)](#table-distributor_rel_tags)
+- [distributor\_tags(店铺标签库表)](#table-distributor_tags)
+- [distributor\_wechat\_rel(店务端微信关联表)](#table-distributor_wechat_rel)
+- [distributor\_work\_wechat\_rel(店务端企业微信关联表)](#table-distributor_work_wechat_rel)
+- [employee\_purchase\_activities(员工内购活动表)](#table-employee_purchase_activities)
+- [employee\_purchase\_activity\_enterprises(活动参与企业表)](#table-employee_purchase_activity_enterprises)
+- [employee\_purchase\_activity\_goods(员工内购商品表)](#table-employee_purchase_activity_goods)
+- [employee\_purchase\_activity\_items(员工内购商品表)](#table-employee_purchase_activity_items)
+- [employee\_purchase\_cart(员工内购活动购物车)](#table-employee_purchase_cart)
+- [employee\_purchase\_employees(企业员工表)](#table-employee_purchase_employees)
+- [employee\_purchase\_enterprise\_email\_box(企业发件邮箱)](#table-employee_purchase_enterprise_email_box)
+- [employee\_purchase\_enterprises(企业表)](#table-employee_purchase_enterprises)
+- [employee\_purchase\_member\_activity\_aggregate(内购活动会员累计使用额度)](#table-employee_purchase_member_activity_aggregate)
+- [employee\_purchase\_member\_activity\_items\_aggregate(内购活动商品会员累计使用额度)](#table-employee_purchase_member_activity_items_aggregate)
+- [employee\_purchase\_orders\_rel\_activity(内购订单关联活动企业表)](#table-employee_purchase_orders_rel_activity)
+- [employee\_purchase\_relatives(企业员工家属表)](#table-employee_purchase_relatives)
+- [espier\_address(地区表)](#table-espier_address)
+- [espier\_export\_log(导出日志表)](#table-espier_export_log)
+- [espier\_printer(打印机表)](#table-espier_printer)
+- [espier\_subdistrict(街道社区表)](#table-espier_subdistrict)
+- [espier\_uploadefile(上传文件日志ID)](#table-espier_uploadefile)
+- [espier\_uploadimages(图片上传表)](#table-espier_uploadimages)
+- [espier\_uploadimages\_cat(图片分类表)](#table-espier_uploadimages_cat)
+- [goods\_items\_rel\_cats(商品和分类关联表)](#table-goods_items_rel_cats)
+- [hfpay\_bank\_card(汇付取现银行卡表)](#table-hfpay_bank_card)
+- [hfpay\_cash\_record(汇付取现记录表)](#table-hfpay_cash_record)
+- [hfpay\_company\_statistics\_day(平台分账数据统计)](#table-hfpay_company_statistics_day)
+- [hfpay\_distributor\_statistics\_day(店铺分账数据统计)](#table-hfpay_distributor_statistics_day)
+- [hfpay\_distributor\_transaction\_statistics(店铺交易统计统计)](#table-hfpay_distributor_transaction_statistics)
+- [hfpay\_enterapply(入驻信息表)](#table-hfpay_enterapply)
+- [hfpay\_ledger\_config(分账配置表)](#table-hfpay_ledger_config)
+- [hfpay\_merchant\_payment(汇付平台转账记录表)](#table-hfpay_merchant_payment)
+- [hfpay\_trade\_record(汇付记账表)](#table-hfpay_trade_record)
+- [icbc\_pay\_log(工商银行接口日志)](#table-icbc_pay_log)
+- [item\_keywords(商品热门关键词表)](#table-item_keywords)
+- [items(商品表)](#table-items)
+- [items\_attribute\_values(商品属性值表)](#table-items_attribute_values)
+- [items\_attributes(商品属性表)](#table-items_attributes)
+- [items\_barcode(商品条形码表)](#table-items_barcode)
+- [items\_category(商品分类表)](#table-items_category)
+- [items\_category\_profit(商品分润配置表)](#table-items_category_profit)
+- [items\_commission(商品佣金配置表)](#table-items_commission)
+- [items\_medicine(商品药品数据表)](#table-items_medicine)
+- [items\_profit(商品分润配置表)](#table-items_profit)
+- [items\_recommend(商品推荐表)](#table-items_recommend)
+- [items\_rel\_attributes(商品关联属性表)](#table-items_rel_attributes)
+- [items\_rel\_point\_access(商品和积分获取设置关联表)](#table-items_rel_point_access)
+- [items\_rel\_tags(商品关联标签表)](#table-items_rel_tags)
+- [items\_rel\_type(商品数值属性关联表)](#table-items_rel_type)
+- [items\_tags(商品标签库表)](#table-items_tags)
+- [kaquan\_card\_related(卡券库存统计表)](#table-kaquan_card_related)
+- [kaquan\_discount\_cards(优惠券信息表)](#table-kaquan_discount_cards)
+- [kaquan\_rel\_items(卡券关联商品表)](#table-kaquan_rel_items)
+- [kaquan\_rel\_member\_tags(卡券关联用户标签表)](#table-kaquan_rel_member_tags)
+- [kaquan\_salesperson\_give\_coupons(导购员发放给用户优惠券记录)](#table-kaquan_salesperson_give_coupons)
+- [kaquan\_user\_discount(用户领取的优惠券表)](#table-kaquan_user_discount)
+- [kaquan\_user\_discount\_logs(优惠券核销记录表)](#table-kaquan_user_discount_logs)
+- [kaquan\_vip\_grade(付费会员等级库表)](#table-kaquan_vip_grade)
+- [kaquan\_vip\_grade\_order(付费会员等级卡)](#table-kaquan_vip_grade_order)
+- [kaquan\_vip\_rel\_user(付费会员的等级卡表)](#table-kaquan_vip_rel_user)
+- [kaquan\_wechat\_card(关联微信卡券)](#table-kaquan_wechat_card)
+- [logistics(物流公司表)](#table-logistics)
+- [lucky\_draw\_activity(抽奖表)](#table-lucky_draw_activity)
+- [map\_config(地图配置表)](#table-map_config)
+- [map\_config\_service(地图配置表)](#table-map_config_service)
+- [medication\_personnel(用药人信息)](#table-medication_personnel)
+- [member\_group(分组表)](#table-member_group)
+- [member\_outfit()](#table-member_outfit)
+- [member\_outfit\_log()](#table-member_outfit_log)
+- [member\_rel\_group(会员分组表)](#table-member_rel_group)
+- [member\_remarks(会员备注表)](#table-member_remarks)
+- [membercard(会员卡)](#table-membercard)
+- [membercard\_grade(会员卡等级表)](#table-membercard_grade)
+- [members(会员主表,其他平台的会员本地化表)](#table-members)
+- [members\_address(会员收货地址表)](#table-members_address)
+- [members\_article\_fav(会员心愿单收藏)](#table-members_article_fav)
+- [members\_associations(不同平台会员关联表,关联到members表)](#table-members_associations)
+- [members\_browse\_history(会员浏览足迹)](#table-members_browse_history)
+- [members\_delete\_record(会员删除记录)](#table-members_delete_record)
+- [members\_distribution\_fav(会员店铺收藏)](#table-members_distribution_fav)
+- [members\_info(会员详情信息表)](#table-members_info)
+- [members\_invoices(会员发票信息表)](#table-members_invoices)
+- [members\_items\_fav(会员收藏商品表)](#table-members_items_fav)
+- [members\_msmsend\_log(群发短信log)](#table-members_msmsend_log)
+- [members\_offine\_log(会员线下实体卡日志)](#table-members_offine_log)
+- [members\_operate\_log(管理员修改员工操作日志表)](#table-members_operate_log)
+- [members\_protocol\_log(会员隐私协议记录表)](#table-members_protocol_log)
+- [members\_rel\_shop(店铺管理会员表)](#table-members_rel_shop)
+- [members\_rel\_tags(会员关联标签表)](#table-members_rel_tags)
+- [members\_subscribe\_notice(订阅通知)](#table-members_subscribe_notice)
+- [members\_tags(会员标签库表)](#table-members_tags)
+- [members\_tags\_category(标签分类)](#table-members_tags_category)
+- [members\_wechat\_fans(微信粉丝表)](#table-members_wechat_fans)
+- [members\_wechatusers(微信会员表)](#table-members_wechatusers)
+- [members\_whitelist(会员白名单)](#table-members_whitelist)
+- [merchant(商户表)](#table-merchant)
+- [merchant\_settlement\_apply(商户入驻申请表)](#table-merchant_settlement_apply)
+- [merchant\_type(商户类型表)](#table-merchant_type)
+- [offline\_bank\_account(线下转账收款账户)](#table-offline_bank_account)
+- [offline\_payment(线下转账支付订单)](#table-offline_payment)
+- [onecode\_batchs(物品批次表)](#table-onecode_batchs)
+- [onecode\_things(物品表,一物一码的物)](#table-onecode_things)
+- [openapi\_developer(openapi开发配置表)](#table-openapi_developer)
+- [operator\_bind\_shop(员工关联门店表)](#table-operator_bind_shop)
+- [operator\_data\_pass(数据敏感信息申请)](#table-operator_data_pass)
+- [operator\_data\_pass\_log(数据敏感信息查看)](#table-operator_data_pass_log)
+- [operator\_license(商户许可协议表)](#table-operator_license)
+- [operators(账号表)](#table-operators)
+- [order\_epidemic\_register(订单疫情登记表)](#table-order_epidemic_register)
+- [order\_profit\_sharing(订单资金分账)](#table-order_profit_sharing)
+- [order\_profit\_sharing\_details(订单资金分账详情)](#table-order_profit_sharing_details)
+- [orders\_associations(订单主关联表)](#table-orders_associations)
+- [orders\_bargain(砍价订单表)](#table-orders_bargain)
+- [orders\_cancel\_orders(已付钱订单取消退款记录表)](#table-orders_cancel_orders)
+- [orders\_cart(购物车)](#table-orders_cart)
+- [orders\_delivery(订单发货单表)](#table-orders_delivery)
+- [orders\_delivery\_items(订单发货单商品表)](#table-orders_delivery_items)
+- [orders\_diagnosis(问诊单)](#table-orders_diagnosis)
+- [orders\_invoice(订单发票表)](#table-orders_invoice)
+- [orders\_invoice\_item(订单发票商品表)](#table-orders_invoice_item)
+- [orders\_invoice\_log(订单发票日志表)](#table-orders_invoice_log)
+- [orders\_invoices(发票表)](#table-orders_invoices)
+- [orders\_items\_rel\_profit(订单商品分润表)](#table-orders_items_rel_profit)
+- [orders\_merchant\_trade(企业付款账单)](#table-orders_merchant_trade)
+- [orders\_normal\_orders(实体订单表)](#table-orders_normal_orders)
+- [orders\_normal\_orders\_items(实体订单明细表)](#table-orders_normal_orders_items)
+- [orders\_operate\_logs(订单操作日志表)](#table-orders_operate_logs)
+- [orders\_prescription(问诊单开方数据)](#table-orders_prescription)
+- [orders\_process\_log(订单流程记录表)](#table-orders_process_log)
+- [orders\_rel\_chinaumspay\_division(订单关联银联商务分账表)](#table-orders_rel_chinaumspay_division)
+- [orders\_rel\_dada(实体订单关联达达同城配表)](#table-orders_rel_dada)
+- [orders\_rel\_jushuitan(订单关联聚水潭表)](#table-orders_rel_jushuitan)
+- [orders\_rel\_profit(订单分润表)](#table-orders_rel_profit)
+- [orders\_rel\_promotions(商品促销和订单关联表)](#table-orders_rel_promotions)
+- [orders\_rel\_supplier(实体订单关联供应商)](#table-orders_rel_supplier)
+- [orders\_rel\_ziti(实体订单关联自提信息)](#table-orders_rel_ziti)
+- [orders\_rights(权益表)](#table-orders_rights)
+- [orders\_rights\_detail(权益详细ID)](#table-orders_rights_detail)
+- [orders\_rights\_log(权益日志表)](#table-orders_rights_log)
+- [orders\_rights\_operate\_logs(权益操作日志表)](#table-orders_rights_operate_logs)
+- [orders\_rights\_transfer\_logs(权益转赠表)](#table-orders_rights_transfer_logs)
+- [orders\_user\_invoice(订单发票)](#table-orders_user_invoice)
+- [pages\_open\_screen\_ad(开屏广告设置)](#table-pages_open_screen_ad)
+- [pages\_template(页面模板表)](#table-pages_template)
+- [pages\_template\_set(模板设置表)](#table-pages_template_set)
+- [point\_member(用户积分表)](#table-point_member)
+- [point\_member\_log(用户积分记录表)](#table-point_member_log)
+- [pointsmall\_items(积分商品表)](#table-pointsmall_items)
+- [pointsmall\_items\_rel\_attributes(积分商品关联属性表)](#table-pointsmall_items_rel_attributes)
+- [pointsmall\_items\_rel\_cats(积分商品和分类关联表)](#table-pointsmall_items_rel_cats)
+- [popularize\_brokerage(分销佣金表)](#table-popularize_brokerage)
+- [popularize\_brokerage\_statistics(分销佣金统计)](#table-popularize_brokerage_statistics)
+- [popularize\_cash\_withdrawal(推广员提现表)](#table-popularize_cash_withdrawal)
+- [popularize\_promoter(推广员表)](#table-popularize_promoter)
+- [popularize\_promoter\_goods(推广员商品表)](#table-popularize_promoter_goods)
+- [popularize\_promoter\_identity(推广员身份表)](#table-popularize_promoter_identity)
+- [popularize\_task\_brokerage(任务制返佣)](#table-popularize_task_brokerage)
+- [popularize\_task\_brokerage\_count(任务制返佣)](#table-popularize_task_brokerage_count)
+- [promotion\_check\_in(签到日志)](#table-promotion_check_in)
+- [promotion\_groups\_activity(拼团活动表)](#table-promotion_groups_activity)
+- [promotion\_groups\_team(开团表)](#table-promotion_groups_team)
+- [promotion\_groups\_team\_member(参团表)](#table-promotion_groups_team_member)
+- [promotion\_user\_task(签到日志)](#table-promotion_user_task)
+- [promotions\_active\_articles(活动文章表)](#table-promotions_active_articles)
+- [promotions\_activity(自动化营销活动表)](#table-promotions_activity)
+- [promotions\_bargain(砍价活动表)](#table-promotions_bargain)
+- [promotions\_bargain\_log(砍价日志表)](#table-promotions_bargain_log)
+- [promotions\_distributor(分销商营销)](#table-promotions_distributor)
+- [promotions\_extrapoint\_activity(积分营销活动表)](#table-promotions_extrapoint_activity)
+- [promotions\_items\_tag(商品的促销标签表)](#table-promotions_items_tag)
+- [promotions\_limit(限购活动规则表)](#table-promotions_limit)
+- [promotions\_limit\_category(限购活动分类表)](#table-promotions_limit_category)
+- [promotions\_limit\_item(限购活动商品表)](#table-promotions_limit_item)
+- [promotions\_limit\_person(限购活动用户表)](#table-promotions_limit_person)
+- [promotions\_marketing\_activity(各种促销活动表)](#table-promotions_marketing_activity)
+- [promotions\_marketing\_activity\_category(各种促销活动分类表)](#table-promotions_marketing_activity_category)
+- [promotions\_marketing\_activity\_items(各种促销活动商品表)](#table-promotions_marketing_activity_items)
+- [promotions\_marketing\_gift\_items(活动赠品列表)](#table-promotions_marketing_gift_items)
+- [promotions\_member\_price(商品会员价表)](#table-promotions_member_price)
+- [promotions\_notice\_template(小程序通知消息模版)](#table-promotions_notice_template)
+- [promotions\_package(组合促销促销规则表)](#table-promotions_package)
+- [promotions\_package\_item(组合促销商品表)](#table-promotions_package_item)
+- [promotions\_package\_main\_item(组合促销主商品表)](#table-promotions_package_main_item)
+- [promotions\_point\_upvaluation(积分升值活动表)](#table-promotions_point_upvaluation)
+- [promotions\_recommend\_like\_items(推荐喜欢商品(猜你喜欢))](#table-promotions_recommend_like_items)
+- [promotions\_scd\_rel\_user(定向促销会员日志)](#table-promotions_scd_rel_user)
+- [promotions\_seckill\_activity(秒杀活动表)](#table-promotions_seckill_activity)
+- [promotions\_seckill\_rel\_goods(秒杀关联商品表)](#table-promotions_seckill_rel_goods)
+- [promotions\_specific\_crowd\_discount(特定人群促销)](#table-promotions_specific_crowd_discount)
+- [promotions\_turntable\_log(用户大转盘中奖纪录表)](#table-promotions_turntable_log)
+- [promotions\_user\_bargains(用户砍价表)](#table-promotions_user_bargains)
+- [refund\_error\_logs(退款错误日志)](#table-refund_error_logs)
+- [register\_promotions(注册营销表)](#table-register_promotions)
+- [reservation\_default\_work\_shift(商户配置默认排班)](#table-reservation_default_work_shift)
+- [reservation\_level\_rel\_service(资源位服务项目关联表)](#table-reservation_level_rel_service)
+- [reservation\_record(预约记录表)](#table-reservation_record)
+- [reservation\_resource\_level(资源位表)](#table-reservation_resource_level)
+- [reservation\_setting(预约配置表)](#table-reservation_setting)
+- [reservation\_shift\_type(班次类型表)](#table-reservation_shift_type)
+- [reservation\_work\_shift(班次类型表)](#table-reservation_work_shift)
+- [resources(资源包表)](#table-resources)
+- [resources\_op\_log(资源操作记录表)](#table-resources_op_log)
+- [salesperson\_active\_article\_share\_log(活动文章表)](#table-salesperson_active_article_share_log)
+- [salesperson\_active\_article\_statistics(导购员活动转发数据统计表)](#table-salesperson_active_article_statistics)
+- [salesperson\_coupon\_statistics(导购员优惠券数据统计表)](#table-salesperson_coupon_statistics)
+- [salesperson\_items\_shelves()](#table-salesperson_items_shelves)
+- [salesperson\_leaderboard(导购排名)](#table-salesperson_leaderboard)
+- [salesperson\_leaderboard\_distributor(导购店铺排名)](#table-salesperson_leaderboard_distributor)
+- [salesperson\_notice(导购通知)](#table-salesperson_notice)
+- [salesperson\_notice\_log(导购通知)](#table-salesperson_notice_log)
+- [salesperson\_operator\_log(商家操作日志表)](#table-salesperson_operator_log)
+- [salesperson\_profit\_statistics(导购员销售提成数据统计表)](#table-salesperson_profit_statistics)
+- [salesperson\_rel\_coupon(导购员优惠券数据统计表)](#table-salesperson_rel_coupon)
+- [salesperson\_rel\_notice(导购通知关联表)](#table-salesperson_rel_notice)
+- [salesperson\_sales\_statistics(导购员销售额数据统计表)](#table-salesperson_sales_statistics)
+- [salesperson\_signup\_log(导购到/签退记录)](#table-salesperson_signup_log)
+- [salesperson\_task(导购任务表)](#table-salesperson_task)
+- [salesperson\_task\_record(导购任务表)](#table-salesperson_task_record)
+- [salesperson\_task\_record\_logs(导购任务表)](#table-salesperson_task_record_logs)
+- [salesperson\_task\_rel\_distributor(导购任务表)](#table-salesperson_task_rel_distributor)
+- [self\_delivery\_staff(自配送员工信息表)](#table-self_delivery_staff)
+- [selfservice\_form\_setting(自助表单配置)](#table-selfservice_form_setting)
+- [selfservice\_form\_template(自助表单模板)](#table-selfservice_form_template)
+- [selfservice\_registration\_activity(报名问卷活动)](#table-selfservice_registration_activity)
+- [selfservice\_registration\_activity\_rel\_shop(报名活动关联店铺)](#table-selfservice_registration_activity_rel_shop)
+- [selfservice\_registration\_record(报名记录)](#table-selfservice_registration_record)
+- [selfservice\_user\_daily\_record(用户日常数据记录表)](#table-selfservice_user_daily_record)
+- [service\_orders(服务订单表)](#table-service_orders)
+- [servicelabels(数值属性表)](#table-servicelabels)
+- [shipping\_templates(运费模板表)](#table-shipping_templates)
+- [shop\_comments(店铺评论表)](#table-shop_comments)
+- [shop\_menu(商家和平台端菜单管理)](#table-shop_menu)
+- [shop\_menu\_rel\_type(菜单类型关联)](#table-shop_menu_rel_type)
+- [shop\_notice(店铺公告表)](#table-shop_notice)
+- [shop\_rel\_salesperson(店铺管理员关联店铺表)](#table-shop_rel_salesperson)
+- [shop\_salesperson(门店人员)](#table-shop_salesperson)
+- [sms\_idiograph(短信签名表)](#table-sms_idiograph)
+- [sms\_template(短信模板表)](#table-sms_template)
+- [sources(小程序来源列表)](#table-sources)
+- [statement\_details(结算单明细)](#table-statement_details)
+- [statement\_period\_setting(结算周期设置)](#table-statement_period_setting)
+- [statements(结算单)](#table-statements)
+- [sub\_orders(服务类子订单表)](#table-sub_orders)
+- [super\_admin\_accounts(平台账号表)](#table-super_admin_accounts)
+- [superadmin\_wxapp\_template(小程序模板表)](#table-superadmin_wxapp_template)
+- [supplier(供应商)](#table-supplier)
+- [supplier\_items(商品表)](#table-supplier_items)
+- [supplier\_items\_attr(新供应商商品属性表)](#table-supplier_items_attr)
+- [supplier\_items\_commission(商品佣金费率)](#table-supplier_items_commission)
+- [supplier\_order(供应商订单)](#table-supplier_order)
+- [systemlink\_oms\_queuelog(联通oms通信日志)](#table-systemlink_oms_queuelog)
+- [template\_orders(小程序开通表)](#table-template_orders)
+- [theme\_member\_center\_share(会员中心分享信息表)](#table-theme_member_center_share)
+- [theme\_pc\_template(pc页面装修)](#table-theme_pc_template)
+- [theme\_pc\_template\_content(pc页面装修组件内容)](#table-theme_pc_template_content)
+- [thirdparty\_saaserp\_log(联通saasErp通信日志)](#table-thirdparty_saaserp_log)
+- [thirdparty\_shop\_bind(矩阵节点绑定)](#table-thirdparty_shop_bind)
+- [trade(交易单表)](#table-trade)
+- [trade\_rate(订单评价表)](#table-trade_rate)
+- [trade\_rate\_reply(订单评价回复/评论表)](#table-trade_rate_reply)
+- [transcript\_properties(成绩单考评项目表)](#table-transcript_properties)
+- [transcripts(成绩单配置表)](#table-transcripts)
+- [user\_deposit(用户储值金额表)](#table-user_deposit)
+- [user\_signin(用户签到表)](#table-user_signin)
+- [user\_signin\_logs(用户签到奖励记录表)](#table-user_signin_logs)
+- [user\_signin\_rules(用户签到规则表)](#table-user_signin_rules)
+- [user\_task\_activity(签到日志)](#table-user_task_activity)
+- [user\_task\_activity\_rule(签到活动规则)](#table-user_task_activity_rule)
+- [user\_task\_finish\_rule(活动规则完成任务)](#table-user_task_finish_rule)
+- [user\_transcripts(用户成绩单记录表)](#table-user_transcripts)
+- [wechat\_authorization(微信授权表(公众号,小程序))](#table-wechat_authorization)
+- [wechat\_tags(微信粉丝标签表)](#table-wechat_tags)
+- [wechat\_weapp(微信小程序提交审核表)](#table-wechat_weapp)
+- [wechat\_weapp\_customize\_page(小程序自定义页面)](#table-wechat_weapp_customize_page)
+- [wechat\_weapp\_setting(小程序模板装修表)](#table-wechat_weapp_setting)
+- [wechat\_weapp\_template(小程序模板表)](#table-wechat_weapp_template)
+- [wechatfans\_bind\_wechattag(粉丝关联标微信签表)](#table-wechatfans_bind_wechattag)
+- [work\_wechat\_message(企业微信通知)](#table-work_wechat_message)
+- [work\_wechat\_message\_manager\_template(企业微信管理员通知模板)](#table-work_wechat_message_manager_template)
+- [work\_wechat\_message\_template(企业微信通知模板)](#table-work_wechat_message_template)
+- [work\_wechat\_rel(企业微信用户关联表)](#table-work_wechat_rel)
+- [work\_wechat\_rel\_logs(企业微信用户关联关系日志)](#table-work_wechat_rel_logs)
+- [work\_wechat\_verify\_domain\_file(企业微信可信域名校验文件)](#table-work_wechat_verify_domain_file)
+- [wsugc\_badge(角标)](#table-wsugc_badge)
+- [wsugc\_comment(笔记评论)](#table-wsugc_comment)
+- [wsugc\_comment\_like(评论点赞)](#table-wsugc_comment_like)
+- [wsugc\_follower()](#table-wsugc_follower)
+- [wsugc\_image\_tag(图片tag关联表)](#table-wsugc_image_tag)
+- [wsugc\_message(消息)](#table-wsugc_message)
+- [wsugc\_post(笔记)](#table-wsugc_post)
+- [wsugc\_post\_badge(笔记角标)](#table-wsugc_post_badge)
+- [wsugc\_post\_favorite(笔记收藏)](#table-wsugc_post_favorite)
+- [wsugc\_post\_goods(笔记)](#table-wsugc_post_goods)
+- [wsugc\_post\_image(笔记的图片)](#table-wsugc_post_image)
+- [wsugc\_post\_like(笔记点赞)](#table-wsugc_post_like)
+- [wsugc\_post\_reviewlog(笔记审核日志)](#table-wsugc_post_reviewlog)
+- [wsugc\_post\_topic()](#table-wsugc_post_topic)
+- [wsugc\_setting(ugc通用设置)](#table-wsugc_setting)
+- [wsugc\_tag(图片tag)](#table-wsugc_tag)
+- [wsugc\_topic(话题)](#table-wsugc_topic)
+- [wx\_external\_config(外部小程序配置表)](#table-wx_external_config)
+- [wx\_external\_routes(外部小程序路径表)](#table-wx_external_routes)
+- [wxshops(微信门店表)](#table-wxshops)
+- [youshu\_setting(有数参数设置表)](#table-youshu_setting)
+
+
+
+
+## Hfpay\_withdraw\_set
+
+> **提现设置表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| hfpay\_withdraw\_set\_id | 汇付提现配置表id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司company id| BIGINT | Yes | NULL | No |
+| withdraw\_method | 提现方式 1自动提现 2手动提现| INT | Yes | 1 | No |
+| distributor\_money | 店铺账号提现金额| VARCHAR(255) | Yes | 0 | No |
+| created\_at | | DATETIME | Yes | NULL | No |
+| updated\_at | | DATETIME | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | hfpay\_withdraw\_set\_id | Yes |
+| idx\_company\_id | company\_id | No |
+
+
+## activate\_log
+
+> **激活表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | 激活id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| resource\_id | 资源包id| BIGINT | Yes | NULL | No |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| eid | 企业id| VARCHAR(255) | Yes | NULL | No |
+| passport\_uid | | VARCHAR(255) | Yes | NULL | No |
+| active\_code | 激活码| VARCHAR(255) | No | NULL | No |
+| active\_type | 激活类型| VARCHAR(255) | No | NULL | No |
+| active\_status | 激活状态| VARCHAR(255) | No | NULL | No |
+| activeAt | 激活时间| BIGINT | Yes | NULL | No |
+| expiredAt | 过期时间| BIGINT | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+
+
+## adapay\_alipay\_industry\_category
+
+> **支付宝行业分类**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | 分类id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| category\_name | 分类名称| VARCHAR(100) | Yes | NULL | No |
+| parent\_id | 父级id, 0为顶级| BIGINT | Yes | 0 | No |
+| category\_level | 分类等级| INT | Yes | 1 | No |
+| alipay\_cls\_id | 行业分类ID| BIGINT | No | NULL | No |
+| alipay\_category\_id | 支付宝经营类目| VARCHAR(20) | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+
+
+## adapay\_bank\_codes
+
+> **银行代码**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| bank\_name | 银行名称| VARCHAR(100) | Yes | NULL | No |
+| bank\_code | 银行代码| VARCHAR(50) | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_bank\_name | bank\_name | No |
+| idx\_bank\_code | bank\_code | No |
+
+
+## adapay\_corp\_member
+
+> **企业用户对象**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| app\_id | 应用app\_id| VARCHAR(100) | Yes | | No |
+| order\_no | 请求订单号| VARCHAR(64) | Yes | | No |
+| member\_id | member\_id| BIGINT | Yes | NULL | No |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| dealer\_id | 经销商id| BIGINT | No | 0 | No |
+| distributor\_id | 店铺id| BIGINT | No | 0 | No |
+| operator\_id | 操作者id| INT | No | 0 | No |
+| name | 企业名称| VARCHAR(100) | Yes | | No |
+| prov\_code | 省份编码| VARCHAR(10) | No | | No |
+| area\_code | 地区编码| VARCHAR(10) | Yes | | No |
+| social\_credit\_code | 统一社会信用码| VARCHAR(32) | Yes | | No |
+| social\_credit\_code\_expires | 统一社会信用证有效期| VARCHAR(32) | Yes | | No |
+| business\_scope | 经营范围| VARCHAR(800) | Yes | | No |
+| legal\_person | 法人姓名| VARCHAR(500) | Yes | | No |
+| legal\_cert\_id | 法人身份证号码| VARCHAR(255) | Yes | | No |
+| legal\_cert\_id\_expires | 法人身份证有效期| VARCHAR(16) | Yes | | No |
+| legal\_mp | 法人手机号| VARCHAR(255) | Yes | | No |
+| address | 企业地址| VARCHAR(300) | Yes | | No |
+| zip\_code | 邮编| VARCHAR(10) | No | | No |
+| telphone | 企业电话| VARCHAR(30) | No | | No |
+| email | 企业邮箱| VARCHAR(100) | No | | No |
+| attach\_file | 上传附件| VARCHAR(300) | No | | No |
+| attach\_file\_name | 附件文件名| VARCHAR(300) | No | | No |
+| confirm\_letter\_file | 经销商确认函附件| VARCHAR(300) | No | | No |
+| confirm\_letter\_file\_name | 经销商确认函附件文件名| VARCHAR(300) | No | | No |
+| bank\_code | 银行代码,如果需要自动开结算账户,本字段必填| VARCHAR(30) | No | | No |
+| bank\_acct\_type | 银行账户类型:1-对公;2-对私,如果需要自动开结算账户,本字段必填| VARCHAR(10) | Yes | | No |
+| card\_no | 银行卡号,如果需要自动开结算账户,本字段必填| VARCHAR(255) | Yes | | No |
+| card\_name | 银行卡对应的户名,如果需要自动开结算账户,本字段必填;若银行账户类型是对公,必须与企业名称一致| VARCHAR(100) | Yes | | No |
+| audit\_state | 审核状态,状态包括:A-待审核;B-审核失败;C-开户失败;D-开户成功但未创建结算账户;E-开户和创建结算账户成功| VARCHAR(50) | No | | No |
+| audit\_desc | 审核结果描述| VARCHAR(200) | No | | No |
+| status | 当前交易状态| VARCHAR(50) | No | | No |
+| error\_info | 错误描述| VARCHAR(500) | No | | No |
+| create\_time | 创建时间| INT | Yes | NULL | No |
+| update\_time | 更新时间| INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_order\_no | order\_no | No |
+| idx\_name | name | No |
+| idx\_company\_id | company\_id | No |
+| idx\_card\_no | card\_no | No |
+| idx\_member\_id | member\_id | No |
+
+
+## adapay\_div\_fee
+
+> **分账金额表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| trade\_id | 交易单号| VARCHAR(64) | Yes | NULL | No |
+| order\_id | 订单号| VARCHAR(64) | No | NULL | No |
+| company\_id | 企业ID| VARCHAR(255) | Yes | NULL | No |
+| distributor\_id | 店铺ID| VARCHAR(255) | No | NULL | No |
+| operator\_type | 操作者类型:distributor-店铺;dealer-经销;admin:超级管理员| VARCHAR(255) | Yes | NULL | No |
+| pay\_fee | 支付金额| INT UNSIGNED | Yes | 0 | No |
+| div\_fee | 当前用户的分账金额,以分为单位| INT UNSIGNED | No | 0 | No |
+| adapay\_member\_id | 汇付账号关联ID| INT | No | 0 | No |
+| create\_time | 创建时间| INT | Yes | NULL | No |
+| update\_time | 更新时间| INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| ix\_company\_id | company\_id | No |
+| ix\_distributor\_id | distributor\_id | No |
+| ix\_order\_id | order\_id | No |
+| ix\_trade\_id | trade\_id | No |
+| ix\_list | company\_id, adapay\_member\_id | No |
+
+
+## adapay\_draw\_cash
+
+> **adapay提现表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| operator\_id | 提现账号id| INT | No | 0 | No |
+| operator\_type | 操作账号类型:distributor-店铺;dealer-经销;admin:超级管理员| VARCHAR(255) | Yes | NULL | No |
+| operator | 操作人| VARCHAR(255) | No | NULL | No |
+| app\_id | 应用app\_id| VARCHAR(100) | Yes | NULL | No |
+| order\_no | 请求订单号| VARCHAR(64) | Yes | NULL | No |
+| cash\_id | 取现对象 id| VARCHAR(64) | No | NULL | No |
+| bank\_card\_id | 提现银行卡号| VARCHAR(100) | No | NULL | No |
+| bank\_card\_name | 银行卡对应的户名| VARCHAR(100) | No | NULL | No |
+| cash\_type | 取现类型:T1-T+1取现;D1-D+1取现;D0-即时取现| VARCHAR(10) | Yes | NULL | No |
+| cash\_amt | 取现金额,必须大于0,人民币为分| VARCHAR(255) | Yes | NULL | No |
+| adapay\_member\_id | 汇付账号id| VARCHAR(255) | Yes | NULL | No |
+| status | 提现状态| VARCHAR(255) | Yes | NULL | No |
+| request\_params | 请求参数 json| LONGTEXT | Yes | NULL | No |
+| response\_params | 回调参数 json| LONGTEXT | No | NULL | No |
+| create\_time | 创建时间| INT | Yes | NULL | No |
+| remark | 备注| VARCHAR(255) | No | NULL | No |
+| update\_time | 更新时间| INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_company\_id | company\_id | No |
+| idx\_order\_no | order\_no | No |
+| idx\_adapay\_member\_id | adapay\_member\_id | No |
+
+
+## adapay\_entry\_apply
+
+> **开户申请表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| user\_name | 用户名| VARCHAR(64) | Yes | NULL | No |
+| company\_id | 企业ID| VARCHAR(255) | Yes | NULL | No |
+| entry\_id | 开户进件ID| VARCHAR(255) | Yes | NULL | No |
+| apply\_type | 申请类型:dealer;distributor| VARCHAR(255) | Yes | NULL | No |
+| address | 所属地区| VARCHAR(255) | No | NULL | No |
+| comments | 审批意见| LONGTEXT | No | NULL | No |
+| is\_sms | 是否短信提醒: 1:是 0:否| VARCHAR(20) | No | NULL | No |
+| create\_time | 创建时间| INT | Yes | NULL | No |
+| status | WAIT\_APPROVE;APPROVED;REJECT| VARCHAR(20) | No | NULL | No |
+| update\_time | 更新时间| INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| ix\_company\_id | company\_id | No |
+
+
+## adapay\_member
+
+> **实名用户对象**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| app\_id | 应用app\_id| VARCHAR(100) | Yes | | No |
+| location | 用户地址| VARCHAR(200) | No | | No |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| pid | 父ID| BIGINT | Yes | 0 | No |
+| is\_update | 是否审核成功后修改 1:是 0:否| INT | Yes | 0 | No |
+| operator\_id | 操作者id| INT | No | 0 | No |
+| operator\_type | 操作者类型:distributor-店铺;dealer-经销;promoter-推广员| VARCHAR(255) | Yes | NULL | No |
+| email | 用户邮箱| VARCHAR(100) | No | | No |
+| member\_type | 账户类型| VARCHAR(20) | No | person | No |
+| gender | 性别,为空时表示未填写| VARCHAR(50) | No | | No |
+| nickname | 用户昵称| VARCHAR(50) | No | | No |
+| tel\_no | 用户手机号| VARCHAR(255) | No | | No |
+| user\_name | 用户姓名| VARCHAR(500) | No | | No |
+| cert\_type | 证件类型,仅支持:00-身份证| VARCHAR(10) | No | 00 | No |
+| cert\_id | 证件号| VARCHAR(255) | No | | No |
+| is\_sms | 是否短信提醒: 1:是 0:否| VARCHAR(20) | No | NULL | No |
+| audit\_state | 审核状态,状态包括:A-待审核;B-审核失败;C-开户失败;D-开户成功但未创建结算账户;E-开户和创建结算账户成功| VARCHAR(50) | No | | No |
+| audit\_desc | 审核结果描述| VARCHAR(500) | No | | No |
+| status | 当前交易状态| VARCHAR(50) | No | | No |
+| error\_info | 错误描述| VARCHAR(500) | No | | No |
+| create\_time | 创建时间| INT | Yes | NULL | No |
+| update\_time | 更新时间| INT | No | NULL | No |
+| valid | 是否点过结算中心| TINYINT(1) | No | 0 | No |
+| is\_created | 会员是否创建成功| TINYINT(1) | Yes | 0 | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_tel\_no | tel\_no | No |
+| idx\_user\_name | user\_name | No |
+| idx\_company\_id | company\_id | No |
+| idx\_cert\_id | cert\_id | No |
+| idx\_pid | pid | No |
+| idx\_operator\_id | operator\_id | No |
+| idx\_audit\_state | audit\_state | No |
+
+
+## adapay\_member\_update\_log
+
+> **adapay子账户修改log(审核成功后修改)**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| VARCHAR(255) | Yes | NULL | No |
+| app\_id | 应用app\_id| VARCHAR(100) | Yes | | No |
+| member\_id | adapay\_member的主键id(汇付id)| VARCHAR(255) | Yes | NULL | No |
+| data | 修改数据 json| LONGTEXT | Yes | NULL | No |
+| audit\_state | 审核状态,状态包括:A-待审核;B-审核失败;C-开户失败;D-开户成功但未创建结算账户;E-开户和创建结算账户成功| VARCHAR(50) | No | | No |
+| audit\_desc | 审核结果描述| VARCHAR(500) | No | | No |
+| create\_time | 创建时间| INT | Yes | NULL | No |
+| update\_time | 更新时间| INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_company\_id | company\_id | No |
+| idx\_app\_id | app\_id | No |
+| idx\_member\_id | member\_id | No |
+
+
+## adapay\_merchant\_entry
+
+> **adapay开户进件**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| request\_id | 请求ID| VARCHAR(100) | Yes | NULL | No |
+| usr\_phone | 注册手机号| VARCHAR(255) | Yes | NULL | No |
+| cont\_name | 联系人姓名| VARCHAR(500) | Yes | NULL | No |
+| cont\_phone | 联系人手机号码| VARCHAR(255) | Yes | NULL | No |
+| customer\_email | 电子邮箱| VARCHAR(100) | Yes | NULL | No |
+| mer\_name | 商户名,小微商户填负责人姓名| VARCHAR(50) | Yes | NULL | No |
+| mer\_short\_name | 商户名简称| VARCHAR(50) | Yes | NULL | No |
+| license\_code | 营业执照编码,如三证合一传三证合一码,企业时必填| VARCHAR(50) | No | NULL | No |
+| reg\_addr | 注册地址| VARCHAR(100) | Yes | NULL | No |
+| cust\_addr | 经营地址| VARCHAR(100) | Yes | NULL | No |
+| cust\_tel | 商户电话| VARCHAR(255) | Yes | NULL | No |
+| mer\_start\_valid\_date | 商户有效日期(始),格式 YYYYMMDD (若开户企业类商户,必填)| VARCHAR(30) | No | NULL | No |
+| mer\_valid\_date | 商户有效日期(至),格式 YYYYMMDD(若为长期有效,固定为“20991231”;若开户企业类商户,必填)| VARCHAR(30) | No | NULL | No |
+| legal\_name | 法人/负责人 姓名| VARCHAR(500) | Yes | NULL | No |
+| legal\_type | 法人/负责人证件类型,0-身份证| VARCHAR(10) | Yes | NULL | No |
+| legal\_idno | 法人/负责人证件号码| VARCHAR(255) | Yes | NULL | No |
+| legal\_mp | 法人/负责人手机号| VARCHAR(255) | Yes | NULL | No |
+| legal\_start\_cert\_id\_expires | 法人/负责人身份证有效期(始),格式 YYYYMMDD| VARCHAR(30) | Yes | NULL | No |
+| legal\_id\_expires | 法人/负责人身份证有效期(至),格式 YYYYMMDD| VARCHAR(30) | Yes | NULL | No |
+| card\_id\_mask | 结算银行卡号| VARCHAR(255) | Yes | NULL | No |
+| bank\_code | 结算银行卡所属银行code| VARCHAR(20) | Yes | NULL | No |
+| card\_name | 结算银行卡开户姓名| VARCHAR(500) | Yes | NULL | No |
+| bank\_acct\_type | 结算银行账户类型,1 : 对公, 2 : 对私。小微只能是对私| VARCHAR(5) | Yes | NULL | No |
+| prov\_code | 结算银行卡省份编码| VARCHAR(10) | Yes | NULL | No |
+| area\_code | 结算银行卡地区编码| VARCHAR(10) | Yes | NULL | No |
+| rsa\_public\_key | 商户rsa 公钥| LONGTEXT | No | NULL | No |
+| entry\_mer\_type | 商户类型:1-企业;2-小微| VARCHAR(10) | Yes | NULL | No |
+| test\_api\_key | 测试API Key| VARCHAR(255) | No | NULL | No |
+| live\_api\_key | 生产API Key| VARCHAR(255) | No | NULL | No |
+| login\_pwd | 初始密码| VARCHAR(1024) | No | NULL | No |
+| app\_id\_list | 应用ID列表| LONGTEXT | No | NULL | No |
+| sign\_view\_url | 合同查看地址| VARCHAR(1024) | No | NULL | No |
+| is\_sms | 是否短信提醒: 1:是 0:否| VARCHAR(20) | No | NULL | No |
+| status | 接口调用状态,succeeded - 成功 failed - 失败 pending - 处理中| VARCHAR(20) | No | NULL | No |
+| error\_msg | 错误描述| VARCHAR(500) | No | NULL | No |
+| create\_time | 创建时间| INT | Yes | NULL | No |
+| update\_time | 更新时间| INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_company\_id | company\_id | No |
+| idx\_request\_id | request\_id | No |
+
+
+## adapay\_merchant\_resident
+
+> **adapay商户入驻**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| request\_id | 请求ID| VARCHAR(100) | Yes | NULL | No |
+| sub\_api\_key | 商户开户进件返回的API Key| VARCHAR(255) | Yes | NULL | No |
+| fee\_type | 费率类型:01-标准费率线上,02-标准费率线下| VARCHAR(10) | Yes | NULL | No |
+| app\_id | 商户开户进件返回的应用ID| VARCHAR(255) | Yes | NULL | No |
+| wx\_category | 微信经营类目(与支付宝二选一)| VARCHAR(50) | No | NULL | No |
+| alipay\_category | 支付宝经营类目(与微信二选一)| VARCHAR(50) | No | NULL | No |
+| cls\_id | 行业分类| VARCHAR(50) | No | NULL | No |
+| model\_type | 入驻模式:1-服务商模式| VARCHAR(10) | Yes | NULL | No |
+| mer\_type | 商户种类,1-政府机构,2-国营企业,3-私营企业,4-外资企业,5-个体工商户,7-事业单位,8-小微| VARCHAR(10) | Yes | NULL | No |
+| province\_code | 省份编码| VARCHAR(20) | Yes | NULL | No |
+| city\_code | 城市编码| VARCHAR(20) | Yes | NULL | No |
+| district\_code | 区县编码| VARCHAR(20) | Yes | NULL | No |
+| add\_value\_list | 支付渠道配置信息| LONGTEXT | Yes | NULL | No |
+| adapay\_fee\_mode | 总商户 手续费扣除方式 I:内扣 O:外扣| VARCHAR(20) | Yes | NULL | No |
+| status | 接口调用状态,succeeded - 成功 failed - 失败 pending - 处理中| VARCHAR(20) | Yes | NULL | No |
+| alipay\_stat | 支付宝入驻结果:S-成功,F-失败| VARCHAR(20) | No | NULL | No |
+| alipay\_stat\_msg | 支付宝入驻错误描述| VARCHAR(500) | No | NULL | No |
+| wx\_stat | 微信入驻结果:S-成功,F-失败| VARCHAR(20) | No | NULL | No |
+| wx\_stat\_msg | 微信入驻错误描述| VARCHAR(500) | No | NULL | No |
+| create\_time | 创建时间| INT | Yes | NULL | No |
+| update\_time | 更新时间| INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_company\_id | company\_id | No |
+| idx\_request\_id | request\_id | No |
+
+
+## adapay\_operation\_log
+
+> **adapay操作日志表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| operator\_id | 日志实际操作者ID| BIGINT | Yes | 0 | No |
+| rel\_id | 关联ID,店铺类型为分店ID,经销商为主经销商账号operator\_id| BIGINT | Yes | 0 | No |
+| log\_type | merchant-主商户;distributor-店铺;dealer-经销| VARCHAR(50) | Yes | NULL | No |
+| content | 日志内容| VARCHAR(255) | Yes | | No |
+| create\_time | 创建时间| INT | Yes | NULL | No |
+| update\_time | 更新时间| INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_id | company\_id, rel\_id | No |
+| idx\_log\_type | log\_type | No |
+
+
+## adapay\_paymemt\_confirm
+
+> **adapay支付确认表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| order\_id | 订单id| VARCHAR(255) | Yes | NULL | No |
+| distributor\_id | 店铺id| BIGINT | No | NULL | No |
+| payment\_id | Adapay生成的支付对象id 对应order表的transaction\_id| VARCHAR(255) | No | NULL | No |
+| payment\_confirmation\_id | 支付确认id| VARCHAR(255) | No | NULL | No |
+| order\_no | 支付确认请求订单号| VARCHAR(255) | No | NULL | No |
+| confirm\_amt | 确认金额 单位:元| VARCHAR(255) | No | NULL | No |
+| div\_members | 分账对象信息列表 json| LONGTEXT | No | NULL | No |
+| status | 交易状态| VARCHAR(255) | No | NULL | No |
+| request\_params | 请求参数 json| LONGTEXT | No | NULL | No |
+| response\_params | 响应参数 json| LONGTEXT | No | NULL | No |
+| create\_time | 创建时间| INT | Yes | NULL | No |
+| update\_time | 更新时间| INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_company\_id | company\_id | No |
+| idx\_order\_id | order\_id | No |
+| idx\_order\_no | order\_no | No |
+| distributor\_id | distributor\_id | No |
+
+
+## adapay\_payment\_reverse
+
+> **adapay支付撤销表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| order\_id | 订单id| VARCHAR(255) | Yes | NULL | No |
+| payment\_id | Adapay生成的支付对象id 对应order表的transaction\_id| VARCHAR(255) | Yes | NULL | No |
+| payment\_reverse\_id | 支付撤销id| VARCHAR(255) | No | NULL | No |
+| app\_id | 应用app\_id| VARCHAR(255) | Yes | NULL | No |
+| order\_no | 支付撤销请求订单号| VARCHAR(255) | Yes | NULL | No |
+| reverse\_amt | 撤销金额 单位:元| VARCHAR(255) | Yes | NULL | No |
+| status | 状态| VARCHAR(255) | Yes | NULL | No |
+| request\_params | 请求参数 json| LONGTEXT | Yes | NULL | No |
+| response\_params | 响应参数 json| LONGTEXT | No | NULL | No |
+| create\_time | 创建时间| INT | Yes | NULL | No |
+| update\_time | 更新时间| INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_company\_id | company\_id | No |
+| idx\_order\_id | order\_id | No |
+| idx\_order\_no | order\_no | No |
+
+
+## adapay\_regions
+
+> **省市编码(四位码)**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| area\_name | 名称| VARCHAR(50) | Yes | NULL | No |
+| pid | 父级ID| BIGINT | Yes | NULL | No |
+| area\_code | 编码| VARCHAR(50) | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_area\_name | area\_name | No |
+| idx\_area\_code | area\_code | No |
+
+
+## adapay\_regions\_third
+
+> **省市区编码(六位码或九位码)**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| area\_name | 名称| VARCHAR(50) | Yes | NULL | No |
+| pid | 父级ID| BIGINT | Yes | NULL | No |
+| area\_code | 编码| VARCHAR(50) | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_area\_name | area\_name | No |
+| idx\_area\_code | area\_code | No |
+
+
+## adapay\_settle\_account
+
+> **结算账户**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| app\_id | 应用app\_id| VARCHAR(100) | No | | No |
+| settle\_account\_id | 由 Adapay 生成的结算账户对象 id| VARCHAR(100) | No | | No |
+| member\_id | member\_id| BIGINT | Yes | NULL | No |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| channel | 目前仅支持:bank\_account(银行卡)| VARCHAR(50) | No | bank_account | No |
+| card\_id | 银行卡号,如果需要自动开结算账户,本字段必填| VARCHAR(255) | No | | No |
+| card\_name | 银行卡对应的户名,如果需要自动开结算账户,本字段必填;若银行账户类型是对公,必须与企业名称一致| VARCHAR(500) | No | | No |
+| cert\_id | 证件号| VARCHAR(255) | No | | No |
+| cert\_type | 证件类型,仅支持:00-身份证| VARCHAR(10) | No | 00 | No |
+| tel\_no | 用户手机号| VARCHAR(255) | No | | No |
+| bank\_code | 银行编码,详见附录 银行代码,银行账户类型对公时,必填| VARCHAR(30) | No | | No |
+| bank\_name | 开户银行名称| VARCHAR(30) | No | | No |
+| bank\_acct\_type | 银行账户类型:1-对公;2-对私,如果需要自动开结算账户,本字段必填| VARCHAR(10) | Yes | | No |
+| prov\_code | 省份编码, 银行账户类型为对公时,必填| VARCHAR(10) | No | | No |
+| area\_code | 地区编码, 银行账户类型为对公时,必填| VARCHAR(10) | No | | No |
+| create\_time | 创建时间| INT | Yes | NULL | No |
+| update\_time | 更新时间| INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_member\_id | member\_id | No |
+| idx\_card\_id | card\_id | No |
+| idx\_company\_id | company\_id | No |
+| idx\_cert\_id | cert\_id | No |
+| idx\_settle\_account\_id | settle\_account\_id | No |
+
+
+## adapay\_sms\_log
+
+> **adapay短信提醒日志表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| VARCHAR(255) | Yes | NULL | No |
+| usr\_phone | 发送手机号| VARCHAR(255) | Yes | NULL | No |
+| rel\_id | 如果type(提醒类型)为1或2 此字段为开户的member\_id,如果type(提醒类型)为3 此字段为dealer\_id| VARCHAR(255) | Yes | NULL | No |
+| type | 提醒类型 总商户开户提醒:1 子商户开户提醒:2 重置密码提醒:3| VARCHAR(255) | Yes | NULL | No |
+| content | 发送内容| LONGTEXT | Yes | NULL | No |
+| status | 发送状态 1:成功 0:失败| VARCHAR(255) | No | NULL | No |
+| error\_info | 错误信息| LONGTEXT | No | NULL | No |
+| create\_time | 创建时间| INT | Yes | NULL | No |
+| update\_time | 更新时间| INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| ix\_company\_id | company\_id | No |
+| ix\_rel\_id | rel\_id | No |
+| ix\_usr\_phone | usr\_phone | No |
+
+
+## adapay\_submit\_license
+
+> **adapay提交商户证照**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| sub\_api\_key | 渠道商下商户的apiKey| VARCHAR(255) | Yes | NULL | No |
+| social\_credit\_code\_id | 统一社会信用代码的pic\_id,企业商户必填,小微商户不填| VARCHAR(255) | No | NULL | No |
+| legal\_certId\_front\_id | 法人身份证正面的pic\_id| VARCHAR(255) | Yes | NULL | No |
+| legal\_cert\_id\_back\_id | 法人身份证反面的pic\_id| VARCHAR(255) | Yes | NULL | No |
+| account\_opening\_permit\_id | 开户许可证图片的pic\_id| VARCHAR(255) | Yes | NULL | No |
+| business\_add | 若入驻的费率类型为线上时,该字段必填,请传入商户的业务网址或者商城地址| VARCHAR(500) | No | NULL | No |
+| store\_id | 门店的pic\_id,若入驻的费率类型为线下时,该字段必填| VARCHAR(255) | No | NULL | No |
+| transaction\_test\_record\_id | 商户在业务网址或商城地址上测试的交易记录截图的pic\_id| VARCHAR(255) | No | NULL | No |
+| web\_pic\_id | 网站截图的pic\_id| VARCHAR(255) | No | NULL | No |
+| lease\_contract\_id | 租赁合同的pic\_id,如经营场所照片无法体现经营内容时上传| VARCHAR(255) | No | NULL | No |
+| settle\_account\_certificate\_id | 结算账号开户证明图片的pic\_id| VARCHAR(255) | No | NULL | No |
+| buss\_support\_materials\_id | 业务场景证明材料pic\_id,如经营场所照片无法体现经营内容时上传| VARCHAR(255) | No | NULL | No |
+| icp\_registration\_license\_id | icp备案许可证明或者许可证编码的pic\_id| VARCHAR(255) | No | NULL | No |
+| industry\_qualify\_doc\_type | 行业资质文件类型:1游戏类,2直播类,3小说图书类,4其他| VARCHAR(255) | No | NULL | No |
+| industry\_qualify\_doc\_license\_id | 行业资质文件的pic\_id| VARCHAR(255) | No | NULL | No |
+| shareholder\_info\_list | 股东信息| LONGTEXT | No | NULL | No |
+| is\_sms | 是否短信提醒: 1:是 0:否| VARCHAR(20) | No | NULL | No |
+| audit\_status | W -> 待补充,I -> 初始,P -> 通过,R -> 拒绝| VARCHAR(255) | No | NULL | No |
+| audit\_desc | 审核拒绝原因| VARCHAR(500) | No | NULL | No |
+| create\_time | 创建时间| INT | Yes | NULL | No |
+| update\_time | 更新时间| INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_company\_id | company\_id | No |
+
+
+## adapay\_upload\_license
+
+> **adapay上传商户证照**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| sub\_api\_key | 渠道商下商户的apiKey| VARCHAR(255) | Yes | NULL | No |
+| file\_url | 文件路径| LONGTEXT | Yes | NULL | No |
+| file\_type | 图片类型,01:三证合一码,02:法人/小微负责人身份证正面,03:法人/小微负责人身份证反面,04:门店,05:开户许可证/小微负责人银行卡正面照,06:股东身份证正面,07:股东身份证反面,08:结算账号开户证明,09:网站截图,10:行业资质文件,11:icp备案许可证明或者许可证编码,12:租赁合同,13:交易测试记录,14:业务场景证明材料| VARCHAR(10) | Yes | NULL | No |
+| pic\_id | Adapay系统生成的图片id,作为 提交商户证照 接口的请求参数上送至Adapay| VARCHAR(255) | Yes | NULL | No |
+| error\_msg | 错误描述| VARCHAR(500) | No | NULL | No |
+| create\_time | 创建时间| INT | Yes | NULL | No |
+| update\_time | 更新时间| INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_company\_id | company\_id | No |
+
+
+## adapay\_withdraw\_set
+
+> **提现设置表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | 提现配置表id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| isAuto | 是否支持自动提现| TINYINT(1) | Yes | NULL | No |
+| company\_id | 公司company id| BIGINT | Yes | NULL | No |
+| distributor\_id | 经销商 id| BIGINT | Yes | NULL | No |
+| cash\_amt | 取现金额,必须大于0,人民币为元| VARCHAR(255) | No | NULL | No |
+| cash\_type | 取现方式 T0:T0取现; T1:T1取现 D1:D1取现| VARCHAR(255) | Yes | NULL | No |
+| rule | 提现规则| LONGTEXT | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_company\_id | company\_id | No |
+
+
+## adapay\_wx\_business\_category
+
+> **微信经营类目**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| fee\_type | 费率类型| VARCHAR(10) | Yes | NULL | No |
+| fee\_type\_name | 费率类型名称| VARCHAR(50) | Yes | NULL | No |
+| merchant\_type\_name | 商户种类名称| VARCHAR(50) | Yes | NULL | No |
+| business\_category\_id | 微信经营类目id| VARCHAR(50) | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_merchant\_type\_name | merchant\_type\_name | No |
+| idx\_business\_category\_id | business\_category\_id | No |
+
+
+## aftersales
+
+> **售后主表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| aftersales\_bn | 售后单号| BIGINT | Yes | NULL | No |
+| order\_id | 订单号| BIGINT | Yes | NULL | No |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| user\_id | 用户id| BIGINT | Yes | NULL | No |
+| salesman\_id | 导购员id| BIGINT | No | 0 | No |
+| item\_bn | 商品编码| VARCHAR(255) | No | NULL | No |
+| shop\_id | 门店id| BIGINT | Yes | 0 | No |
+| distributor\_id | 分销商id| BIGINT UNSIGNED | Yes | 0 | No |
+| supplier\_id | 供应商id| INT | Yes | 0 | No |
+| aftersales\_type | 售后服务类型| VARCHAR(255) | Yes | NULL | No |
+| aftersales\_status | 售后状态| INT | Yes | 0 | No |
+| progress | 处理进度| INT | Yes | 0 | No |
+| refund\_fee | 应退总金额,单位(分)| INT UNSIGNED | Yes | NULL | No |
+| refund\_point | 应退总积分| INT UNSIGNED | Yes | NULL | No |
+| reason | 申请售后原因| VARCHAR(300) | Yes | NULL | No |
+| description | 申请描述| VARCHAR(300) | No | NULL | No |
+| evidence\_pic | 图片凭证信息| LONGTEXT | No | NULL | No |
+| refuse\_reason | 拒绝原因| LONGTEXT | No | NULL | No |
+| memo | 售后备注| VARCHAR(300) | No | NULL | No |
+| sendback\_data | 消费者提交退货物流信息| JSON | No | NULL | No |
+| sendconfirm\_data | 商家重新发货物流信息| JSON | No | NULL | No |
+| third\_data | 百胜等第三方返回的数据| VARCHAR(255) | No | NULL | No |
+| aftersales\_address | 售后回寄地址信息| JSON | No | NULL | No |
+| distributor\_remark | 店务端商家备注| VARCHAR(255) | Yes | | No |
+| create\_time | 创建时间| INT | Yes | NULL | No |
+| update\_time | 更新时间| INT | No | NULL | No |
+| contact | 联系人| VARCHAR(500) | No | NULL | No |
+| mobile | 手机号| VARCHAR(255) | No | NULL | No |
+| merchant\_id | 商户id| BIGINT | Yes | 0 | No |
+| is\_partial\_cancel | 是否部分取消订单退款| TINYINT(1) | No | 0 | No |
+| return\_type | 退货方式:logistics寄回 offline到店退| VARCHAR(20) | Yes | logistics | No |
+| return\_distributor\_id | 退货门店ID| BIGINT UNSIGNED | Yes | 0 | No |
+| self\_delivery\_operator\_id | 自配送员id| BIGINT | No | 0 | No |
+| freight | 退款运费| INT UNSIGNED | No | 0 | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | aftersales\_bn | Yes |
+| idx\_aftersales\_bn | aftersales\_bn | No |
+| idx\_order\_id | order\_id | No |
+| idx\_company\_id | company\_id | No |
+| idx\_user\_id | user\_id | No |
+| idx\_merchant\_id | merchant\_id | No |
+
+
+## aftersales\_detail
+
+> **售后明细子表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| detail\_id | 售后明细ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| distributor\_id | 分销商id| BIGINT UNSIGNED | Yes | 0 | No |
+| user\_id | 用户id| BIGINT | Yes | NULL | No |
+| aftersales\_bn | 售后单号| BIGINT | Yes | NULL | No |
+| order\_id | 订单号| VARCHAR(64) | Yes | NULL | No |
+| sub\_order\_id | 订单明细表id| BIGINT | Yes | NULL | No |
+| goods\_id | 产品id| BIGINT | Yes | NULL | No |
+| item\_id | 商品id| BIGINT | Yes | NULL | No |
+| item\_bn | 商品编码| VARCHAR(255) | No | NULL | No |
+| item\_name | 商品名称| VARCHAR(255) | No | NULL | No |
+| order\_item\_type | 订单商品类型,normal:正常商品,gift: 赠品, plus\_buy: 加价购商品| VARCHAR(255) | Yes | normal | No |
+| item\_pic | 商品图片| VARCHAR(255) | No | NULL | No |
+| num | 售后数量| INT UNSIGNED | Yes | NULL | No |
+| refund\_fee | 应退总金额,单位(分)| INT UNSIGNED | Yes | NULL | No |
+| refund\_point | 积分支付应退款积分| INT | No | 0 | No |
+| aftersales\_type | 售后服务类型| VARCHAR(255) | Yes | NULL | No |
+| progress | 处理进度| INT | Yes | 0 | No |
+| aftersales\_status | 售后状态| INT | Yes | 0 | No |
+| create\_time | 创建时间| INT | Yes | NULL | No |
+| update\_time | 更新时间| INT | No | NULL | No |
+| auto\_refuse\_time | 售后自动驳回时间| VARCHAR(255) | Yes | 0 | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | detail\_id | Yes |
+| idx\_aftersales\_bn | aftersales\_bn | No |
+| idx\_order\_id | order\_id | No |
+| idx\_user\_id | user\_id | No |
+| idx\_company\_order\_sub | company\_id, order\_id, sub\_order\_id | No |
+
+
+## aftersales\_offline\_refund
+
+> **线下转账退款**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | 自增ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| refund\_bn | 申请退款单号| BIGINT | Yes | NULL | No |
+| order\_id | 订单号| BIGINT | Yes | NULL | No |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| refund\_fee | 应退金额,以分为单位,非积分支付| INT UNSIGNED | Yes | NULL | No |
+| bank\_account\_name | 收款账户名称| VARCHAR(50) | Yes | NULL | No |
+| bank\_account\_no | 收款银行账号| VARCHAR(30) | Yes | NULL | No |
+| bank\_name | 收款开户银行| VARCHAR(100) | Yes | NULL | No |
+| refund\_account\_name | 退款账户名| VARCHAR(100) | No | | No |
+| refund\_account\_bank | 退款银行| VARCHAR(100) | No | | No |
+| refund\_account\_no | 退款账号| VARCHAR(100) | No | | No |
+| create\_time | 创建时间| INT | Yes | NULL | No |
+| update\_time | 更新时间| INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_refund\_bn | refund\_bn | No |
+| idx\_order\_id | order\_id | No |
+| idx\_company\_id | company\_id | No |
+
+
+## aftersales\_refund
+
+> **退款表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| refund\_bn | 申请退款单号| BIGINT | Yes | NULL | No |
+| aftersales\_bn | 售后单号| BIGINT | No | NULL | No |
+| order\_id | 订单号| BIGINT | Yes | NULL | No |
+| trade\_id | 支付单号| VARCHAR(64) | Yes | NULL | No |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| supplier\_id | 供应商id| BIGINT | Yes | 0 | No |
+| user\_id | 用户id| BIGINT | Yes | NULL | No |
+| shop\_id | 门店id| BIGINT | No | 0 | No |
+| distributor\_id | 分销商id| BIGINT UNSIGNED | Yes | 0 | No |
+| refund\_type | 退款类型| VARCHAR(255) | Yes | 0 | No |
+| refund\_channel | 退款渠道| VARCHAR(255) | Yes | NULL | No |
+| refund\_status | 退款状态| VARCHAR(255) | Yes | READY | No |
+| refund\_fee | 应退金额,以分为单位,非积分支付| INT UNSIGNED | Yes | NULL | No |
+| refunded\_fee | 实退金额,以分为单位| INT UNSIGNED | Yes | 0 | No |
+| refund\_point | 应退积分,以分为单位| INT UNSIGNED | Yes | NULL | No |
+| refunded\_point | 实退积分| INT UNSIGNED | Yes | 0 | No |
+| return\_point | 退还(下单获得的)积分,以分为单位| INT UNSIGNED | Yes | NULL | No |
+| return\_freight | 是否退运费| INT | Yes | 0 | No |
+| pay\_type | 支付方式,同对应支付单| VARCHAR(255) | No | | No |
+| currency | 货币类型| VARCHAR(16) | No | NULL | No |
+| refunds\_memo | 退款备注| VARCHAR(255) | No | NULL | No |
+| refund\_success\_time | 退款成功时间| BIGINT | No | NULL | No |
+| refund\_id | 商户返回退款单号| VARCHAR(50) | No | NULL | No |
+| create\_time | 创建时间| INT | Yes | NULL | No |
+| update\_time | 更新时间| INT | No | NULL | No |
+| cur\_fee\_type | 系统配置货币类型| VARCHAR(5) | No | CNY | No |
+| cur\_fee\_rate | 系统配置货币汇率| DOUBLE PRECISION | Yes | 1 | No |
+| cur\_fee\_symbol | 系统配置货币符号| VARCHAR(255) | No | ¥ | No |
+| cur\_pay\_fee | 系统货币支付金额| VARCHAR(255) | Yes | NULL | No |
+| hf\_order\_id | hf\_order\_id| VARCHAR(255) | No | NULL | No |
+| merchant\_id | 商户id| BIGINT | Yes | 0 | No |
+| freight | 退款运费| INT UNSIGNED | No | 0 | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | refund\_bn | Yes |
+| idx\_aftersales\_bn | aftersales\_bn | No |
+| idx\_order\_id | order\_id | No |
+| idx\_user\_id | user\_id | No |
+| idx\_merchant\_id | merchant\_id | No |
+| idx\_supplier\_id | supplier\_id | No |
+
+
+## ali\_mini\_app\_setting
+
+> **支付宝小程序配置表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| setting\_id | 配置id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| authorizer\_appid | 支付宝小程序appid| VARCHAR(64) | Yes | NULL | No |
+| merchant\_private\_key | 应用私钥| LONGTEXT | Yes | NULL | No |
+| api\_sign\_method | api加密类型| VARCHAR(64) | Yes | NULL | No |
+| alipay\_cert\_path | 支付宝公钥证书文件路径| LONGTEXT | No | NULL | No |
+| alipay\_root\_cert\_path | 支付宝根证书文件路径| LONGTEXT | No | NULL | No |
+| merchant\_cert\_path | 应用公钥证书文件路径| LONGTEXT | No | NULL | No |
+| alipay\_public\_key | 支付宝公钥字符串| LONGTEXT | No | NULL | No |
+| notify\_url | 支付类接口异步通知接收服务地址| VARCHAR(255) | No | NULL | No |
+| encrypt\_key | AES密钥| VARCHAR(255) | No | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | setting\_id | Yes |
+| ix\_company\_id | company\_id | Yes |
+| ix\_authorizer\_appid | authorizer\_appid | Yes |
+
+
+## aliyunsms\_accesskey
+
+> **AccessKey表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| accesskey\_id | accesskey\_id| VARCHAR(255) | Yes | NULL | No |
+| accesskey\_secret | accesskey\_secret| VARCHAR(255) | Yes | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_company\_id | company\_id | No |
+
+
+## aliyunsms\_record
+
+> **短信发送记录**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| mobile | 手机号| VARCHAR(255) | Yes | NULL | No |
+| scene\_id | 场景ID| INT | Yes | NULL | No |
+| task\_id | 任务ID| INT | Yes | NULL | No |
+| template\_code | 模板code| VARCHAR(255) | Yes | NULL | No |
+| sms\_content | 短信内容| VARCHAR(255) | No | NULL | No |
+| template\_type | 短信类型:0:验证码;1:短信通知;2:推广短信;| VARCHAR(255) | Yes | NULL | No |
+| status | 发送状态:1-发送中;2-发送失败;3-发送成功| VARCHAR(255) | Yes | NULL | No |
+| biz\_id | 发送回执ID| VARCHAR(255) | Yes | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_company\_id | company\_id | No |
+
+
+## aliyunsms\_scene
+
+> **场景表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| scene\_name | 场景名称| VARCHAR(255) | Yes | NULL | No |
+| scene\_title | 场景title| VARCHAR(255) | No | NULL | No |
+| template\_type | 短信类型: 0:验证码;1:短信通知;2:推广短信;3:国际/港澳台消息| VARCHAR(255) | Yes | NULL | No |
+| status | 状态| VARCHAR(255) | Yes | NULL | No |
+| default\_template | 默认模板| VARCHAR(255) | No | NULL | No |
+| variables | 模板变量| VARCHAR(500) | No | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_company\_id | company\_id | No |
+
+
+## aliyunsms\_scene\_item
+
+> **场景实例表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| scene\_id | 场景ID| INT | Yes | NULL | No |
+| sign\_id | 签名ID| INT | Yes | NULL | No |
+| sign\_name | 签名名称| VARCHAR(255) | Yes | NULL | No |
+| template\_id | 模板ID| INT | Yes | NULL | No |
+| template\_content | 模板内容| LONGTEXT | Yes | NULL | No |
+| status | 0-未启用;1-已启用| INT | Yes | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_company\_id | company\_id | No |
+
+
+## aliyunsms\_sign
+
+> **短信签名表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| sign\_name | 签名名称| VARCHAR(20) | Yes | NULL | No |
+| sign\_source | 签名来源| VARCHAR(2) | Yes | NULL | No |
+| remark | 签名申请说明| VARCHAR(255) | Yes | NULL | No |
+| sign\_file | 资质证明| LONGTEXT | No | NULL | No |
+| delegate\_file | 委托授权书| LONGTEXT | No | NULL | No |
+| status | 审核状态:0-审核中;1-审核通过;2-审核失败| VARCHAR(2) | Yes | NULL | No |
+| reason | 审核备注| VARCHAR(255) | No | NULL | No |
+| third\_party | 签名用途 1:他用;0:自用| INT | Yes | 0 | No |
+| qualification\_id | 资质ID| VARCHAR(255) | No | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_company\_id | company\_id | No |
+
+
+## aliyunsms\_task
+
+> **短信群发任务**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| task\_name | 任务名称| VARCHAR(255) | Yes | NULL | No |
+| sign\_id | 签名ID| INT | Yes | NULL | No |
+| template\_id | 模板id| INT | Yes | NULL | No |
+| template\_name | 模板名称| VARCHAR(255) | Yes | NULL | No |
+| user\_id | 会员id| LONGTEXT | Yes | NULL | No |
+| status | 发送状态:1-等待中;2-发送成功;3-发送失败;4-已撤销| VARCHAR(255) | Yes | NULL | No |
+| send\_at | 发送时间| INT | Yes | NULL | No |
+| total\_num | 号码数量| INT | Yes | NULL | No |
+| failed\_num | 失败号码数量| INT | Yes | NULL | No |
+| is\_send | 是否已发送| INT | Yes | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_company\_id | company\_id | No |
+
+
+## aliyunsms\_template
+
+> **模板表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | 模板ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| template\_type | 短信类型: 0:验证码;1:短信通知;2:推广短信;3:国际/港澳台消息| VARCHAR(255) | Yes | NULL | No |
+| template\_name | 模板名称| VARCHAR(255) | Yes | NULL | No |
+| remark | 模板申请说明| VARCHAR(255) | Yes | NULL | No |
+| template\_content | 模板内容| LONGTEXT | Yes | NULL | No |
+| scene\_id | 短信场景| INT | Yes | NULL | No |
+| template\_code | 模板编码| VARCHAR(255) | No | NULL | No |
+| status | 审核状态:0-审核中;1-审核通过;2-审核失败| VARCHAR(255) | Yes | NULL | No |
+| reason | 审核备注| VARCHAR(255) | No | NULL | No |
+| related\_sign\_name | 关联签名名称| VARCHAR(20) | Yes | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_company\_id | company\_id | No |
+
+
+## bspay\_div\_fee
+
+> **分账金额表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| trade\_id | 交易单号| VARCHAR(64) | Yes | NULL | No |
+| order\_id | 订单号| VARCHAR(64) | No | NULL | No |
+| company\_id | 企业ID| VARCHAR(255) | Yes | NULL | No |
+| distributor\_id | 店铺ID| VARCHAR(255) | No | NULL | No |
+| supplier\_id | 供应商ID| BIGINT | Yes | 0 | No |
+| operator\_type | 操作者类型:distributor-店铺;dealer-经销;admin:超级管理员;supplier:经销商| VARCHAR(255) | Yes | NULL | No |
+| pay\_fee | 支付金额| INT UNSIGNED | Yes | 0 | No |
+| div\_fee | 当前用户的分账金额,以分为单位| INT UNSIGNED | No | 0 | No |
+| huifu\_id | 汇付ID| VARCHAR(255) | No | | No |
+| created | 创建时间| INT | Yes | NULL | No |
+| updated | 更新时间| INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| ix\_company\_id | company\_id | No |
+| ix\_distributor\_id | distributor\_id | No |
+| ix\_supplier\_id | supplier\_id | No |
+| ix\_order\_id | order\_id | No |
+| ix\_trade\_id | trade\_id | No |
+| ix\_list | company\_id, huifu\_id | No |
+
+
+## bspay\_entry\_apply
+
+> **开户申请表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| user\_name | 用户名| VARCHAR(64) | Yes | NULL | No |
+| company\_id | 公司id| BIGINT | No | NULL | No |
+| user\_id | 开户进件ID| VARCHAR(255) | Yes | NULL | No |
+| operator\_id | 操作者id| INT | No | 0 | No |
+| operator\_type | 操作者类型:distributor-店铺;dealer-经销;promoter-推广员| VARCHAR(255) | Yes | NULL | No |
+| user\_type | 进件类型| VARCHAR(20) | Yes | indv | No |
+| address | 所属地区| VARCHAR(255) | No | NULL | No |
+| comments | 审批意见| LONGTEXT | No | NULL | No |
+| status | WAIT\_APPROVE;APPROVED;REJECT| VARCHAR(20) | No | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | 更新时间| INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| ix\_company\_id | company\_id | No |
+| ix\_user\_id | user\_id | No |
+| ix\_operator\_type | operator\_type | No |
+| ix\_status | status | No |
+
+
+## bspay\_paymemt\_confirm
+
+> **斗拱支付确认表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| order\_id | 订单id| VARCHAR(255) | Yes | NULL | No |
+| distributor\_id | 店铺id| BIGINT | No | NULL | No |
+| payment\_id | 斗拱生成的交易订单号 对应order表的transaction\_id| VARCHAR(255) | No | NULL | No |
+| payment\_confirmation\_id | 支付确认id| VARCHAR(255) | No | NULL | No |
+| order\_no | 支付确认请求订单号| VARCHAR(255) | No | NULL | No |
+| confirm\_amt | 确认金额 单位:元| VARCHAR(255) | No | NULL | No |
+| div\_members | 分账对象信息列表 json| LONGTEXT | No | NULL | No |
+| status | 交易状态| VARCHAR(255) | No | NULL | No |
+| request\_params | 请求参数 json| LONGTEXT | No | NULL | No |
+| response\_params | 响应参数 json| LONGTEXT | No | NULL | No |
+| created | 创建时间| INT | Yes | NULL | No |
+| updated | 更新时间| INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_company\_id | company\_id | No |
+| idx\_order\_id | order\_id | No |
+| idx\_order\_no | order\_no | No |
+| distributor\_id | distributor\_id | No |
+
+
+## bspay\_regions\_third
+
+> **省市区编码(六位码或九位码)**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| area\_name | 名称| VARCHAR(50) | Yes | NULL | No |
+| pid | 父级ID| BIGINT | Yes | NULL | No |
+| area\_code | 编码| VARCHAR(50) | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_area\_name | area\_name | No |
+| idx\_area\_code | area\_code | No |
+
+
+## bspay\_user\_card
+
+> **用户结算账户**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| sys\_id | 商户的huifu\_id| VARCHAR(255) | No | | No |
+| huifu\_id | 汇付ID| VARCHAR(255) | No | | No |
+| user\_id | 开户进件ID| BIGINT | Yes | NULL | No |
+| req\_seq\_id | 请求流水号| VARCHAR(64) | No | | No |
+| company\_id | 公司id| BIGINT | No | NULL | No |
+| user\_type | 进件类型| VARCHAR(20) | Yes | indv | No |
+| card\_type | 结算银行卡账户类型 0:对公,1:对私,2:对私非法人;| VARCHAR(10) | Yes | 0 | No |
+| card\_name | 结算银行卡持卡人姓名| VARCHAR(500) | Yes | | No |
+| card\_no | 结算银行卡卡号| VARCHAR(100) | Yes | | No |
+| prov\_id | 结算卡银行所在省| VARCHAR(12) | Yes | | No |
+| area\_id | 结算卡银行所在市| VARCHAR(12) | Yes | | No |
+| bank\_code | 结算卡银行号,对公必填| VARCHAR(12) | No | | No |
+| branch\_name | 结算卡支行名称,对公时必填| VARCHAR(100) | No | | No |
+| cert\_no | 结算卡持卡人身份证号,对私必填| VARCHAR(32) | No | | No |
+| cert\_validity\_type | 结算卡持卡人身份证有效期类型 1:长期有效 0:非长期有效;| INT | No | 0 | No |
+| cert\_begin\_date | 结算卡持卡人证件有效期(起始) 日期格式:yyyyMMdd| VARCHAR(8) | Yes | | No |
+| cert\_end\_date | 结算卡持卡人证件有效期(截止) 日期格式:yyyyMMdd;非长期有效时必填| VARCHAR(8) | No | | No |
+| mp | 结算银行卡绑定手机号| VARCHAR(255) | No | | No |
+| apply\_no | 申请单号| VARCHAR(30) | No | | No |
+| audit\_state | 审核状态,状态包括:A-审核中;B-配置成功;C-配置失败| VARCHAR(50) | No | | No |
+| audit\_desc | 审核结果描述| VARCHAR(200) | No | | No |
+| error\_info | 错误描述| VARCHAR(500) | No | | No |
+| created | | INT | Yes | NULL | No |
+| updated | 更新时间| INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_user\_id | user\_id | No |
+| idx\_card\_no | card\_no | No |
+| idx\_company\_id | company\_id | No |
+| idx\_huifu\_id | huifu\_id | No |
+
+
+## bspay\_user\_ent
+
+> **企业用户对象**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| req\_seq\_id | 请求流水号| VARCHAR(64) | No | | No |
+| sys\_id | 商户的huifu\_id| VARCHAR(255) | Yes | | No |
+| huifu\_id | 汇付ID| VARCHAR(255) | No | | No |
+| company\_id | 公司id| BIGINT | No | NULL | No |
+| is\_update | 是否审核成功后修改 1:是 0:否| INT | Yes | 0 | No |
+| reg\_name | 企业名称| VARCHAR(255) | Yes | | No |
+| license\_code | 营业执照编号| VARCHAR(32) | Yes | | No |
+| license\_validity\_type | 营业执照有效期类型 1:长期有效 0:非长期有效;| INT | No | 0 | No |
+| license\_begin\_date | 营业执照有效期起始日期 日期格式:yyyyMMdd| VARCHAR(8) | Yes | | No |
+| license\_end\_date | 营业执照有效期结束日期 日期格式:yyyyMMdd;非长期有效时必填| VARCHAR(8) | No | | No |
+| reg\_prov\_id | 注册地址(省)| VARCHAR(12) | No | | No |
+| reg\_area\_id | 注册地址(市)| VARCHAR(12) | Yes | | No |
+| reg\_district\_id | 注册地址(区)| VARCHAR(12) | Yes | | No |
+| reg\_detail | 注册地址(详细信息)| VARCHAR(300) | Yes | | No |
+| legal\_name | 法人姓名| VARCHAR(500) | Yes | | No |
+| legal\_cert\_no | 法人身份证号码| VARCHAR(255) | Yes | | No |
+| legal\_cert\_validity\_type | 法人身份证有效期类型 1:长期有效 0:非长期有效;| INT | No | 0 | No |
+| legal\_cert\_begin\_date | 法人身份证有效期开始日期| VARCHAR(8) | Yes | | No |
+| legal\_cert\_end\_date | 法人身份证有效期截止日期 日期格式:yyyyMMdd;非长期有效时必填| VARCHAR(8) | No | | No |
+| contact\_name | 联系人姓名| VARCHAR(500) | Yes | | No |
+| contact\_mobile | 联系人手机| VARCHAR(255) | Yes | | No |
+| ent\_type | 公司类型 1:政府机构 2:国营企业 3:私营企业 4:外资企业 5:个体工商户 6:其它组织 7:事业单位 8:集体经济| INT | Yes | 1 | No |
+| audit\_state | 审核状态,状态包括:A-待审核;B-审核失败;C-开户失败;D-开户成功但未创建结算账户;E-开户和创建结算账户成功| VARCHAR(50) | No | | No |
+| audit\_desc | 审核结果描述| VARCHAR(200) | No | | No |
+| error\_info | 错误描述| VARCHAR(500) | No | | No |
+| created | | INT | Yes | NULL | No |
+| updated | 更新时间| INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_req\_seq\_id | req\_seq\_id | No |
+| idx\_company\_id | company\_id | No |
+| idx\_sys\_id | sys\_id | No |
+| idx\_huifu\_id | huifu\_id | No |
+| idx\_audit\_state | audit\_state | No |
+
+
+## bspay\_user\_indv
+
+> **个人用户**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| req\_seq\_id | 请求流水号| VARCHAR(64) | No | | No |
+| sys\_id | 商户的huifu\_id| VARCHAR(255) | No | | No |
+| huifu\_id | 汇付ID| VARCHAR(255) | No | | No |
+| company\_id | 公司id| BIGINT | No | NULL | No |
+| is\_update | 是否审核成功后修改 1:是 0:否| INT | Yes | 0 | No |
+| name | 个人姓名| VARCHAR(500) | Yes | | No |
+| cert\_no | 个人身份证号码| VARCHAR(255) | Yes | | No |
+| cert\_validity\_type | 个人身份证有效期类型 1:长期有效 0:非长期有效;| INT | No | 0 | No |
+| cert\_begin\_date | 个人身份证有效期开始日期| VARCHAR(8) | Yes | | No |
+| cert\_end\_date | 个人身份证有效期截止日期 日期格式:yyyyMMdd;非长期有效时必填| VARCHAR(8) | No | | No |
+| mobile\_no | 手机号| VARCHAR(255) | Yes | | No |
+| audit\_state | 审核状态,状态包括:A-待审核;B-审核失败;C-开户失败;D-开户成功但未创建结算账户;E-开户和创建结算账户成功| VARCHAR(50) | No | A | No |
+| audit\_desc | 审核结果描述| VARCHAR(500) | No | | No |
+| error\_info | 错误描述| VARCHAR(500) | No | | No |
+| created | | INT | Yes | NULL | No |
+| updated | 更新时间| INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_company\_id | company\_id | No |
+| idx\_sys\_id | sys\_id | No |
+| idx\_huifu\_id | huifu\_id | No |
+| idx\_audit\_state | audit\_state | No |
+
+
+## bspay\_user\_update\_log
+
+> **用户进件修改log(审核成功后修改)**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | No | NULL | No |
+| sys\_id | sys\_id| VARCHAR(100) | Yes | | No |
+| huifu\_id | 汇付ID| VARCHAR(255) | No | | No |
+| user\_type | 进件类型| VARCHAR(20) | Yes | indv | No |
+| user\_id | 用户表的主键id| VARCHAR(255) | Yes | NULL | No |
+| data | 修改数据 json| LONGTEXT | Yes | NULL | No |
+| audit\_state | 审核状态,状态包括:A-待审核;B-审核失败;C-开户失败;D-开户成功但未创建结算账户;E-开户和创建结算账户成功| VARCHAR(50) | No | A | No |
+| audit\_desc | 审核结果描述| VARCHAR(500) | No | | No |
+| created | | INT | Yes | NULL | No |
+| updated | 更新时间| INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_company\_id | company\_id | No |
+| idx\_sys\_id | sys\_id | No |
+| idx\_user\_id | user\_id | No |
+| idx\_huifu\_id | huifu\_id | No |
+
+
+## business\_rep\_user
+
+> **业务员关联会员**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| relation\_id | 关系ID(自增主键)| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| business\_rep\_id | 业务员ID(外键,关联到业务员表)| VARCHAR(255) | Yes | NULL | No |
+| user\_id | 用户id| BIGINT | Yes | NULL | No |
+| assigned\_date | 指定日期(即业务员开始服务该用户的日期)| DATE | Yes | NULL | No |
+| description | 关系描述(可选,用于记录特殊说明)| LONGTEXT | No | NULL | No |
+| create\_time | | INT | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | relation\_id | Yes |
+| idx\_user\_id | user\_id | No |
+| user\_bussiness\_id | user\_id, business\_rep\_id | Yes |
+
+
+## business\_representative
+
+> **业务员**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| business\_rep\_id | | BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| user\_id | | BIGINT | Yes | NULL | No |
+| name | | VARCHAR(100) | Yes | NULL | No |
+| gender | | VARCHAR(6) | No | NULL | No |
+| age | | INT | No | NULL | No |
+| hire\_date | | DATE | Yes | NULL | No |
+| department\_id | | INT | No | NULL | No |
+| job\_title | | VARCHAR(50) | Yes | NULL | No |
+| sales\_performance | | NUMERIC(10, 2) | Yes | 0.00 | No |
+| customer\_relations\_score | | NUMERIC(5, 2) | Yes | 0.00 | No |
+| is\_active | | TINYINT(1) | Yes | 1 | No |
+| create\_time | | INT | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | business\_rep\_id | Yes |
+| idx\_user\_id | user\_id | No |
+| user\_bussiness\_id | user\_id, business\_rep\_id | Yes |
+
+
+## card\_package
+
+> **卡券包**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| package\_id | 卡券包ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| title | 标题| VARCHAR(10) | Yes | | No |
+| package\_describe | 描述| VARCHAR(20) | Yes | | No |
+| limit\_count | 卡券包限领次数| INT | Yes | NULL | No |
+| get\_num | 被领取数量| INT | Yes | 0 | No |
+| row\_status | 行数据是否有效| INT | Yes | 1 | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | package\_id | Yes |
+
+
+## card\_package\_items
+
+> **卡券包关联表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | 主键ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| package\_id | 卡券包ID| BIGINT | Yes | NULL | No |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| card\_id | 优惠券卡ID| BIGINT | Yes | NULL | No |
+| give\_num | 发送数量| BIGINT | Yes | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_companyid | company\_id | No |
+| idx\_packageid | package\_id | No |
+
+
+## card\_package\_receive
+
+> **卡券包领取记录表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| receive\_id | 主键ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| package\_id | 卡券包ID| BIGINT | Yes | NULL | No |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| user\_id | 用户id| BIGINT | Yes | NULL | No |
+| receive\_type | 领取类型,vip\_grade/grade/template vip等级/等级/卡券模版| VARCHAR(20) | Yes | NULL | No |
+| receive\_status | 1/2/3 领取中/领取成功/领取失败| INT | Yes | NULL | No |
+| front\_show | 前端弹框是否展示过| INT | Yes | NULL | No |
+| receive\_time | 领取时间| INT | Yes | NULL | No |
+| success\_count | 成功领取卡券数量| INT | Yes | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | receive\_id | Yes |
+| idx\_companyid | company\_id | No |
+| idx\_user\_id | user\_id | No |
+| idx\_front\_show | front\_show | No |
+
+
+## card\_package\_receive\_details
+
+> **卡券包领取记录详情表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | 主键ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| receive\_id | 用户领取表主键ID| BIGINT | Yes | NULL | No |
+| package\_id | 卡券包ID| BIGINT | Yes | NULL | No |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| user\_id | 用户id| BIGINT | Yes | NULL | No |
+| card\_id | 卡券ID| BIGINT | Yes | NULL | No |
+| message | 领取描述| VARCHAR(100) | Yes | NULL | No |
+| receive\_status | 1/2/3 领取中/领取成功/领取失败| INT | Yes | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_companyid | company\_id | No |
+| idx\_user\_id | user\_id | No |
+| idx\_receive\_id | receive\_id | No |
+
+
+## card\_package\_receive\_record
+
+> **等级卡券包领取记录表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | 主键ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| user\_id | 用户id| BIGINT | Yes | NULL | No |
+| grade\_id | 等级id| BIGINT | Yes | NULL | No |
+| trigger\_type | 领取类型,vip\_grade/grade vip等级/等级| VARCHAR(20) | Yes | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_companyid | company\_id | No |
+| idx\_user\_id | user\_id | No |
+
+
+## card\_package\_trigger
+
+> **卡券包触发关联表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | 主键ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| package\_id | 卡券包ID| BIGINT | Yes | NULL | No |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| trigger\_type | 触发类型| VARCHAR(15) | Yes | NULL | No |
+| association\_id | 关联ID| BIGINT | Yes | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_companyid | company\_id | No |
+| idx\_type | trigger\_type | No |
+
+
+## chinaumspay\_division
+
+> **银联商务支付分账流水**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| distributor\_id | 店铺ID| BIGINT | Yes | NULL | No |
+| total\_fee | 订单金额,以分为单位| VARCHAR(255) | Yes | NULL | No |
+| actual\_fee | 订单实际金额,以分为单位| VARCHAR(255) | Yes | NULL | No |
+| commission\_rate\_fee | 收单手续费金额,以分为单位| INT UNSIGNED | Yes | 0 | No |
+| division\_fee | 分账金额,以分为单位| INT UNSIGNED | Yes | 0 | No |
+| create\_time | 订单创建时间| INT | Yes | NULL | No |
+| update\_time | 订单更新时间| INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_company | company\_id | No |
+| idx\_distributor\_id | distributor\_id | No |
+
+
+## chinaumspay\_division\_detail
+
+> **银联商务支付分账流水明细**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| division\_id | 分账流水ID| BIGINT | Yes | NULL | No |
+| order\_id | 订单号| BIGINT | Yes | NULL | No |
+| distributor\_id | 店铺ID| BIGINT | Yes | NULL | No |
+| total\_fee | 订单金额,以分为单位| VARCHAR(255) | Yes | NULL | No |
+| actual\_fee | 订单实际金额,以分为单位| VARCHAR(255) | Yes | NULL | No |
+| commission\_rate | 收单手续费费率| DOUBLE PRECISION | Yes | NULL | No |
+| commission\_rate\_fee | 收单手续费金额,以分为单位| INT UNSIGNED | Yes | 0 | No |
+| division\_fee | 分账金额,以分为单位| INT UNSIGNED | Yes | 0 | No |
+| create\_time | 订单创建时间| INT | Yes | NULL | No |
+| update\_time | 订单更新时间| INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_company | company\_id | No |
+| idx\_division\_id | division\_id | No |
+
+
+## chinaumspay\_division\_error\_log
+
+> **银联商务支付分账错误日志**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| division\_id | 分账流水ID| BIGINT | Yes | NULL | No |
+| upload\_detail\_id | 上传明细ID| BIGINT | Yes | NULL | No |
+| type | 类型 division:分账;transfer:划付;| VARCHAR(50) | Yes | NULL | No |
+| distributor\_id | 店铺ID| BIGINT | Yes | NULL | No |
+| status | 错误状态 0:未处理、1:处理中、2:成功、3:部分成功、4:失败| VARCHAR(20) | No | NULL | No |
+| error\_desc | 错误描述| LONGTEXT | No | NULL | No |
+| is\_resubmit | 是否重新提交| TINYINT(1) | No | | No |
+| create\_time | 订单创建时间| INT | Yes | NULL | No |
+| update\_time | 订单更新时间| INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_company | company\_id | No |
+| idx\_division\_id | division\_id | No |
+| idx\_type | type | No |
+
+
+## chinaumspay\_division\_upload\_detail
+
+> **银联商务支付sftp上传明细**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| division\_id | 分账流水ID| BIGINT | Yes | NULL | No |
+| distributor\_id | 店铺ID| BIGINT | Yes | NULL | No |
+| file\_type | 文件类型 division:分账;transfer:划付;| VARCHAR(50) | Yes | NULL | No |
+| detail | 分账明细| VARCHAR(255) | Yes | NULL | No |
+| times | 上传次数| INT UNSIGNED | Yes | 0 | No |
+| backsucc\_fee | 回盘成功金额,以分为单位| INT UNSIGNED | Yes | 0 | No |
+| rate\_fee | 银联商务该笔指令收取的业务处理费,以分为单位| INT UNSIGNED | Yes | 0 | No |
+| back\_status | 回盘状态 0:未处理、1:处理中、2:成功、3:部分成功、4:失败| VARCHAR(255) | No | NULL | No |
+| back\_status\_msg | 回盘状态描述| VARCHAR(255) | No | NULL | No |
+| chinaumspay\_id | 银商内部ID| VARCHAR(255) | No | NULL | No |
+| create\_time | 订单创建时间| INT | Yes | NULL | No |
+| update\_time | 订单更新时间| INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_company | company\_id | No |
+| idx\_division\_id | division\_id | No |
+| idx\_distributor\_id | distributor\_id | No |
+
+
+## chinaumspay\_division\_upload\_log
+
+> **银联商务支付上传文件日志**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| file\_type | 文件类型 division:分账;transfer:划付;| VARCHAR(50) | Yes | NULL | No |
+| local\_file\_path | 本地文件路径| VARCHAR(50) | Yes | NULL | No |
+| remote\_file\_path | 远程文件路径| VARCHAR(50) | Yes | NULL | No |
+| file\_name | 文件名| VARCHAR(50) | Yes | NULL | No |
+| file\_content | 文件内容| LONGTEXT | Yes | NULL | No |
+| back\_status | 回盘状态 0:未回盘;1:已回盘;| VARCHAR(255) | No | NULL | No |
+| create\_time | 订单创建时间| INT | Yes | NULL | No |
+| update\_time | 订单更新时间| INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_company | company\_id | No |
+
+
+## community\_activity
+
+> **社区拼团活动表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| activity\_id | 活动id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司ID| BIGINT | Yes | NULL | No |
+| distributor\_id | 店铺id,为0时表示该活动为平台活动| INT | Yes | 0 | No |
+| chief\_id | 团长ID| BIGINT | Yes | NULL | No |
+| activity\_name | 活动名称| VARCHAR(255) | Yes | NULL | No |
+| activity\_pics | 活动图片| LONGTEXT | Yes | NULL | No |
+| activity\_desc | 活动简介| VARCHAR(255) | Yes | NULL | No |
+| activity\_intro | 活动详细介绍| LONGTEXT | Yes | NULL | No |
+| start\_time | 开始时间| INT | Yes | NULL | No |
+| end\_time | 结束时间| INT | Yes | NULL | No |
+| activity\_status | 活动状态 private私有 public公开 protected隐藏 success确认成团 fail成团失败| VARCHAR(255) | Yes | NULL | No |
+| delivery\_status | 发货状态。可选值有 DONE—已发货;PENDING—待发货;SUCCESS-已收货| VARCHAR(255) | Yes | PENDING | No |
+| delivery\_time | 发货时间| INT | No | NULL | No |
+| aftersales\_setting | 售后配置 ban禁止售后| VARCHAR(255) | Yes | ban | No |
+| created\_at | | INT | Yes | NULL | No |
+| updated\_at | | INT | No | NULL | No |
+| share\_image\_url | 分享图片| LONGTEXT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | activity\_id | Yes |
+| ix\_company\_id | company\_id | No |
+| ix\_chief\_id | chief\_id | No |
+| ix\_activity\_name | activity\_name | No |
+| ix\_start\_time | start\_time | No |
+| ix\_end\_time | end\_time | No |
+| ix\_activity\_status | activity\_status | No |
+
+
+## community\_activity\_item
+
+> **社区拼团活动商品表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| activity\_id | 活动ID| BIGINT | Yes | NULL | No |
+| goods\_id | 商品spu ID| BIGINT | Yes | NULL | No |
+| item\_id | 商品sku ID| BIGINT | Yes | NULL | No |
+| item\_name | 商品名称| VARCHAR(255) | Yes | NULL | No |
+| item\_spec\_desc | 商品规格描述| VARCHAR(255) | No | NULL | No |
+| item\_brief | 商品描述| VARCHAR(255) | No | NULL | No |
+| item\_pics | 商品图片| LONGTEXT | No | NULL | No |
+| price | 销售价,单位为‘分’| INT | Yes | NULL | No |
+| cost\_price | 成本价,单位为‘分’| INT | No | 0 | No |
+| market\_price | 原价,单位为‘分’| INT | Yes | NULL | No |
+| store | 库存数量| INT | Yes | NULL | No |
+| created\_at | | INT | Yes | NULL | No |
+| updated\_at | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| ix\_activity\_id | activity\_id | No |
+| ix\_item\_id | item\_id | No |
+
+
+## community\_activity\_ziti
+
+> **社区拼团活动自提表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| activity\_id | 活动ID| BIGINT | Yes | NULL | No |
+| ziti\_id | 自提ID| BIGINT | Yes | NULL | No |
+| condition\_num | 成团数量| INT | Yes | NULL | No |
+| remark | 备注| VARCHAR(255) | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| ix\_activity\_id | activity\_id | No |
+| ix\_ziti\_id | ziti\_id | No |
+
+
+## community\_cart
+
+> **社区团购购物车**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| cart\_id | 购物车ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| user\_id | 用户id| BIGINT | Yes | NULL | No |
+| chief\_id | 团长id| BIGINT | Yes | NULL | No |
+| activity\_id | 活动id| BIGINT | Yes | NULL | No |
+| item\_id | 商品id| BIGINT | Yes | NULL | No |
+| num | 商品数量| BIGINT | Yes | 1 | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | cart\_id | Yes |
+
+
+## community\_chief
+
+> **社区拼团团长表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| chief\_id | 团长id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司ID| BIGINT | Yes | NULL | No |
+| chief\_name | 团长名称| VARCHAR(255) | Yes | NULL | No |
+| chief\_avatar | 团长头像| VARCHAR(255) | Yes | NULL | No |
+| chief\_mobile | 团长手机号| VARCHAR(255) | Yes | NULL | No |
+| chief\_desc | 团长简介| VARCHAR(255) | Yes | NULL | No |
+| chief\_intro | 团长详细介绍| LONGTEXT | No | NULL | No |
+| province | 省| VARCHAR(255) | No | NULL | No |
+| city | 市| VARCHAR(255) | No | NULL | No |
+| area | 区| VARCHAR(255) | No | NULL | No |
+| regions\_id | 地区编号集合| JSON | No | NULL | No |
+| regions | 地区名称集合| JSON | No | NULL | No |
+| address | 具体地址| VARCHAR(500) | No | NULL | No |
+| lng | 地图纬度| VARCHAR(255) | No | NULL | No |
+| lat | 地图经度| VARCHAR(255) | No | NULL | No |
+| user\_id | 会员ID| BIGINT | No | 0 | No |
+| created\_at | | INT | Yes | NULL | No |
+| updated\_at | | INT | No | NULL | No |
+| alipay\_name | 团长提现的支付宝姓名| VARCHAR(255) | No | NULL | No |
+| alipay\_account | 团长提现的支付宝账号| VARCHAR(255) | No | NULL | No |
+| bank\_name | 银行名称| VARCHAR(255) | No | NULL | No |
+| bankcard\_no | 团长提现的银行卡号| VARCHAR(255) | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | chief\_id | Yes |
+| ix\_company\_id | company\_id | No |
+| ix\_chief\_mobile | chief\_mobile | No |
+| ix\_user\_id | user\_id | No |
+
+
+## community\_chief\_apply\_info
+
+> **社区拼团团长申请表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| apply\_id | 申请id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司ID| BIGINT | Yes | NULL | No |
+| distributor\_id | 店铺id,为0时表示平台的团长申请| INT | Yes | 0 | No |
+| user\_id | 会员ID| BIGINT | Yes | NULL | No |
+| chief\_name | 团长名称| VARCHAR(255) | Yes | NULL | No |
+| chief\_mobile | 团长手机号| VARCHAR(255) | Yes | NULL | No |
+| extra\_data | 附加信息| LONGTEXT | Yes | NULL | No |
+| approve\_status | 审批状态 0:未审批 1:同意 2:驳回| INT | Yes | 0 | No |
+| refuse\_reason | 拒绝原因| LONGTEXT | No | NULL | No |
+| created\_at | | INT | Yes | NULL | No |
+| updated\_at | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | apply\_id | Yes |
+| ix\_company\_id | company\_id | No |
+| ix\_chief\_mobile | chief\_mobile | No |
+| ix\_user\_id | user\_id | No |
+
+
+## community\_chief\_cash\_withdrawal
+
+> **团长提现表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | | BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| distributor\_id | 店铺id,为0时表示平台的团长申请| INT | Yes | 0 | No |
+| chief\_id | 团长ID| BIGINT | Yes | NULL | No |
+| account\_name | 提现账号姓名| VARCHAR(255) | No | NULL | No |
+| pay\_account | 提现账号 微信为openid 支付宝为支付宝账号 银行卡为银行卡号| VARCHAR(255) | Yes | NULL | No |
+| bank\_name | 银行名称| VARCHAR(255) | No | NULL | No |
+| mobile | 手机号| VARCHAR(255) | Yes | NULL | No |
+| money | 提现金额,以分为单位| INT UNSIGNED | Yes | 0 | No |
+| status | 提现状态:apply->待处理 reject->拒绝 success->提现成功 process->处理中 failed->提现失败| VARCHAR(255) | Yes | NULL | No |
+| remarks | 备注| VARCHAR(255) | No | NULL | No |
+| pay\_type | 提现支付类型| VARCHAR(255) | Yes | NULL | No |
+| wxa\_appid | 提现的小程序appid| VARCHAR(255) | Yes | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+
+
+## community\_chief\_distributor
+
+> **社区拼团团长关联店铺表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| chief\_id | 团长ID| BIGINT | Yes | NULL | No |
+| distributor\_id | 店铺ID| BIGINT | Yes | NULL | No |
+| bound\_time | 绑定时间| BIGINT | No | 0 | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| ix\_chief\_id | chief\_id | No |
+| ix\_distributor\_id | distributor\_id | No |
+
+
+## community\_chief\_ziti
+
+> **社区拼团团长自提点管理表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| ziti\_id | 自提点id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| chief\_id | 团长ID| BIGINT | Yes | NULL | No |
+| ziti\_name | 自提点名称| VARCHAR(255) | Yes | NULL | No |
+| province | 省| VARCHAR(255) | No | NULL | No |
+| city | 市| VARCHAR(255) | No | NULL | No |
+| area | 区| VARCHAR(255) | No | NULL | No |
+| regions\_id | 地区编号集合| JSON | No | NULL | No |
+| regions | 地区名称集合| JSON | No | NULL | No |
+| address | 具体地址| VARCHAR(500) | No | NULL | No |
+| lng | 地图纬度| VARCHAR(255) | No | NULL | No |
+| lat | 地图经度| VARCHAR(255) | No | NULL | No |
+| ziti\_contact\_user | 自提点联系人| VARCHAR(255) | No | NULL | No |
+| ziti\_contact\_mobile | 自提点联系电话| VARCHAR(255) | No | NULL | No |
+| ziti\_pics | 自提点图片| VARCHAR(255) | No | NULL | No |
+| is\_default | 是否默认| TINYINT(1) | No | | No |
+| ziti\_status | 自提点状态 success正常 fail作废| VARCHAR(255) | No | success | No |
+| created\_at | | INT | Yes | NULL | No |
+| updated\_at | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | ziti\_id | Yes |
+| ix\_chief\_id | chief\_id | No |
+| ix\_is\_default | is\_default | No |
+| ix\_ziti\_status | ziti\_status | No |
+
+
+## community\_items
+
+> **社区拼团商品池**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| goods\_id | 商品ID| BIGINT | Yes | NULL | No |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| distributor\_id | 店铺id,为0时表示该商品为商城商品,否则为店铺自有商品| INT | Yes | 0 | No |
+| min\_delivery\_num | 起送量| INT | Yes | 0 | No |
+| sort | 商品排序| INT | Yes | 0 | No |
+| created\_at | | INT | Yes | NULL | No |
+| updated\_at | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | goods\_id | Yes |
+| ix\_goods\_id | goods\_id | No |
+
+
+## community\_order\_rel\_activity
+
+> **社区团购购物车**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| order\_id | 订单号| BIGINT | Yes | NULL | No |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| chief\_id | 团长id| BIGINT | Yes | NULL | No |
+| chief\_name | 团长名称| VARCHAR(255) | Yes | NULL | No |
+| chief\_avatar | 团长头像| VARCHAR(255) | Yes | NULL | No |
+| activity\_id | 活动id| BIGINT | Yes | NULL | No |
+| activity\_name | 活动名称| VARCHAR(255) | Yes | NULL | No |
+| ziti\_name | 自提点名称| VARCHAR(255) | No | NULL | No |
+| ziti\_address | 具体地址| VARCHAR(500) | No | NULL | No |
+| lng | 地图纬度| VARCHAR(255) | No | NULL | No |
+| lat | 地图经度| VARCHAR(255) | No | NULL | No |
+| ziti\_contact\_user | 自提点联系人| VARCHAR(255) | No | NULL | No |
+| ziti\_contact\_mobile | 自提点联系电话| VARCHAR(255) | No | NULL | No |
+| activity\_trade\_no | 跟团号| INT | No | NULL | No |
+| extra\_data | 附加信息| LONGTEXT | No | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+| rebate\_ratio | 佣金比例| VARCHAR(20) | Yes | 0 | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | order\_id | Yes |
+
+
+## company\_rel\_dada
+
+> **商城关联达达同城配表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| source\_id | 商户编号| VARCHAR(255) | No | NULL | No |
+| enterprise\_name | 企业全称| VARCHAR(255) | No | NULL | No |
+| enterprise\_address | 企业地址| VARCHAR(255) | No | NULL | No |
+| mobile | 商户手机号| VARCHAR(255) | No | NULL | No |
+| city\_name | 商户城市名称| VARCHAR(255) | No | NULL | No |
+| contact\_name | 联系人姓名| VARCHAR(255) | No | NULL | No |
+| contact\_phone | 联系人电话| VARCHAR(255) | No | NULL | No |
+| email | 邮箱地址| VARCHAR(255) | No | NULL | No |
+| freight\_type | 运费承担方:0:商家承担,1:买家承担| TINYINT(1) | Yes | 0 | No |
+| status | 开通状态:0:未开通过,1:已开通过| TINYINT(1) | Yes | 0 | No |
+| is\_open | 是否开启:0:未开启,1:已开启| TINYINT(1) | Yes | 0 | No |
+| created | 创建时间| INT | No | NULL | No |
+| updated | 更新时间| INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_company\_id | company\_id | No |
+
+
+## company\_rel\_delivery
+
+> **商城关联配送配置表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| type | 配送类型【1 商家自配-按整单计算】【2 商家自配-按距离计算】| TINYINT(1) | Yes | NULL | No |
+| status | 状态【1 启用】【0 禁用】| TINYINT(1) | Yes | NULL | No |
+| rules | json存储,运费规则| LONGTEXT | Yes | NULL | No |
+| other\_params | json存储,其他参数| LONGTEXT | Yes | NULL | No |
+| created | 创建时间| INT | No | NULL | No |
+| updated | 更新时间| INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_company\_id | company\_id | No |
+
+
+## company\_rel\_kuaizhen
+
+> **商城关联580快诊配置**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| client\_id | client\_id 580提供| VARCHAR(255) | Yes | NULL | No |
+| client\_secret | client\_secret 580提供| VARCHAR(255) | Yes | NULL | No |
+| online | 是否上线:0:未开启,1:已开启| TINYINT(1) | Yes | 0 | No |
+| is\_open | 是否开启:0:未开启,1:已开启| TINYINT(1) | Yes | 0 | No |
+| kuaizhen\_store\_id | kuaizhen580门店ID| BIGINT | Yes | 0 | No |
+| created | 创建时间| INT | No | NULL | No |
+| updated | 更新时间| INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_company\_id | company\_id | No |
+
+
+## company\_rel\_logistics
+
+> **商城物流启用表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | | INT AUTO_INCREMENT | Yes | NULL | Yes |
+| corp\_id | 物流公司ID| SMALLINT | Yes | NULL | No |
+| company\_id | 公司ID| SMALLINT | Yes | NULL | No |
+| corp\_code | 物流公司代码| VARCHAR(255) | Yes | NULL | No |
+| kuaidi\_code | 快递100代码| VARCHAR(255) | Yes | NULL | No |
+| corp\_name | 物流公司简称| VARCHAR(255) | Yes | NULL | No |
+| distributor\_id | 分销商id| BIGINT UNSIGNED | Yes | 0 | No |
+| supplier\_id | 供应商id| BIGINT UNSIGNED | Yes | 0 | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+
+
+## company\_rel\_shansong
+
+> **商城关联闪送应用配置信息表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| shop\_id | 商户ID| VARCHAR(255) | Yes | NULL | No |
+| client\_id | App-key| VARCHAR(255) | Yes | NULL | No |
+| app\_secret | App-密钥| VARCHAR(255) | Yes | NULL | No |
+| online | 是否上线:0:未开启,1:已开启| TINYINT(1) | Yes | 0 | No |
+| freight\_type | 运费承担方:0:商家承担,1:买家承担| TINYINT(1) | Yes | 0 | No |
+| is\_open | 是否开启:0:未开启,1:已开启| TINYINT(1) | Yes | 0 | No |
+| created | 创建时间| INT | No | NULL | No |
+| updated | 更新时间| INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_company\_id | company\_id | No |
+
+
+## companys
+
+> **公司表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| company\_id | 公司id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_name | 公司名称| VARCHAR(255) | No | NULL | No |
+| pc\_domain | PC域名| VARCHAR(200) | No | NULL | No |
+| h5\_domain | H5域名| VARCHAR(200) | No | NULL | No |
+| eid | | VARCHAR(255) | No | NULL | No |
+| passport\_uid | | VARCHAR(255) | No | NULL | No |
+| company\_admin\_operator\_id | 公司管理员id| BIGINT | Yes | NULL | No |
+| industry | 所属行业| VARCHAR(255) | No | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+| expiredAt | 过期时间| BIGINT | No | NULL | No |
+| is\_disabled | 是否禁用| TINYINT(1) | Yes | 0 | No |
+| third\_params | 第三方特殊字段存储| JSON | No | NULL | No |
+| salesman\_limit | 导购员数量| INT | Yes | 20 | No |
+| is\_open\_pc\_template | 是否开启pc模板 1 开启 2不开启| INT | No | 1 | No |
+| is\_open\_domain\_setting | 是否开启域名配置 1 开启 2不开启| INT | No | 2 | No |
+| menu\_type | 菜单类型。2:'b2c',3:'platform',4:'standard',5:'in\_purchase'| INT | Yes | 3 | No |
+| deleted\_at | | DATETIME | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | company\_id | Yes |
+| idx\_pc\_domain | pc\_domain | No |
+| idx\_h5\_domain | h5\_domain | No |
+| idx\_passportuid | passport\_uid | Yes |
+
+
+## companys\_article
+
+> **文章表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| article\_id | 文章id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| title | 标题| VARCHAR(255) | Yes | NULL | No |
+| summary | 摘要| VARCHAR(255) | No | NULL | No |
+| content | 文章详细内容| LONGTEXT | Yes | NULL | No |
+| sort | 文章排序| INT | No | NULL | No |
+| image\_url | 文章封面| LONGTEXT | No | NULL | No |
+| share\_image\_url | 分享图片| LONGTEXT | No | NULL | No |
+| release\_time | 文章发布时间| INT | No | NULL | No |
+| release\_status | 文章发布状态| TINYINT(1) | Yes | 1 | No |
+| author | 作者| VARCHAR(255) | No | NULL | No |
+| operator\_id | 作者id| BIGINT | No | NULL | No |
+| head\_portrait | 作者头像| LONGTEXT | No | NULL | No |
+| distributor\_id | 分销商id| BIGINT | Yes | 0 | No |
+| article\_type | 文章类型,general:普通文章; bring:带货文章| VARCHAR(255) | No | general | No |
+| category\_id | 文章类目id| BIGINT | No | NULL | No |
+| province | 省| VARCHAR(255) | No | NULL | No |
+| city | 市| VARCHAR(255) | No | NULL | No |
+| area | 区| VARCHAR(255) | No | NULL | No |
+| regions\_id | 地区编号集合| JSON | No | NULL | No |
+| regions | 地区名称集合| JSON | No | NULL | No |
+| is\_ai | 是否AI生成,0表示人工创建,1表示AI生成| TINYINT(1) | Yes | | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | article\_id | Yes |
+
+
+## companys\_article\_category
+
+> **文章类目表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| category\_id | 文章类目id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司ID| BIGINT | Yes | NULL | No |
+| category\_name | 类目名称| VARCHAR(50) | Yes | NULL | No |
+| parent\_id | 父级id, 0为顶级| BIGINT | Yes | 0 | No |
+| category\_level | 类目等级| INT | No | 1 | No |
+| path | 路径| VARCHAR(255) | No | 0 | No |
+| sort | 排序| BIGINT | No | 0 | No |
+| category\_type | 文章栏目类型,general:普通; bring:带货| VARCHAR(255) | No | bring | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | category\_id | Yes |
+
+
+## companys\_currency\_exchange\_rate
+
+> **货币汇率**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | 公司id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| title | 货币描述| VARCHAR(255) | No | NULL | No |
+| currency | 货币英文缩写| VARCHAR(255) | No | NULL | No |
+| symbol | 货币符号| VARCHAR(255) | Yes | NULL | No |
+| rate | 货币汇率(与人民币)| DOUBLE PRECISION | Yes | NULL | No |
+| is\_default | 是否默认货币| TINYINT(1) | Yes | 0 | No |
+| use\_platform | 适用端。可选值为 service,normal| VARCHAR(255) | Yes | normal | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+
+
+## companys\_employee\_rel\_roles
+
+> **员工绑定角色表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| role\_id | 角色id| VARCHAR(32) | Yes | NULL | No |
+| operator\_id | 员工id| VARCHAR(32) | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | company\_id, role\_id, operator\_id | Yes |
+| idx\_company\_id | company\_id | No |
+
+
+## companys\_operator\_cart
+
+> **导购员购物车**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| cart\_id | 购物车ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 企业id| BIGINT | Yes | NULL | No |
+| distributor\_id | 店铺id| BIGINT | Yes | 0 | No |
+| operator\_id | 管理员id| BIGINT | Yes | NULL | No |
+| item\_id | 商品id| BIGINT | Yes | NULL | No |
+| num | 商品数量| BIGINT | Yes | 1 | No |
+| is\_checked | 购物车是否选中| TINYINT(1) | Yes | 1 | No |
+| special\_type | 商品特殊类型 drug 处方药 normal 普通商品| VARCHAR(255) | Yes | normal | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | cart\_id | Yes |
+| idx\_item\_id | item\_id | No |
+| idx\_operator\_id | operator\_id | No |
+| idx\_company\_id | company\_id | No |
+
+
+## companys\_operator\_logs
+
+> **商家操作日志表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| log\_id | | BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | 0 | No |
+| operator\_id | 操作者id| INT | Yes | 0 | No |
+| request\_uri | 请求资源信息| VARCHAR(255) | No | NULL | No |
+| ip | ip地址| VARCHAR(255) | No | NULL | No |
+| params | 请求参数| JSON | No | NULL | No |
+| operator\_name | 操作内容| VARCHAR(255) | No | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+| log\_type | 操作日志类型| VARCHAR(255) | No | operator | No |
+| merchant\_id | 商户id| BIGINT | Yes | 0 | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | log\_id | Yes |
+
+
+## companys\_operator\_pending\_order
+
+> **导购挂单**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| pending\_id | 挂单ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 企业id| BIGINT | Yes | NULL | No |
+| distributor\_id | 店铺id| BIGINT | Yes | 0 | No |
+| operator\_id | 管理员id| BIGINT | Yes | NULL | No |
+| user\_id | 用户id| BIGINT | Yes | 0 | No |
+| pending\_type | 挂起类型 cart:收银台 order:订单| VARCHAR(255) | Yes | cart | No |
+| pending\_data | 暂存数据| LONGTEXT | Yes | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | pending\_id | Yes |
+| idx\_operator\_id | operator\_id | No |
+| idx\_company\_id | company\_id | No |
+
+
+## companys\_profit
+
+> **分润记录表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| order\_id | 订单号| VARCHAR(64) | No | NULL | No |
+| profit\_user\_id | 分润类型id| BIGINT | Yes | NULL | No |
+| profit\_user\_type | 1 用户 2 店铺 3 区域经销商 4 总部| BIGINT | Yes | NULL | No |
+| total\_fee | 分润金额,以分为单位| BIGINT | No | NULL | No |
+| frozen\_fee | 冻结金额,以分为单位| BIGINT | No | NULL | No |
+| withdrawals\_fee | 可以提现金额,以分为单位| BIGINT | No | NULL | No |
+| cashed\_fee | 已提现金额,以分为单位| BIGINT | No | NULL | No |
+| commissions | 拉新提成(导购|门店)| BIGINT | No | NULL | No |
+| popularize\_commissions | 推广提成(导购)| BIGINT | No | NULL | No |
+| goods\_amount | 货款(发货门店|总部)| BIGINT | No | NULL | No |
+| subsidy | 补贴(经销商)| BIGINT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+
+
+## companys\_profit\_log
+
+> **分润记录表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| order\_id | 订单号| VARCHAR(64) | No | NULL | No |
+| profit\_user\_id | 分润类型id| BIGINT | Yes | NULL | No |
+| profit\_user\_type | 1 导购 2 店铺 3 区域经销商 4 总部| BIGINT | Yes | NULL | No |
+| profit\_type | 1 拉新分润 2 推广提成 3 货款 4 补贴| BIGINT | Yes | NULL | No |
+| status | 资金状态 1 取消退款 2 售后退款 3 提现扣减 11 购物冻结 12 购物可体现| BIGINT | Yes | NULL | No |
+| income\_fee | 增加金额| BIGINT | No | NULL | No |
+| outcome\_fee | 扣减金额| BIGINT | No | NULL | No |
+| remark | 资金状态| VARCHAR(60) | Yes | NULL | No |
+| params | 冗余参数 例如 order\_id| JSON | No | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+
+
+## companys\_profit\_statistics
+
+> **分润记录表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| date | 分润月份| VARCHAR(20) | Yes | NULL | No |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| profit\_user\_id | 分润类型id| BIGINT | Yes | NULL | No |
+| profit\_user\_type | 1 用户 2 店铺 3 区域经销商 4 总部| BIGINT | Yes | NULL | No |
+| withdrawals\_fee | 提现金额,以分为单位| BIGINT | No | 0 | No |
+| name | 提现对象名称| VARCHAR(100) | No | | No |
+| params | 提现对象名称| JSON | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+
+
+## companys\_protocol\_update\_log
+
+> **协议更新日志表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| log\_id | 日志id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| type | 协议类型,privacy:隐私政策,member\_register:注册协议| VARCHAR(30) | Yes | NULL | No |
+| content | 协议详细内容| LONGTEXT | No | NULL | No |
+| digest | 摘要| VARCHAR(64) | Yes | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | log\_id | Yes |
+
+
+## companys\_regionauth
+
+> **地区权限**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| regionauth\_id | 地区id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| regionauth\_name | 地区名称| VARCHAR(50) | No | NULL | No |
+| state | 数据状态(1正常,-1删除)| INT | Yes | NULL | No |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | regionauth\_id | Yes |
+| ix\_regionauth\_id | regionauth\_id | No |
+| ix\_company\_id | company\_id | No |
+
+
+## companys\_roles
+
+> **员工角色表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| role\_id | 角色id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| distributor\_id | 店铺id。为0则代表是平台添加的店铺角色| BIGINT | Yes | 0 | No |
+| role\_name | 角色名称| VARCHAR(32) | Yes | NULL | No |
+| role\_source | 角色平台来源,platform: 平台角色,distributor:店铺管理角色| VARCHAR(32) | Yes | platform | No |
+| permission | 权限,json数据| LONGTEXT | Yes | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | role\_id | Yes |
+| idx\_company\_id | company\_id | No |
+
+
+## companys\_saleman\_customer\_complaints
+
+> **导购客诉表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | 主键id| INT AUTO_INCREMENT | Yes | NULL | Yes |
+| user\_id | 会员id| INT | Yes | NULL | No |
+| company\_id | | INT | Yes | NULL | No |
+| user\_name | 会员名| VARCHAR(255) | Yes | NULL | No |
+| user\_mobile | 会员手机号| VARCHAR(255) | Yes | NULL | No |
+| saleman\_id | 导购员id| INT | Yes | NULL | No |
+| saleman\_name | 导购员名| VARCHAR(255) | Yes | NULL | No |
+| saleman\_avatar | 导购员企业微信头像| VARCHAR(255) | No | NULL | No |
+| saleman\_mobile | 导购员手机号| VARCHAR(255) | Yes | NULL | No |
+| distributor\_id | 店铺id| BIGINT | Yes | 0 | No |
+| saleman\_distribution\_name | 导购员所在店铺名| VARCHAR(255) | Yes | | No |
+| complaints\_content | 投诉内容| VARCHAR(255) | Yes | NULL | No |
+| complaints\_images | 投诉图片| LONGTEXT | No | NULL | No |
+| reply\_status | 回复状态:0未回复;1已回复| TINYINT(1) | Yes | 0 | No |
+| reply\_content | 回复内容,json数组,内含操作员id,操作员手机号,操作员名称,回复时间,回复内容| LONGTEXT | No | NULL | No |
+| reply\_time | 回复时间| INT | No | 0 | No |
+| reply\_operator\_id | 回复操作员id| INT | No | 0 | No |
+| reply\_operator\_name | 回复操作员名称| VARCHAR(255) | No | | No |
+| reply\_operator\_mobile | 回复操作员手机号| VARCHAR(255) | No | | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+
+
+## companys\_saleperson\_cart
+
+> **导购员购物车**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| cart\_id | 购物车ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| salesperson\_id | 导购员id| BIGINT | Yes | NULL | No |
+| item\_id | 商品id| BIGINT | Yes | NULL | No |
+| package\_items | 关联商品id集合| VARCHAR(255) | Yes | | No |
+| num | 商品数量| BIGINT | Yes | 1 | No |
+| company\_id | 企业id| BIGINT | Yes | NULL | No |
+| is\_checked | 购物车是否选中| TINYINT(1) | Yes | 1 | No |
+| distributor\_id | 店铺id| BIGINT | Yes | 0 | No |
+| special\_type | 商品特殊类型 drug 处方药 normal 普通商品| VARCHAR(255) | Yes | normal | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | cart\_id | Yes |
+| idx\_item\_id | item\_id | No |
+| idx\_salesperson\_id | salesperson\_id | No |
+| idx\_company\_id | company\_id | No |
+| idx\_is\_checked | is\_checked | No |
+
+
+## companys\_sales\_promotions
+
+> **导购促销单**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| sales\_promotion\_id | 促销单ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| salesperson\_id | 导购员id| BIGINT | Yes | NULL | No |
+| unique\_key | 促销单唯一key| VARCHAR(255) | Yes | NULL | No |
+| promotion\_items | 促销单内容| LONGTEXT | Yes | NULL | No |
+| company\_id | 企业id| BIGINT | Yes | NULL | No |
+| distributor\_id | 店铺id| BIGINT | Yes | 0 | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | sales\_promotion\_id | Yes |
+| idx\_salesperson\_id | salesperson\_id | No |
+| idx\_company\_id | company\_id | No |
+| idx\_unique\_key | unique\_key | No |
+
+
+## companys\_salesperson\_statistics
+
+> **导购员销售额数据统计表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | 激活id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| salesperson\_id | 导购员id| BIGINT | Yes | NULL | No |
+| add\_date | 统计日期 Ymd| INT | Yes | NULL | No |
+| statistic\_title | 统计数据描述,order\_pay\_num:订单支付数量,order\_pay\_fee:订单支付金额,order\_pay\_user\_num:订单支付会员数,vip\_user:新增vip会员数,svip\_user:新增svip会员数,add\_user:注册会员数,new\_guest\_divided:拉新提成,sales\_commission:销售提成| VARCHAR(255) | Yes | NULL | No |
+| statistic\_type | 统计类型,normal:实体订单,service:服务订单,member:会员| VARCHAR(255) | Yes | NULL | No |
+| data\_value | 统计数据| INT | Yes | 0 | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| ix\_company\_id | company\_id | No |
+| ix\_statistic\_type | statistic\_type | No |
+| ix\_statistic\_title | statistic\_title | No |
+| ix\_add\_date | add\_date | No |
+| idx\_salespersonid\_adddate\_companyid\_statistictitle\_statistictype | salesperson\_id, add\_date, company\_id, statistic\_title, statistic\_type | No |
+
+
+## companys\_setting
+
+> **企业设置表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| community\_config | 社区相关设置| LONGTEXT | No | NULL | No |
+| withdraw\_bank | 提现支持银行类型| LONGTEXT | No | NULL | No |
+| consumer\_hotline | 客服电话| VARCHAR(255) | No | NULL | No |
+| customer\_switch | 客服开关| INT | Yes | 0 | No |
+| fapiao\_config | 发票相关设置| LONGTEXT | No | NULL | No |
+| fapiao\_switch | 发票开关| INT | Yes | 0 | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | company\_id | Yes |
+
+
+## companys\_statistics
+
+> **商城数据统计表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | 激活id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| add\_date | 统计日期 Ymd| INT | Yes | NULL | No |
+| statistic\_title | 统计数据描述,order\_pay\_num:订单支付数量,order\_pay\_fee:订单支付金额,order\_pay\_user\_num:订单支付会员数,vip\_user:新增vip会员数,svip\_user:新增svip会员数,add\_user:注册会员数| VARCHAR(255) | Yes | NULL | No |
+| statistic\_type | 统计类型,normal:实体订单,service:服务订单,member:会员| VARCHAR(255) | Yes | NULL | No |
+| data\_value | 统计数据| INT | Yes | 0 | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| ix\_add\_date | add\_date | No |
+| ix\_statistic\_type | statistic\_type | No |
+| ix\_statistic\_title | statistic\_title | No |
+| ix\_company\_id | company\_id | No |
+
+
+## companys\_store\_statistics
+
+> **商城数据统计表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | 激活id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| shop\_id | 店铺id| BIGINT | Yes | NULL | No |
+| add\_date | 统计日期 Ymd| INT | Yes | NULL | No |
+| statistic\_title | 统计数据描述,order\_pay\_num:订单支付数量,order\_pay\_fee:订单支付金额,order\_pay\_user\_num:订单支付会员数,vip\_user:新增vip会员数,svip\_user:新增svip会员数,add\_user:注册会员数| VARCHAR(255) | Yes | NULL | No |
+| statistic\_type | 统计类型,normal:实体订单,service:服务订单,member:会员| VARCHAR(255) | Yes | NULL | No |
+| data\_value | 统计数据| INT | Yes | 0 | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| ix\_company\_id | company\_id | No |
+| ix\_statistic\_type | statistic\_type | No |
+| ix\_statistic\_title | statistic\_title | No |
+| ix\_add\_date | add\_date | No |
+| ix\_shop\_id | shop\_id | No |
+
+
+## config\_request\_fields
+
+> **配置信息, 配置传递的请求字段**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | 主键id| INT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| INT | Yes | NULL | No |
+| distributor\_id | 店铺id,为0时表示该配置为平台创建| INT | Yes | 0 | No |
+| module\_type | 模块类型, 【1: 会员注册】【2: 团长申请】| SMALLINT | Yes | NULL | No |
+| label | 该请求字段的标识, 比如是mobile则表示为手机号| VARCHAR(50) | Yes | NULL | No |
+| key\_name | 前后端交互时需要被传递的key名,如果是手机号则是mobile| VARCHAR(50) | Yes | NULL | No |
+| is\_open | 是否启用, 【0 关闭】【1 开启】| TINYINT(1) | Yes | NULL | No |
+| is\_required | 是否必填, 【0 非必填】 【1 必填】| TINYINT(1) | Yes | NULL | No |
+| is\_preset | 是否是预设字段, 【0 非必填】 【1 必填】| TINYINT(1) | Yes | NULL | No |
+| is\_edit | 是否可修改, 【0 不可修改】 【1 可修改】| TINYINT(1) | Yes | NULL | No |
+| field\_type | 当前请求字段的类型, [1 文本] [2 数字] [3 日期] [4 单选项]| SMALLINT | Yes | NULL | No |
+| validate\_condition | 验证条件, json存储| LONGTEXT | Yes | NULL | No |
+| alert\_required\_message | 提示必填时的文案| VARCHAR(255) | Yes | NULL | No |
+| alert\_validate\_message | 提示验证时时的文案| VARCHAR(255) | Yes | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| ix\_company\_module\_open | company\_id, module\_type, is\_open | No |
+
+
+## coupon\_give\_error\_log
+
+> **优惠券赠送失败记录表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| give\_log\_id | 优惠券赠送失败记录id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| give\_id | 优惠券赠送失败记录id| BIGINT | Yes | NULL | No |
+| uid | 赠送用户id| BIGINT | Yes | NULL | No |
+| company\_id | 商户id| BIGINT | Yes | NULL | No |
+| card\_id | 赠送优惠券id| BIGINT | Yes | NULL | No |
+| note | 失败原因记录| VARCHAR(255) | Yes | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | give\_log\_id | Yes |
+| idx\_companyid | company\_id | No |
+| idx\_giveid | give\_id | No |
+
+
+## coupon\_give\_log
+
+> **优惠券赠送表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| give\_log\_id | 优惠券赠送失败记录id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 商户id| BIGINT | Yes | NULL | No |
+| distributor\_id | 分销商id| BIGINT UNSIGNED | Yes | 0 | No |
+| sender | 发送者| VARCHAR(255) | Yes | NULL | No |
+| number | 赠送数量| BIGINT | Yes | NULL | No |
+| error | 失败数量| BIGINT | Yes | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | give\_log\_id | Yes |
+
+
+## crossborder\_identity
+
+> **跨境-身份证信息**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | 设置id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| user\_id | 用户id| BIGINT | Yes | NULL | No |
+| identity\_id | 身份证| VARCHAR(18) | Yes | NULL | No |
+| identity\_name | 身份证姓名| VARCHAR(20) | Yes | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| ix\_id | id | No |
+| ix\_company\_id | company\_id | No |
+| ix\_user\_id | user\_id | No |
+
+
+## crossborder\_origincountry
+
+> **跨境-产地国表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| origincountry\_id | 产地国id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| state | 数据状态(1正常,-1删除)| INT | Yes | NULL | No |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| origincountry\_name | 产地国名称| VARCHAR(255) | No | NULL | No |
+| origincountry\_img\_url | 产地国国旗| VARCHAR(255) | No | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | origincountry\_id | Yes |
+| ix\_origincountry\_id | origincountry\_id | No |
+| ix\_company\_id | company\_id | No |
+
+
+## crossborder\_set
+
+> **跨境-设置**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | 设置id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| tax\_rate | 税率| VARCHAR(10) | Yes | NULL | No |
+| quota\_tip | 额度提醒| TEXT | No | NULL | No |
+| logistics | 跨境物流| VARCHAR(10) | Yes | NULL | No |
+| crossborder\_show | 跨境显示,0不显示,1显示| INT | Yes | 0 | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| ix\_id | id | No |
+| ix\_company\_id | company\_id | No |
+
+
+## crossborder\_taxstrategy
+
+> **跨境-税费策略**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | 设置id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| taxstrategy\_name | 规则名称| VARCHAR(255) | No | NULL | No |
+| taxstrategy\_content | 策略内容| LONGTEXT | No | NULL | No |
+| state | 数据状态(1正常,-1删除)| INT | Yes | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| ix\_id | id | No |
+| ix\_company\_id | company\_id | No |
+
+
+## custom\_declare\_order\_result
+
+> **订单附加信息提交信息接口请求结果表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| order\_id | 订单号| BIGINT | Yes | NULL | No |
+| trade\_id | 交易单号| VARCHAR(64) | Yes | NULL | No |
+| state | 状态码| VARCHAR(255) | Yes | NULL | No |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| transaction\_id | 微信支付返回的订单号| VARCHAR(28) | Yes | NULL | No |
+| sub\_order\_no | 子订单号| VARCHAR(64) | No | NULL | No |
+| sub\_order\_id | 微信子订单号| VARCHAR(64) | No | NULL | No |
+| modify\_time | 最后更新时间| VARCHAR(14) | Yes | NULL | No |
+| cert\_check\_result | 订购人和支付人身份信息校验结果| VARCHAR(256) | Yes | NULL | No |
+| verify\_department | 验证机构| VARCHAR(16) | Yes | NULL | No |
+| verify\_department\_trade\_id | 验核机构交易流水号| VARCHAR(64) | Yes | NULL | No |
+| create\_time | 请求时间| INT | Yes | NULL | No |
+| update\_time | 更新时间| INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | order\_id | Yes |
+
+
+## customs\_data
+
+> **接收海关支付数据请求表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| order\_id | 订单号| BIGINT | Yes | NULL | No |
+| session\_id | 海关发起请求时,平台接收的会话ID| VARCHAR(255) | Yes | NULL | No |
+| service\_time | 调用时的系统时间| BIGINT | Yes | NULL | No |
+| status | 是否上报 0否 1是| TINYINT(1) | Yes | 0 | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | order\_id | Yes |
+
+
+## datacube\_company\_data
+
+> **商城数据统计表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| count\_date | 日期| DATE | Yes | NULL | No |
+| company\_id | 公司ID| BIGINT | Yes | NULL | No |
+| member\_count | 新增会员数| INT | Yes | 0 | No |
+| aftersales\_count | 新增售后单数| INT | Yes | 0 | No |
+| refunded\_count | 新增退款额| INT | Yes | 0 | No |
+| amount\_payed\_count | 新增交易额| BIGINT | Yes | 0 | No |
+| order\_count | 新增订单数| INT | Yes | 0 | No |
+| order\_payed\_count | 新增已付款订单数| INT | Yes | 0 | No |
+| gmv\_count | 新增gmv| BIGINT | Yes | 0 | No |
+| order\_class | 订单种类,可选值有 employee\_purchase:内购订单| VARCHAR(255) | No | NULL | No |
+| act\_id | 活动ID| BIGINT | Yes | 0 | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| ix\_date\_company\_act | count\_date, company\_id, act\_id | Yes |
+
+
+## datacube\_distributor\_data
+
+> **商城门店数据统计表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| count\_date | 日期| DATE | Yes | NULL | No |
+| company\_id | 公司ID| BIGINT | Yes | NULL | No |
+| distributor\_id | 经销商ID| BIGINT | Yes | NULL | No |
+| member\_count | 新增会员数| INT | Yes | 0 | No |
+| aftersales\_count | 新增售后单数| INT | Yes | 0 | No |
+| refunded\_count | 新增退款额| INT | Yes | 0 | No |
+| amount\_payed\_count | 新增交易额| BIGINT | Yes | 0 | No |
+| amount\_point\_payed\_count | 新增交易额(积分)| BIGINT | Yes | 0 | No |
+| order\_count | 新增订单数| INT | Yes | 0 | No |
+| order\_point\_count | 新增订单数(积分)| INT | Yes | 0 | No |
+| order\_payed\_count | 新增已付款订单数| INT | Yes | 0 | No |
+| order\_point\_payed\_count | 新增已付款订单数(积分)| INT | Yes | 0 | No |
+| gmv\_count | 新增gmv| BIGINT | Yes | 0 | No |
+| gmv\_point\_count | 新增gmv(积分)| BIGINT | Yes | 0 | No |
+| merchant\_id | 商户id| BIGINT | Yes | 0 | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| ix\_date\_distributor | count\_date, company\_id, distributor\_id | Yes |
+
+
+## datacube\_goods\_data
+
+> **商品数据统计表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| count\_date | 日期| DATE | Yes | NULL | No |
+| company\_id | 公司ID| BIGINT | Yes | NULL | No |
+| item\_id | 商品id| BIGINT | Yes | NULL | No |
+| sales\_count | 新增销量| INT | Yes | 0 | No |
+| fixed\_amount\_count | 新增成交额(优惠前)| BIGINT | Yes | 0 | No |
+| settle\_amount\_count | 新增成交额(实付价)| BIGINT | Yes | 0 | No |
+| merchant\_id | 商户id| BIGINT | Yes | 0 | No |
+| order\_class | 订单种类,可选值有 employee\_purchase:内购订单| VARCHAR(255) | No | NULL | No |
+| act\_id | 活动ID| BIGINT | Yes | 0 | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| ix\_date\_goods\_act | count\_date, company\_id, item\_id, act\_id | Yes |
+
+
+## datacube\_merchant\_data
+
+> **商户数据统计表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| count\_date | 日期| DATE | Yes | NULL | No |
+| company\_id | 公司ID| BIGINT | Yes | NULL | No |
+| member\_count | 新增会员数| INT | Yes | 0 | No |
+| aftersales\_count | 新增售后单数| INT | Yes | 0 | No |
+| refunded\_count | 新增退款额| INT | Yes | 0 | No |
+| amount\_payed\_count | 新增交易额| BIGINT | Yes | 0 | No |
+| amount\_point\_payed\_count | 新增交易额(积分)| BIGINT | Yes | 0 | No |
+| order\_count | 新增订单数| INT | Yes | 0 | No |
+| order\_point\_count | 新增订单数(积分)| INT | Yes | 0 | No |
+| order\_payed\_count | 新增已付款订单数| INT | Yes | 0 | No |
+| order\_point\_payed\_count | 新增已付款订单数(积分)| INT | Yes | 0 | No |
+| gmv\_count | 新增gmv| BIGINT | Yes | 0 | No |
+| gmv\_point\_count | 新增gmv(积分)| BIGINT | Yes | 0 | No |
+| merchant\_id | 商户id| BIGINT | Yes | 0 | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| ix\_date\_company | count\_date, company\_id, merchant\_id | Yes |
+
+
+## datacube\_monitors
+
+> **小程序页面监控**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| monitor\_id | 监控id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| wxappid | 小程序appid| VARCHAR(255) | Yes | NULL | No |
+| nick\_name | 小程序名称| VARCHAR(255) | Yes | NULL | No |
+| page\_name | 页面描述| VARCHAR(255) | Yes | NULL | No |
+| monitor\_path | 监控页面| VARCHAR(255) | Yes | NULL | No |
+| monitor\_path\_params | 监控页面的参数| VARCHAR(255) | No | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | monitor\_id | Yes |
+
+
+## datacube\_relsources
+
+> **小程序页面与来源关联表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| monitor\_id | 监控id| BIGINT | Yes | NULL | No |
+| source\_id | 来源id| BIGINT | Yes | NULL | No |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | monitor\_id, source\_id | Yes |
+
+
+## datacube\_statistics
+
+> **小程序页面与来源关联表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| monitor\_id | 监控id| BIGINT | Yes | NULL | No |
+| source\_id | 来源id| BIGINT | Yes | NULL | No |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| view\_num | 浏览人数| BIGINT | Yes | 0 | No |
+| entries\_num | 参与人数| BIGINT | Yes | 0 | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | monitor\_id, source\_id | Yes |
+
+
+## deposit\_recharge\_agreement
+
+> **充值协议表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| company\_id | 企业ID| VARCHAR(255) | Yes | NULL | No |
+| content | 协议内容| LONGTEXT | Yes | NULL | No |
+| create\_time | 创建时间| VARCHAR(255) | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | company\_id | Yes |
+
+
+## deposit\_recharge\_rule
+
+> **储值规则,充值固定金额送钱或送礼品**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | ID| INT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 企业ID| VARCHAR(255) | Yes | NULL | No |
+| money | 充值固定金额| VARCHAR(255) | Yes | NULL | No |
+| rule\_type | 充值规则类型| VARCHAR(255) | Yes | NULL | No |
+| rule\_data | 充值规则数据| VARCHAR(255) | Yes | NULL | No |
+| create\_time | 创建时间| VARCHAR(255) | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+
+
+## deposit\_trade
+
+> **预存款交易记录表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| deposit\_trade\_id | 储值流水号| VARCHAR(64) | Yes | NULL | No |
+| company\_id | 企业ID| VARCHAR(255) | Yes | NULL | No |
+| member\_card\_code | 充值会员卡号| VARCHAR(255) | Yes | NULL | No |
+| shop\_id | 门店ID| VARCHAR(255) | No | NULL | No |
+| shop\_name | 门店名称| VARCHAR(255) | No | NULL | No |
+| user\_id | 购买用户| VARCHAR(255) | Yes | NULL | No |
+| mobile | 购买用户手机号| VARCHAR(255) | Yes | NULL | No |
+| open\_id | 用户open\_id| VARCHAR(255) | No | NULL | No |
+| money | 充值金额/消费金额。 单位是分| VARCHAR(255) | Yes | NULL | No |
+| trade\_type | 交易类型充值或消费。consume:消费,recharge:充值| VARCHAR(16) | Yes | NULL | No |
+| trade\_status | 交易状态| VARCHAR(16) | Yes | NULL | No |
+| transaction\_id | 充值支付订单号| VARCHAR(255) | No | NULL | No |
+| recharge\_rule\_id | 充值满足活动规则ID| VARCHAR(255) | No | NULL | No |
+| bank\_type | 付款银行| VARCHAR(255) | No | NULL | No |
+| authorizer\_appid | 公众号的appid| VARCHAR(64) | No | NULL | No |
+| pay\_type | 充值支付方式| VARCHAR(64) | No | NULL | No |
+| wxa\_appid | 支付小程序的appid| VARCHAR(64) | No | NULL | No |
+| detail | 交易详情| VARCHAR(255) | Yes | NULL | No |
+| time\_start | 交易起始时间| VARCHAR(255) | Yes | NULL | No |
+| time\_expire | 交易结束时间| VARCHAR(255) | No | NULL | No |
+| fee\_type | 货币类型| VARCHAR(16) | Yes | CNY | No |
+| cur\_fee\_type | 系统配置货币类型| VARCHAR(5) | Yes | CNY | No |
+| cur\_fee\_rate | 系统配置货币汇率| DOUBLE PRECISION | Yes | 1 | No |
+| cur\_fee\_symbol | 系统配置货币符号| VARCHAR(255) | Yes | ¥ | No |
+| cur\_pay\_fee | 系统货币支付金额| VARCHAR(255) | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | deposit\_trade\_id | Yes |
+
+
+## distribution\_basic\_config
+
+> **分销商基础配置**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| company\_id | | BIGINT | Yes | NULL | No |
+| is\_buy | 是否可购买| TINYINT(1) | Yes | NULL | No |
+| limit\_rebate | 提现佣金限制,最少多少金额可提现| VARCHAR(255) | Yes | NULL | No |
+| limit\_time | 订单完成后多少天可提现| VARCHAR(255) | Yes | NULL | No |
+| return\_name | 退换货接收人| VARCHAR(255) | Yes | NULL | No |
+| return\_address | 退换货地址| VARCHAR(255) | Yes | NULL | No |
+| return\_phone | 退换货联系方式| VARCHAR(255) | Yes | NULL | No |
+| is\_income\_tax | 是否开启劳务所得税| VARCHAR(255) | Yes | NULL | No |
+| income\_tax\_params | 劳务所得税计算参数| VARCHAR(255) | No | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | company\_id | Yes |
+
+
+## distribution\_cash\_withdrawal
+
+> **分销商佣金提现记录表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | | BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | | BIGINT | Yes | NULL | No |
+| distributor\_id | 分销商id| VARCHAR(255) | Yes | NULL | No |
+| shop\_id | 门店id| BIGINT | No | 0 | No |
+| distributor\_name | 分销商真实姓名| VARCHAR(255) | Yes | NULL | No |
+| open\_id | 分销商open\_id| VARCHAR(255) | Yes | NULL | No |
+| user\_id | 会员ID| VARCHAR(255) | Yes | NULL | No |
+| distributor\_mobile | | VARCHAR(32) | Yes | NULL | No |
+| money | 提现金额,以分为单位| INT UNSIGNED | Yes | 0 | No |
+| status | 提现状态| VARCHAR(255) | Yes | NULL | No |
+| remarks | 备注| VARCHAR(255) | No | NULL | No |
+| wxa\_appid | 提现的小程序appid| VARCHAR(255) | Yes | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+
+
+## distribution\_distribute\_logs
+
+> **分销商佣金记录表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| distributor\_id | 分销商id| BIGINT | Yes | NULL | No |
+| distributor\_mobile | | VARCHAR(32) | Yes | NULL | No |
+| order\_id | 订单号| BIGINT | Yes | NULL | No |
+| item\_id | 商品id| BIGINT | Yes | NULL | No |
+| shop\_id | 门店id| BIGINT | No | 0 | No |
+| mobile | 分销商手机号| VARCHAR(32) | No | NULL | No |
+| item\_name | 商品名称| VARCHAR(255) | No | NULL | No |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| user\_id | 用户id| BIGINT | No | NULL | No |
+| pic | 商品图片| VARCHAR(255) | No | NULL | No |
+| num | 购买商品数量| INT UNSIGNED | Yes | NULL | No |
+| rebate | 单个分销金额,以分为单位| INT UNSIGNED | Yes | 0 | No |
+| total\_rebate | 总分销金额,以分为单位| INT UNSIGNED | Yes | 0 | No |
+| is\_close | 是否已结算| TINYINT(1) | Yes | | No |
+| plan\_close\_time | 计划结算时间| INT | Yes | NULL | No |
+| create\_time | 订单创建时间| INT | Yes | NULL | No |
+| update\_time | 订单更新时间| INT | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| rebatelog\_idx | order\_id, distributor\_id, item\_id | Yes |
+
+
+## distribution\_distributor
+
+> **店铺表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| distributor\_id | | BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| is\_distributor | 是否是主店铺| TINYINT(1) | Yes | 1 | No |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| mobile | 店铺手机号| VARCHAR(255) | Yes | NULL | No |
+| address | 店铺地址| VARCHAR(255) | No | NULL | No |
+| house\_number | 详细地址,门牌号| VARCHAR(255) | No | NULL | No |
+| name | 店铺名称| VARCHAR(255) | Yes | NULL | No |
+| auto\_sync\_goods | 自动同步总部商品| TINYINT(1) | Yes | | No |
+| logo | 店铺logo| VARCHAR(255) | No | NULL | No |
+| contract\_phone | 其他联系方式| VARCHAR(20) | Yes | 0 | No |
+| banner | 店铺banner| VARCHAR(255) | No | NULL | No |
+| contact | 联系人名称| VARCHAR(500) | No | NULL | No |
+| is\_valid | 店铺是否有效| VARCHAR(255) | Yes | true | No |
+| lng | 腾讯地图纬度| VARCHAR(255) | No | NULL | No |
+| lat | 腾讯地图经度| VARCHAR(255) | No | NULL | No |
+| province | | VARCHAR(255) | No | NULL | No |
+| city | | VARCHAR(255) | No | NULL | No |
+| hour | 营业时间| VARCHAR(150) | No | NULL | No |
+| area | | VARCHAR(255) | No | NULL | No |
+| regions\_id | 国家行政区划编码组合,逗号隔开| LONGTEXT | No | NULL | No |
+| is\_domestic | 是否是中国国内门店 1:国内(包含港澳台),2:非国内| SMALLINT | No | 1 | No |
+| is\_direct\_store | 是否为直营店 1:直营店,2:非直营店| SMALLINT | No | 1 | No |
+| child\_count | | INT | No | NULL | No |
+| shop\_id | 门店id| BIGINT | No | 0 | No |
+| is\_default | 门店id| INT | No | 0 | No |
+| is\_audit\_goods | 是否审核店铺商品| TINYINT(1) | No | | No |
+| is\_ziti | 是否支持自提| TINYINT(1) | No | | No |
+| is\_delivery | 是否支持配送| TINYINT(1) | No | 1 | No |
+| is\_self\_delivery | 是否支持自配送| TINYINT(1) | No | | No |
+| is\_open\_salesman | 是否开启业务员| TINYINT(1) | No | | No |
+| regions | 地区名称组合。json格式| LONGTEXT | No | NULL | No |
+| review\_status | 入驻审核状态,0未审核,1已审核| TINYINT(1) | No | | No |
+| source\_from | 店铺来源,1管理端添加,2小程序申请入驻,3外部开放接口添加| INT | No | 1 | No |
+| dealer\_id | 经销商ID| INT | No | 0 | No |
+| split\_ledger\_info | 分账信息| VARCHAR(255) | No | NULL | No |
+| bspay\_split\_ledger\_info | 斗拱分账信息| VARCHAR(255) | No | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | Yes | NULL | No |
+| shop\_code | 店铺号| VARCHAR(255) | No | NULL | No |
+| distributor\_self | 是否是总店配置| INT | No | 0 | No |
+| wechat\_work\_department\_id | 企业微信的部门ID| INT | No | 0 | No |
+| regionauth\_id | 区域id| BIGINT | Yes | 0 | No |
+| is\_open | 是否开启分账| VARCHAR(255) | Yes | false | No |
+| rate | 平台服务费率| INT UNSIGNED | No | NULL | No |
+| is\_dada | 是否开启同城配(不仅限于达达),0:未开启,1:已开启| TINYINT(1) | Yes | 0 | No |
+| business | 业务类型(食品小吃-1,饮料-2,鲜花绿植-3,文印票务-8,便利店-9,水果生鲜-13,同城电商-19, 医药-20,蛋糕-21,酒品-24,小商品市场-25,服装-26,汽修零配-27,数码家电-28,小龙虾-29,个人-50,火锅-51,个护美妆-53、母婴-55,家居家纺-57,手机-59,家装-61,其他-5)| SMALLINT | No | NULL | No |
+| dada\_shop\_create | 该门店在达达是否已创建,0:未创建,1:已创建| TINYINT(1) | Yes | 0 | No |
+| shansong\_shop\_create | 该门店在闪送是否已创建,0:未创建,1:已创建| TINYINT(1) | Yes | 0 | No |
+| shansong\_store\_id | 闪送店铺ID| BIGINT | No | NULL | No |
+| introduce | 店铺介绍| LONGTEXT | No | NULL | No |
+| merchant\_id | 商户id| BIGINT | Yes | 0 | No |
+| distribution\_type | 店铺类型:0:自营,1:加盟| SMALLINT | Yes | 0 | No |
+| is\_require\_subdistrict | 下单是否需要选择街道社区| TINYINT(1) | No | | No |
+| is\_require\_building | 下单是否需要填写楼栋门牌号| TINYINT(1) | No | | No |
+| delivery\_distance | 配送距离| INT | Yes | 0 | No |
+| offline\_aftersales | 本店订单到店售后| INT | Yes | 0 | No |
+| offline\_aftersales\_self | 退货到本店退货点| INT | Yes | 0 | No |
+| offline\_aftersales\_distributor\_id | 本店订单到其他店铺售后| VARCHAR(255) | No | NULL | No |
+| offline\_aftersales\_other | 其他店铺订单到本店售后| INT | Yes | 0 | No |
+| freight\_time | 自配送预计需要的时间(小时)| INT | No | 2 | No |
+| is\_refund\_freight | 退款退货可退运费 1是 0否| INT | No | 0 | No |
+| wdt\_shop\_no | 旺店通门店编号| VARCHAR(30) | No | NULL | No |
+| wdt\_shop\_id | 旺店通门店ID| BIGINT | Yes | 0 | No |
+| kuaizhen\_store\_id | kuaizhen580门店ID| BIGINT | Yes | 0 | No |
+| open\_divided | 是否开启店铺隔离| BIGINT | Yes | 0 | No |
+| jst\_shop\_id | 聚水潭店铺编号| BIGINT | Yes | 0 | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | distributor\_id | Yes |
+| ix\_is\_distributor | is\_distributor | No |
+| ix\_shop\_id | shop\_id | No |
+| ix\_company\_id\_shop\_code | company\_id, shop\_code | No |
+| ix\_is\_ziti | is\_ziti | No |
+| idx\_merchant\_id | merchant\_id | No |
+
+
+## distribution\_distributor\_geofence
+
+> **店铺围栏信息**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | 自增id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| distributor\_id | 店铺id| BIGINT | Yes | NULL | No |
+| config\_service\_local\_id | 地图配置的本地主键ID| BIGINT | Yes | NULL | No |
+| geofence\_id | 第三方服务的围栏ID| BIGINT | Yes | NULL | No |
+| geofence\_data | json数据,第三方服务的围栏信息| LONGTEXT | Yes | NULL | No |
+| status | 状态【1 启用】【0 禁用】| SMALLINT | Yes | 1 | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| ix\_company\_distributor\_service | company\_id, distributor\_id, config\_service\_local\_id, status | No |
+
+
+## distribution\_distributor\_items
+
+> **店铺导购员表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | | BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| distributor\_id | | BIGINT | Yes | NULL | No |
+| company\_id | | BIGINT | Yes | NULL | No |
+| item\_id | 商品ID| BIGINT | Yes | NULL | No |
+| default\_item\_id | 默认商品ID| BIGINT | Yes | 0 | No |
+| goods\_id | 商品集合ID| BIGINT | Yes | 0 | No |
+| is\_show | 是否为列表默认展示| TINYINT(1) | Yes | 1 | No |
+| shop\_id | 门店id| BIGINT | No | 0 | No |
+| store | 商品库存| BIGINT | No | 0 | No |
+| price | 商品价格| BIGINT | No | 0 | No |
+| is\_total\_store | 是否为总部库存| TINYINT(1) | No | 1 | No |
+| is\_can\_sale | 是否在本店可售| TINYINT(1) | No | 1 | No |
+| goods\_can\_sale | 商品是否可售,有一个sku可售,那么商品就可售| TINYINT(1) | No | 1 | No |
+| is\_self\_delivery | 是否开启自提配送| TINYINT(1) | No | | No |
+| is\_express\_delivery | 是否开启快递配送| TINYINT(1) | No | | No |
+| sales | 商品销量| BIGINT | Yes | 0 | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_defaultitemid\_companyid | default\_item\_id, company\_id | No |
+| idx\_companyid\_istotalstore\_goodscansale\_defaultitemid | company\_id, is\_total\_store, goods\_can\_sale, default\_item\_id | No |
+| distributor\_items | distributor\_id, item\_id | Yes |
+
+
+## distribution\_distributor\_sales\_count
+
+> **店铺销量表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | | BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| distributor\_id | 店铺id| BIGINT | Yes | NULL | No |
+| order\_item\_count | 已经关闭售后的订单的商品数量| BIGINT | Yes | 0 | No |
+| aftersales\_item\_count | 已经关闭售后的订单的商品数量| BIGINT | Yes | 0 | No |
+| year\_month\_time | 统计的年月时间| BIGINT | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| ix\_company\_id\_distributor\_id\_time | company\_id, distributor\_id, year\_month\_time | No |
+
+
+## distribution\_distributor\_salesman
+
+> **店铺导购员表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| salesman\_id | | BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| distributor\_id | 上线店铺ID| BIGINT | Yes | NULL | No |
+| company\_id | 企业ID| BIGINT | Yes | NULL | No |
+| mobile | 手机号| VARCHAR(32) | Yes | NULL | No |
+| salesman\_name | 姓名| VARCHAR(32) | Yes | NULL | No |
+| child\_count | 导购注册人员数量| INT | No | 0 | No |
+| user\_id | | VARCHAR(255) | No | NULL | No |
+| is\_valid | 是否有效| VARCHAR(255) | Yes | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | salesman\_id | Yes |
+
+
+## distribution\_distributor\_salesman\_role
+
+> **店铺权限表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| salesman\_role\_id | | BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 企业ID| INT | Yes | NULL | No |
+| role\_name | 导购员角色名称| VARCHAR(32) | Yes | NULL | No |
+| rule\_ids | 导购员角色类型| JSON | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | salesman\_role\_id | Yes |
+
+
+## distribution\_distributor\_user
+
+> **会员对应的导购员信息表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| distributor\_id | 店铺id| BIGINT | No | 0 | No |
+| shop\_id | 门店id| BIGINT | No | 0 | No |
+| user\_id | | BIGINT | Yes | NULL | No |
+| salesman\_id | 导购员ID| BIGINT | No | 0 | No |
+| company\_id | | BIGINT | Yes | NULL | No |
+| family | 分销商名称| LONGTEXT | No | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_company\_id | company\_id | No |
+| idx\_user\_id | user\_id | No |
+| idx\_distributor\_id | distributor\_id | No |
+
+
+## distribution\_distributor\_white\_list
+
+> **店铺表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | | BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| distributor\_id | 店铺id| BIGINT | Yes | 1 | No |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| mobile | 店铺手机号| VARCHAR(50) | Yes | NULL | No |
+| username | 名称| VARCHAR(255) | No | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| ix\_distributor\_id | distributor\_id | No |
+| ix\_mobile | mobile | No |
+
+
+## distribution\_pickup\_location
+
+> **店铺自提点**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | | BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| distributor\_id | 所属店铺id| BIGINT | Yes | NULL | No |
+| rel\_distributor\_id | 绑定店铺id| BIGINT | Yes | 0 | No |
+| name | 自提点名称| VARCHAR(255) | Yes | NULL | No |
+| lng | 纬度| VARCHAR(255) | No | NULL | No |
+| lat | 经度| VARCHAR(255) | No | NULL | No |
+| province | 省| VARCHAR(255) | No | NULL | No |
+| city | 市| VARCHAR(255) | No | NULL | No |
+| area | 区| VARCHAR(255) | No | NULL | No |
+| address | 地址| VARCHAR(255) | No | NULL | No |
+| contract\_phone | 联系电话| VARCHAR(20) | Yes | NULL | No |
+| hours | 营业时间| VARCHAR(255) | No | NULL | No |
+| workdays | 工作日:周一至周日->1-7,逗号分隔| VARCHAR(255) | No | , | No |
+| wait\_pickup\_days | 最长预约时间,天| VARCHAR(255) | No | 0 | No |
+| latest\_pickup\_time | 当前最晚提货时间| VARCHAR(255) | No | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| ix\_distributor\_id | distributor\_id | No |
+
+
+## distribution\_shopScreen\_advertisement
+
+> **广告表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | 广告id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| title | 标题| VARCHAR(255) | Yes | NULL | No |
+| thumb\_img | 缩略图| LONGTEXT | Yes | NULL | No |
+| sort | 排序| INT | No | NULL | No |
+| media\_url | (图片/视频)地址| LONGTEXT | Yes | NULL | No |
+| media\_type | 类型| VARCHAR(255) | Yes | image | No |
+| release\_time | 发布时间| INT | No | NULL | No |
+| release\_status | 发布状态| TINYINT(1) | Yes | | No |
+| operator\_id | 作者id| BIGINT | No | NULL | No |
+| distributor\_id | 分销商id| BIGINT | Yes | 0 | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+
+
+## distribution\_shopScreen\_slider
+
+> ****
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| slide\_id | 轮播id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | | BIGINT | Yes | NULL | No |
+| distributor\_id | 分销商id| BIGINT | Yes | 0 | No |
+| title | 标题| VARCHAR(255) | Yes | NULL | No |
+| sub\_title | 副标题| VARCHAR(255) | Yes | NULL | No |
+| style\_params | 风格参数| LONGTEXT | Yes | NULL | No |
+| desc\_status | 图片描述状态11| TINYINT(1) | Yes | | No |
+| image\_list | 轮播图列表| LONGTEXT | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | slide\_id | Yes |
+
+
+## distributor\_aftersales\_address
+
+> **店铺售后地址**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| address\_id | | BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| distributor\_id | 店铺id| BIGINT | Yes | NULL | No |
+| company\_id | 企业id| BIGINT | Yes | NULL | No |
+| province | 省| VARCHAR(255) | Yes | NULL | No |
+| city | 市| VARCHAR(255) | Yes | NULL | No |
+| area | 区/县| VARCHAR(255) | Yes | NULL | No |
+| regions\_id | | LONGTEXT | Yes | NULL | No |
+| regions | | LONGTEXT | Yes | NULL | No |
+| address | 地址| VARCHAR(255) | Yes | NULL | No |
+| lng | 纬度| VARCHAR(255) | No | NULL | No |
+| lat | 经度| VARCHAR(255) | No | NULL | No |
+| contact | 联系人| VARCHAR(500) | No | NULL | No |
+| mobile | 联系人手机号| VARCHAR(255) | Yes | NULL | No |
+| post\_code | 邮政编码| INT | No | NULL | No |
+| is\_default | 默认地址, 1:是。2:不是| INT | Yes | 2 | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | Yes | NULL | No |
+| merchant\_id | 商户id| BIGINT | Yes | 0 | No |
+| name | 退货点名称| VARCHAR(255) | No | NULL | No |
+| hours | 营业时间| VARCHAR(50) | No | NULL | No |
+| return\_type | 退货方式:logistics寄回 offline到店退| VARCHAR(20) | Yes | logistics | No |
+| supplier\_id | 供应商id| INT | Yes | 0 | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | address\_id | Yes |
+
+
+## distributor\_rel\_tags
+
+> **店铺关联标签表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| tag\_id | 标签id| BIGINT | Yes | NULL | No |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| distributor\_id | 店铺id| BIGINT | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | tag\_id, company\_id, distributor\_id | Yes |
+
+
+## distributor\_tags
+
+> **店铺标签库表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| tag\_id | 标签id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| tag\_name | 标签名称| VARCHAR(50) | Yes | NULL | No |
+| tag\_color | 标签颜色| VARCHAR(50) | Yes | NULL | No |
+| font\_color | 字体颜色| VARCHAR(50) | Yes | NULL | No |
+| description | 标签描述| VARCHAR(255) | No | NULL | No |
+| tag\_icon | 标签icon| LONGTEXT | No | NULL | No |
+| front\_show | 前台是否显示 0 否 1 是| SMALLINT | No | 0 | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | tag\_id | Yes |
+
+
+## distributor\_wechat\_rel
+
+> **店务端微信关联表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | 微信用户关联表自增id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| app\_id | 微信app\_id| VARCHAR(255) | No | | No |
+| app\_type | 类型:wx[公众号],wxa[小程序]| VARCHAR(255) | Yes | wx | No |
+| openid | 微信openid| VARCHAR(255) | No | | No |
+| unionid | 微信unionid| VARCHAR(255) | Yes | | No |
+| operator\_id | 系统账户id| BIGINT | No | 0 | No |
+| bound\_time | 绑定时间| BIGINT | No | 0 | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_company\_id | company\_id | No |
+| idx\_operator\_id | operator\_id | No |
+| ix\_company\_operator | company\_id, app\_type, operator\_id | Yes |
+| ix\_company\_wx\_user | company\_id, app\_id, openid | Yes |
+
+
+## distributor\_work\_wechat\_rel
+
+> **店务端企业微信关联表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | 企业微信用户关联表id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| work\_userid | 微信id| VARCHAR(255) | No | | No |
+| operator\_id | 系统账户id| BIGINT | No | 0 | No |
+| bound\_time | 绑定时间| BIGINT | No | 0 | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_company\_id | company\_id | No |
+| idx\_operator\_id | operator\_id | No |
+| idx\_work\_userid | work\_userid | No |
+| ix\_operator\_company | operator\_id, company\_id | Yes |
+| ix\_workuser\_company | work\_userid, company\_id | Yes |
+
+
+## employee\_purchase\_activities
+
+> **员工内购活动表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | 活动id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司ID| BIGINT | Yes | NULL | No |
+| distributor\_id | 店铺id,为0时表示商城的企业| INT | Yes | 0 | No |
+| operator\_id | 操作id| INT | Yes | 0 | No |
+| name | 活动名称| VARCHAR(50) | Yes | NULL | No |
+| title | 活动标题| VARCHAR(50) | Yes | NULL | No |
+| pages\_template\_id | 活动首页模版id| BIGINT | Yes | NULL | No |
+| pic | 活动图片| VARCHAR(255) | Yes | NULL | No |
+| share\_pic | 活动分享图片| VARCHAR(255) | Yes | NULL | No |
+| enterprise\_id | 参与企业ID| LONGTEXT | Yes | NULL | No |
+| display\_time | 活动展示(预热)时间| INT | Yes | NULL | No |
+| employee\_begin\_time | 员工开始购买时间| INT | Yes | NULL | No |
+| employee\_end\_time | 员工结束购买时间| INT | Yes | NULL | No |
+| employee\_limitfee | 员工额度,以分为单位| INT UNSIGNED | Yes | NULL | No |
+| if\_relative\_join | 亲友是否参与| TINYINT(1) | Yes | | No |
+| invite\_limit | 员工邀请亲友上限| INT | No | 0 | No |
+| relative\_begin\_time | 亲友开始购买时间| INT | No | NULL | No |
+| relative\_end\_time | 亲友结束购买时间| INT | No | NULL | No |
+| if\_share\_limitfee | 亲友是否共享员工额度| TINYINT(1) | No | | No |
+| relative\_limitfee | 家属额度,以分为单位| INT UNSIGNED | No | 0 | No |
+| minimum\_amount | 起定金额,以分为单位| INT UNSIGNED | Yes | 0 | No |
+| close\_modify\_hours\_after\_activity | 活动后数小时关闭修改| INT | Yes | 0 | No |
+| status | 状态 active:有效的 cancel:取消 pending:暂停 over:结束| VARCHAR(255) | Yes | active | No |
+| if\_share\_store | 是否共享库存| TINYINT(1) | Yes | | No |
+| price\_display\_config | 价格展示配置| JSON | No | NULL | No |
+| is\_discount\_description\_enabled | 优惠说明开关| TINYINT(1) | Yes | | No |
+| discount\_description | 优惠说明| VARCHAR(50) | Yes | | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_company\_id | company\_id | No |
+| idx\_distributor\_id | distributor\_id | No |
+
+
+## employee\_purchase\_activity\_enterprises
+
+> **活动参与企业表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| activity\_id | 活动ID| BIGINT | Yes | NULL | No |
+| enterprise\_id | 企业ID| BIGINT | Yes | NULL | No |
+| company\_id | 公司ID| BIGINT | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | activity\_id, enterprise\_id | Yes |
+| idx\_company\_id | company\_id | No |
+| idx\_activity\_id | activity\_id | No |
+| idx\_enterprise\_id | enterprise\_id | No |
+
+
+## employee\_purchase\_activity\_goods
+
+> **员工内购商品表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| activity\_id | 活动ID| BIGINT | Yes | NULL | No |
+| goods\_id | 商品ID| BIGINT | Yes | NULL | No |
+| company\_id | 公司ID| BIGINT | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | activity\_id, goods\_id | Yes |
+| idx\_company\_id | company\_id | No |
+| idx\_activity\_id | activity\_id | No |
+| idx\_goods\_id | goods\_id | No |
+
+
+## employee\_purchase\_activity\_items
+
+> **员工内购商品表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| activity\_id | 活动ID| BIGINT | Yes | NULL | No |
+| item\_id | 商品ID| BIGINT | Yes | NULL | No |
+| goods\_id | 商品ID| BIGINT | Yes | NULL | No |
+| company\_id | 公司ID| BIGINT | Yes | NULL | No |
+| activity\_price | 活动价,单位为‘分’| INT | Yes | NULL | No |
+| activity\_store | 活动库存数量| INT | Yes | NULL | No |
+| limit\_fee | 每人限额,以分为单位| INT UNSIGNED | Yes | 0 | No |
+| limit\_num | 每人限购数量| INT | Yes | 0 | No |
+| sort | 排序| INT | Yes | 0 | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | activity\_id, item\_id | Yes |
+| idx\_company\_id | company\_id | No |
+| idx\_activity\_id | activity\_id | No |
+| idx\_item\_id | item\_id | No |
+
+
+## employee\_purchase\_cart
+
+> **员工内购活动购物车**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| cart\_id | 购物车ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 企业id| BIGINT | Yes | NULL | No |
+| enterprise\_id | 企业id| BIGINT | Yes | NULL | No |
+| activity\_id | 活动ID| BIGINT | Yes | NULL | No |
+| user\_id | 用户ID| BIGINT | Yes | NULL | No |
+| shop\_type | 店铺类型;distributor:店铺,shop:门店,community:社区, mall:商城, drug 药品清单| VARCHAR(255) | No | distributor | No |
+| shop\_id | 店铺id 或者 社区id| BIGINT UNSIGNED | No | 0 | No |
+| item\_id | 商品id| BIGINT | Yes | NULL | No |
+| num | 商品数量| BIGINT | Yes | 1 | No |
+| is\_checked | 购物车是否选中| TINYINT(1) | Yes | 1 | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | cart\_id | Yes |
+| idx\_enterprise\_activity\_item\_id | enterprise\_id, activity\_id, item\_id | No |
+| idx\_company\_id | company\_id | No |
+
+
+## employee\_purchase\_employees
+
+> **企业员工表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| distributor\_id | 店铺id,为0时表示为商城的员工| INT | Yes | 0 | No |
+| operator\_id | 操作id| INT | Yes | 0 | No |
+| name | 姓名| VARCHAR(500) | Yes | NULL | No |
+| mobile | 手机号| VARCHAR(255) | No | NULL | No |
+| account | 登录账号| VARCHAR(500) | No | NULL | No |
+| email | 邮箱| VARCHAR(500) | No | NULL | No |
+| auth\_code | 校验码| VARCHAR(50) | No | NULL | No |
+| enterprise\_id | 企业id| BIGINT | Yes | NULL | No |
+| user\_id | 会员id| BIGINT | No | NULL | No |
+| member\_mobile | 会员手机号| VARCHAR(255) | No | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | Yes | NULL | No |
+| disabled | 失效| TINYINT(1) | Yes | 0 | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_company\_id | company\_id | No |
+| idx\_distributor\_id | distributor\_id | No |
+| idx\_mobile | mobile | No |
+| idx\_enterprise\_userid | enterprise\_id, user\_id | No |
+
+
+## employee\_purchase\_enterprise\_email\_box
+
+> **企业发件邮箱**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| enterprise\_id | 企业白名单id| BIGINT | Yes | NULL | No |
+| smtp\_port | 端口号| VARCHAR(10) | Yes | NULL | No |
+| relay\_host | 服务器主机地址| VARCHAR(50) | Yes | NULL | No |
+| user | 服务器用户名| VARCHAR(50) | Yes | NULL | No |
+| password | 服务器密码| VARCHAR(50) | Yes | NULL | No |
+| suffix | 员工收件邮箱后缀| VARCHAR(50) | Yes | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_company\_id | company\_id | No |
+| idx\_enterprise\_id | enterprise\_id | No |
+
+
+## employee\_purchase\_enterprises
+
+> **企业表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| distributor\_id | 店铺id,为0时表示商城的企业| INT | Yes | 0 | No |
+| operator\_id | 操作id| INT | Yes | 0 | No |
+| name | 企业名称| VARCHAR(255) | Yes | NULL | No |
+| enterprise\_sn | 企业编码| VARCHAR(50) | Yes | NULL | No |
+| logo | 企业logo| LONGTEXT | No | NULL | No |
+| qr\_code\_bg\_image | 二维码背景图| LONGTEXT | No | NULL | No |
+| is\_employee\_check\_enabled | 是否验证员工白名单| TINYINT(1) | Yes | | No |
+| auth\_type | 登录类型,mobile:手机号,account:账号,email:邮箱,qr\_code:二维码| VARCHAR(20) | Yes | NULL | No |
+| disabled | 禁用| TINYINT(1) | Yes | 0 | No |
+| sort | 排序| INT | Yes | 0 | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_company\_id | company\_id | No |
+| idx\_distributor\_id | distributor\_id | No |
+| idx\_enterprise\_sn | enterprise\_sn | No |
+
+
+## employee\_purchase\_member\_activity\_aggregate
+
+> **内购活动会员累计使用额度**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | 活动id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司ID| BIGINT | Yes | NULL | No |
+| enterprise\_id | 企业id| BIGINT | Yes | NULL | No |
+| user\_id | 会员ID| BIGINT | Yes | NULL | No |
+| activity\_id | 活动ID| BIGINT | Yes | NULL | No |
+| aggregate\_fee | 累计使用额度,以分为单位| INT UNSIGNED | Yes | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_company\_id | company\_id | No |
+
+
+## employee\_purchase\_member\_activity\_items\_aggregate
+
+> **内购活动商品会员累计使用额度**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | 活动id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司ID| BIGINT | Yes | NULL | No |
+| enterprise\_id | 企业id| BIGINT | Yes | NULL | No |
+| user\_id | 会员ID| BIGINT | Yes | NULL | No |
+| activity\_id | 活动ID| BIGINT | Yes | NULL | No |
+| item\_id | 商品ID| BIGINT | Yes | NULL | No |
+| aggregate\_fee | 累计使用额度,以分为单位| INT UNSIGNED | Yes | NULL | No |
+| aggregate\_num | 累计购买数量| INT UNSIGNED | Yes | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_company\_id | company\_id | No |
+
+
+## employee\_purchase\_orders\_rel\_activity
+
+> **内购订单关联活动企业表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| order\_id | 购物车ID| BIGINT | Yes | NULL | No |
+| company\_id | 企业id| BIGINT | Yes | NULL | No |
+| enterprise\_id | 企业id| BIGINT | Yes | NULL | No |
+| activity\_id | 活动ID| BIGINT | Yes | NULL | No |
+| user\_id | 用户ID| BIGINT | Yes | NULL | No |
+| if\_share\_store | 是否共享库存| TINYINT(1) | Yes | | No |
+| close\_modify\_time | 订单关闭修改时间| INT | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | order\_id | Yes |
+| idx\_enterprise\_id | enterprise\_id | No |
+| idx\_activity\_id | activity\_id | No |
+| idx\_company\_id | company\_id | No |
+
+
+## employee\_purchase\_relatives
+
+> **企业员工家属表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| distributor\_id | 店铺id,为0时表示为商城的员工| INT | Yes | 0 | No |
+| enterprise\_id | 企业id| BIGINT | Yes | NULL | No |
+| user\_id | 会员id| BIGINT | Yes | NULL | No |
+| member\_mobile | 会员手机号| VARCHAR(255) | Yes | NULL | No |
+| activity\_id | 活动ID| BIGINT | Yes | NULL | No |
+| employee\_id | 员工id| BIGINT | Yes | NULL | No |
+| employee\_user\_id | 员工关联用户id| BIGINT | Yes | NULL | No |
+| created | | INT | Yes | NULL | No |
+| disabled | 失效| TINYINT(1) | Yes | 0 | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_company\_id | company\_id | No |
+| idx\_distributor\_id | distributor\_id | No |
+| employee\_user\_id | employee\_user\_id | No |
+| activity\_id | activity\_id | No |
+| user\_id | user\_id | No |
+| idx\_member\_mobile | member\_mobile | No |
+| idx\_enterprise\_userid\_actid | enterprise\_id, user\_id, activity\_id | No |
+
+
+## espier\_address
+
+> **地区表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | 地区id| BIGINT | Yes | NULL | No |
+| parent\_id | 父级id| BIGINT | Yes | NULL | No |
+| label | 地区名称| VARCHAR(255) | Yes | NULL | No |
+| path | 路径| VARCHAR(255) | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id, parent\_id | Yes |
+| ix\_parent\_id | parent\_id | No |
+| ix\_label | label | No |
+
+
+## espier\_export\_log
+
+> **导出日志表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| log\_id | 导出日志id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司company id| BIGINT | Yes | NULL | No |
+| file\_name | 导出文件名称| VARCHAR(255) | No | NULL | No |
+| file\_url | 导出文件下载路径| LONGTEXT | No | NULL | No |
+| export\_type | 导出类型 member:会员导出,order:订单导出,right:权益导出| VARCHAR(255) | Yes | NULL | No |
+| handle\_status | 处理文件状态,可选值有,wait:等待处理,finish:处理完成,processing:处理中,fail:失败| VARCHAR(255) | Yes | NULL | No |
+| error\_msg | 失败原因| LONGTEXT | No | NULL | No |
+| finish\_time | 处理完成时间| BIGINT | No | NULL | No |
+| distributor\_id | 分销商id| BIGINT UNSIGNED | Yes | 0 | No |
+| operator\_id | 账号id| BIGINT | Yes | 0 | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+| merchant\_id | 商户id| BIGINT | Yes | 0 | No |
+| supplier\_id | 供应商id| BIGINT | Yes | 0 | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | log\_id | Yes |
+
+
+## espier\_printer
+
+> **打印机表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | 公司id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| name | 打印机名称| VARCHAR(255) | Yes | NULL | No |
+| type | 打印机类型 yilianyun 易连云| VARCHAR(255) | Yes | NULL | No |
+| company\_id | 公司company id| BIGINT | Yes | NULL | No |
+| distributor\_id | 关联店铺| VARCHAR(255) | Yes | NULL | No |
+| app\_terminal | 打印机终端号| VARCHAR(255) | Yes | NULL | No |
+| app\_key | 打印机秘钥| VARCHAR(255) | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+
+
+## espier\_subdistrict
+
+> **街道社区表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司company id| BIGINT | Yes | NULL | No |
+| label | 地区名称| VARCHAR(255) | Yes | NULL | No |
+| parent\_id | 父级id| BIGINT | Yes | NULL | No |
+| distributor\_id | 所属店铺id列表| VARCHAR(255) | Yes | , | No |
+| province | | VARCHAR(255) | No | NULL | No |
+| city | | VARCHAR(255) | No | NULL | No |
+| area | | VARCHAR(255) | No | NULL | No |
+| regions\_id | 国家行政区划编码组合,逗号隔开| LONGTEXT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| ix\_parent\_id | parent\_id | No |
+| ix\_label | label | No |
+
+
+## espier\_uploadefile
+
+> **上传文件日志ID**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | 上传文件日志ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司company id| BIGINT | Yes | NULL | No |
+| operator\_id | 操作者id| BIGINT | No | 0 | No |
+| supplier\_id | 供应商id| BIGINT | Yes | 0 | No |
+| file\_name | 上传文件名称| VARCHAR(255) | Yes | NULL | No |
+| file\_type | 上传文件类型| VARCHAR(255) | Yes | NULL | No |
+| file\_size | 上传文件大小| VARCHAR(255) | Yes | NULL | No |
+| handle\_status | 处理文件状态,可选值有,wait:等待处理| VARCHAR(255) | Yes | NULL | No |
+| handle\_line\_num | 处理文件行数| VARCHAR(255) | Yes | NULL | No |
+| finish\_time | 处理完成时间| BIGINT | No | NULL | No |
+| handle\_message | 处理错误文件| LONGTEXT | No | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+| distributor\_id | distributor\_id| BIGINT | No | 0 | No |
+| left\_job\_num | 剩余子任务数| INT | Yes | 0 | No |
+| merchant\_id | 商户id| BIGINT | Yes | 0 | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+
+
+## espier\_uploadimages
+
+> **图片上传表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| image\_id | 图片id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司company id| BIGINT | Yes | NULL | No |
+| storage | 存储引擎,可选值有,image/videos| VARCHAR(50) | Yes | image | No |
+| image\_name | 图片名称| VARCHAR(255) | Yes | NULL | No |
+| brief | 图片简介| VARCHAR(255) | No | | No |
+| image\_cat\_id | 图片分类id| BIGINT | Yes | 0 | No |
+| image\_type | 图片类型,可选值有 item:商品;aftersales:售后| VARCHAR(50) | No | item | No |
+| image\_full\_url | 图片完成地址| VARCHAR(255) | No | NULL | No |
+| image\_url | 图片标识, 不包含域名| VARCHAR(255) | Yes | NULL | No |
+| disabled | 图片失效| TINYINT(1) | Yes | 0 | No |
+| distributor\_id | 店铺id| BIGINT | No | 0 | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+| supplier\_id | 供应商id| BIGINT | Yes | 0 | No |
+| merchant\_id | 商户id| BIGINT | Yes | 0 | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | image\_id | Yes |
+
+
+## espier\_uploadimages\_cat
+
+> **图片分类表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| image\_cat\_id | 图片分类id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司company id| BIGINT | Yes | NULL | No |
+| image\_cat\_name | 图片分类名称| VARCHAR(255) | Yes | NULL | No |
+| parent\_id | 父分类id,顶级为0| BIGINT | Yes | 0 | No |
+| image\_type | 图片类型,可选值有 item:商品;| VARCHAR(255) | No | NULL | No |
+| path | 路径| VARCHAR(255) | Yes | NULL | No |
+| sort | 排序| BIGINT | Yes | 0 | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+| supplier\_id | 供应商id| BIGINT | Yes | 0 | No |
+| distributor\_id | 店铺id| BIGINT | No | 0 | No |
+| merchant\_id | 商户id| BIGINT | Yes | 0 | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | image\_cat\_id | Yes |
+
+
+## goods\_items\_rel\_cats
+
+> **商品和分类关联表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| item\_id | 商品ID| BIGINT | Yes | NULL | No |
+| category\_id | 商品分类id| BIGINT | Yes | NULL | No |
+| company\_id | 公司ID| BIGINT | Yes | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | item\_id, category\_id | Yes |
+| ix\_company\_id | company\_id | No |
+| ix\_category\_id | category\_id | No |
+| ix\_created | created | No |
+
+
+## hfpay\_bank\_card
+
+> **汇付取现银行卡表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| hfpay\_bank\_card\_id | 汇付取现银行卡表id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司company id| BIGINT | Yes | NULL | No |
+| distributor\_id | 分销商id| BIGINT | No | NULL | No |
+| user\_id | 用户id| BIGINT | No | NULL | No |
+| user\_cust\_id | 用户客户号| VARCHAR(255) | No | NULL | No |
+| card\_type | 绑卡类型| VARCHAR(255) | No | NULL | No |
+| bank\_id | 银行代号| VARCHAR(255) | No | NULL | No |
+| bank\_name | 银行名称| VARCHAR(255) | No | NULL | No |
+| card\_num | 银行卡号| VARCHAR(255) | No | NULL | No |
+| bind\_card\_id | 汇付绑定id| VARCHAR(255) | No | NULL | No |
+| is\_cash | 是否取现卡| VARCHAR(255) | No | 1 | No |
+| created\_at | | DATETIME | Yes | NULL | No |
+| updated\_at | | DATETIME | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | hfpay\_bank\_card\_id | Yes |
+| idx\_company\_id | company\_id | No |
+| idx\_distributor\_id | distributor\_id | No |
+| idx\_user\_id | user\_id | No |
+
+
+## hfpay\_cash\_record
+
+> **汇付取现记录表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| hfpay\_cash\_record\_id | 汇付取现记录表id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司company id| BIGINT | Yes | NULL | No |
+| distributor\_id | 分销商id| BIGINT | No | 0 | No |
+| order\_id | 订单号| VARCHAR(255) | Yes | NULL | No |
+| user\_id | 用户id| BIGINT | No | 0 | No |
+| operator\_id | 操作人ID| BIGINT | No | 0 | No |
+| user\_cust\_id | 汇付商户客户号| VARCHAR(255) | No | NULL | No |
+| trans\_amt | 取现金额| INT | Yes | NULL | No |
+| cash\_type | 取现方式 T0:T0取现; T1:T1取现 D1:D1取现| VARCHAR(255) | Yes | NULL | No |
+| bind\_card\_id | 取现绑卡| VARCHAR(255) | No | NULL | No |
+| real\_trans\_amt | 实际到账金额| INT | No | NULL | No |
+| fee\_amt | 取现手续费| INT | No | NULL | No |
+| cash\_status | 取现状态 0 未提交 1已提交 2取现成功 3取现失败| INT | Yes | 0 | No |
+| resp\_code | 汇付接口返回码| VARCHAR(255) | No | NULL | No |
+| resp\_desc | 汇付接口返回码描述| VARCHAR(255) | No | NULL | No |
+| hf\_order\_id | 汇付接口请求order\_id| VARCHAR(255) | No | NULL | No |
+| hf\_order\_date | 汇付接口请求order\_date| VARCHAR(255) | No | NULL | No |
+| created\_at | | DATETIME | Yes | NULL | No |
+| updated\_at | | DATETIME | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | hfpay\_cash\_record\_id | Yes |
+| idx\_company\_id | company\_id | No |
+
+
+## hfpay\_company\_statistics\_day
+
+> **平台分账数据统计**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| hfpay\_company\_day\_id | 汇付平台分账数据统计| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | company\_id| INT | Yes | NULL | No |
+| type | type 1全部数据 2平台数据 3非平台数据| INT | Yes | NULL | No |
+| date | 日期| INT | Yes | NULL | No |
+| income | 总计收入| INT | No | NULL | No |
+| disburse | 总计支出| INT | No | NULL | No |
+| withdrawal | 总计提现| INT | No | NULL | No |
+| balance | 余额| INT | No | NULL | No |
+| withdrawal\_balance | 可提现余额| INT | No | NULL | No |
+| unsettled\_funds | 未结算资金| INT | No | NULL | No |
+| refund | 合计退款| INT | No | NULL | No |
+| settlement\_funds | 已结算资金| INT | No | NULL | No |
+| created\_at | | DATETIME | Yes | NULL | No |
+| updated\_at | | DATETIME | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | hfpay\_company\_day\_id | Yes |
+| idx\_company\_id | company\_id | No |
+
+
+## hfpay\_distributor\_statistics\_day
+
+> **店铺分账数据统计**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| hf\_distributor\_day\_id | 汇付店铺分账数据统计| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | company\_id| INT | Yes | NULL | No |
+| distributor\_id | 店铺id| INT | Yes | NULL | No |
+| date | 日期| INT | Yes | NULL | No |
+| income | 总计收入| INT | No | NULL | No |
+| disburse | 总计支出| INT | No | NULL | No |
+| withdrawal | 总计提现| INT | No | NULL | No |
+| balance | 余额| INT | No | NULL | No |
+| withdrawal\_balance | 可提现余额| INT | No | NULL | No |
+| unsettled\_funds | 未结算资金| INT | No | NULL | No |
+| refund | 合计退款| INT | No | NULL | No |
+| settlement\_funds | 已结算资金| INT | No | NULL | No |
+| created\_at | | DATETIME | Yes | NULL | No |
+| updated\_at | | DATETIME | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | hf\_distributor\_day\_id | Yes |
+| idx\_company\_id | company\_id | No |
+
+
+## hfpay\_distributor\_transaction\_statistics
+
+> **店铺交易统计统计**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | 店铺交易统计统计| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | company\_id| INT | Yes | NULL | No |
+| distributor\_id | 店铺id| INT | Yes | NULL | No |
+| date | 日期| INT | Yes | NULL | No |
+| order\_count | 交易总笔数| INT | Yes | 0 | No |
+| order\_total\_fee | 总计交易金额| INT | Yes | 0 | No |
+| order\_refund\_count | 已退款总笔数| INT | Yes | 0 | No |
+| order\_refund\_total\_fee | 退款总金额| INT | Yes | 0 | No |
+| order\_refunding\_count | 在退总笔数| INT | Yes | 0 | No |
+| order\_refunding\_total\_fee | 在退总金额| INT | Yes | 0 | No |
+| order\_profit\_sharing\_charge | 已结算手续费| INT | Yes | 0 | No |
+| order\_total\_charge | 总手续费| INT | Yes | 0 | No |
+| order\_refund\_total\_charge | 总退款手续费| INT | Yes | 0 | No |
+| order\_un\_profit\_sharing\_total\_charge | 未结算手续费(包含已退款)| INT | Yes | 0 | No |
+| order\_un\_profit\_sharing\_refund\_total\_charge | 未结算已退款手续费| INT | Yes | 0 | No |
+| created\_at | | DATETIME | Yes | NULL | No |
+| updated\_at | | DATETIME | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_company\_id\_distributor\_id | company\_id, distributor\_id | No |
+
+
+## hfpay\_enterapply
+
+> **入驻信息表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| hfpay\_enterapply\_id | 入驻信息表id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司company id| BIGINT | Yes | NULL | No |
+| distributor\_id | 分销商id| BIGINT | No | NULL | No |
+| user\_id | 用户id| BIGINT | No | NULL | No |
+| user\_cust\_id | 汇付客户号| VARCHAR(255) | No | NULL | No |
+| acct\_id | 汇付子账户| VARCHAR(255) | No | NULL | No |
+| apply\_type | 入驻类型| VARCHAR(1) | No | NULL | No |
+| corp\_license\_type | 企业证照类型| VARCHAR(1) | No | NULL | No |
+| corp\_name | 企业名称| VARCHAR(100) | No | NULL | No |
+| business\_code | 营业执照注册号| VARCHAR(100) | No | NULL | No |
+| institution\_code | 组织机构代码| VARCHAR(100) | No | NULL | No |
+| tax\_code | 税务登记证号| VARCHAR(100) | No | NULL | No |
+| social\_credit\_code | 统一社会信用代码| VARCHAR(100) | No | NULL | No |
+| license\_start\_date | 证照起始日期| VARCHAR(30) | No | NULL | No |
+| license\_end\_date | 证照结束日期| VARCHAR(30) | No | NULL | No |
+| controlling\_shareholder | 实际控股人| VARCHAR(255) | No | NULL | No |
+| legal\_name | 法人姓名| VARCHAR(60) | No | NULL | No |
+| legal\_id\_card\_type | 法人证件类型| VARCHAR(2) | No | NULL | No |
+| legal\_id\_card | 法人证件号码| VARCHAR(30) | No | NULL | No |
+| legal\_cert\_start\_date | 法人证件起始日期| VARCHAR(60) | No | NULL | No |
+| legal\_cert\_end\_date | 法人证件结束日期| VARCHAR(60) | No | NULL | No |
+| legal\_mobile | 法人手机号码| VARCHAR(20) | No | NULL | No |
+| contact\_name | 企业联系人姓名| VARCHAR(30) | No | NULL | No |
+| contact\_mobile | 企业联系人手机号| VARCHAR(20) | No | NULL | No |
+| contact\_email | 联系人邮箱| VARCHAR(30) | No | NULL | No |
+| bank\_acct\_name | 开户银行账户名| VARCHAR(30) | No | NULL | No |
+| bank\_id | 开户银行| VARCHAR(30) | No | NULL | No |
+| bank\_name | 开户银行名称| VARCHAR(30) | No | NULL | No |
+| bank\_acct\_num | 开户银行账号| VARCHAR(30) | No | NULL | No |
+| bank\_acct\_num\_imgz | 银行卡正面照| VARCHAR(255) | No | NULL | No |
+| bank\_acct\_num\_imgz\_local | 本地银行卡正面照| VARCHAR(255) | No | NULL | No |
+| bank\_acct\_num\_imgf | 法人银行卡反面照| VARCHAR(255) | No | NULL | No |
+| bank\_acct\_num\_imgf\_local | 本地银行卡反面照| VARCHAR(255) | No | NULL | No |
+| bank\_prov | 开户银行省份| VARCHAR(30) | No | NULL | No |
+| bank\_prov\_name | 开户银行省份名称| VARCHAR(30) | No | NULL | No |
+| bank\_area | 开户银行地区| VARCHAR(30) | No | NULL | No |
+| bank\_area\_name | 开户银行地区名称| VARCHAR(30) | No | NULL | No |
+| bank\_branch | 企业开户银行的支行名称| VARCHAR(30) | No | NULL | No |
+| solo\_name | 个体户名称| VARCHAR(30) | No | NULL | No |
+| solo\_business\_address | 个体户经营地址| VARCHAR(150) | No | NULL | No |
+| solo\_reg\_address | 个体户注册地址| VARCHAR(150) | No | NULL | No |
+| solo\_fixed\_telephone | 个体户固定电话| VARCHAR(30) | No | NULL | No |
+| business\_scope | 经营范围| VARCHAR(255) | No | NULL | No |
+| occupation | 职业| VARCHAR(80) | No | NULL | No |
+| contact\_cert\_num | 联系人证件号| VARCHAR(30) | No | NULL | No |
+| open\_license\_no | 开户许可证核准号| VARCHAR(60) | No | NULL | No |
+| user\_name | 用户姓名| VARCHAR(30) | No | NULL | No |
+| id\_card\_type | 证件类型| VARCHAR(2) | No | NULL | No |
+| id\_card | 身份证号| VARCHAR(30) | No | NULL | No |
+| user\_mobile | 手机号| VARCHAR(20) | No | NULL | No |
+| hf\_order\_id | 汇付订单号| VARCHAR(255) | No | NULL | No |
+| hf\_order\_date | 汇付订单日期| VARCHAR(255) | No | NULL | No |
+| hf\_apply\_id | 汇付开户申请号| VARCHAR(255) | No | NULL | No |
+| status | 状态| VARCHAR(255) | No | 1 | No |
+| business\_code\_img | 营业执照注册号图片| VARCHAR(255) | No | NULL | No |
+| business\_code\_img\_local | 本地营业执照注册号图片| VARCHAR(255) | No | NULL | No |
+| institution\_code\_img | 组织机构代码图片| VARCHAR(255) | No | NULL | No |
+| institution\_code\_img\_local | 本地组织机构代码图片| VARCHAR(255) | No | NULL | No |
+| tax\_code\_img | 税务登记证号图片| VARCHAR(255) | No | NULL | No |
+| tax\_code\_img\_local | 本地税务登记证号图片| VARCHAR(255) | No | NULL | No |
+| social\_credit\_code\_img | 统一社会信用代码图片| VARCHAR(255) | No | NULL | No |
+| social\_credit\_code\_img\_local | 本地统一社会信用代码图片| VARCHAR(255) | No | NULL | No |
+| legal\_card\_imgz | 法人身份证正面照| VARCHAR(255) | No | NULL | No |
+| legal\_card\_imgz\_local | 本地法人身份证正面照| VARCHAR(255) | No | NULL | No |
+| legal\_card\_imgf | 法人身份证反面照| VARCHAR(255) | No | NULL | No |
+| legal\_card\_imgf\_local | 本地法人身份证反面照| VARCHAR(255) | No | NULL | No |
+| bank\_acct\_img | 开户银行许可证图片| VARCHAR(255) | No | NULL | No |
+| bank\_acct\_img\_local | 本地开户银行许可证图片| VARCHAR(255) | No | NULL | No |
+| resp\_code | 汇付响应码| VARCHAR(255) | No | NULL | No |
+| resp\_desc | 汇付响应码描述| VARCHAR(255) | No | NULL | No |
+| created\_at | | DATETIME | Yes | NULL | No |
+| updated\_at | | DATETIME | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | hfpay\_enterapply\_id | Yes |
+| idx\_company\_id | company\_id | No |
+| idx\_distributor\_id | distributor\_id | No |
+| idx\_user\_id | user\_id | No |
+
+
+## hfpay\_ledger\_config
+
+> **分账配置表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| hfpay\_ledger\_config\_id | 分账配置表id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司company id| BIGINT | Yes | NULL | No |
+| is\_open | 是否开启分账| VARCHAR(255) | Yes | false | No |
+| business\_type | 分账业务模式| VARCHAR(255) | Yes | 1 | No |
+| agent\_number | 代理商商户号| VARCHAR(255) | No | NULL | No |
+| provider\_number | 服务商渠道号| VARCHAR(255) | No | NULL | No |
+| rate | 平台服务费率| INT UNSIGNED | Yes | NULL | No |
+| app\_id | 绑定的微信小程序appid| VARCHAR(255) | No | NULL | No |
+| created\_at | | DATETIME | Yes | NULL | No |
+| updated\_at | | DATETIME | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | hfpay\_ledger\_config\_id | Yes |
+| idx\_company\_id | company\_id | No |
+
+
+## hfpay\_merchant\_payment
+
+> **汇付平台转账记录表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| hfpay\_merchant\_payment\_id | 汇付取现银行卡表id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司company id| BIGINT | Yes | NULL | No |
+| rel\_scene\_id | 业务场景值id| BIGINT | Yes | NULL | No |
+| rel\_scene\_name | 业务场景值名称| VARCHAR(255) | Yes | NULL | No |
+| mer\_cust\_id | 汇付平台客户号| VARCHAR(255) | Yes | NULL | No |
+| user\_cust\_id | 汇付客户号| VARCHAR(255) | Yes | NULL | No |
+| acct\_id | 汇付账户号| VARCHAR(255) | Yes | NULL | No |
+| trans\_amt | 转账金额| BIGINT | Yes | NULL | No |
+| status | 状态 0 未提交 1转账成功 2转账失败| INT | Yes | 0 | No |
+| hf\_order\_id | 汇付接口请求order\_id| VARCHAR(255) | No | NULL | No |
+| hf\_order\_date | 汇付接口请求order\_date| VARCHAR(255) | No | NULL | No |
+| resp\_code | 汇付接口返回码| VARCHAR(255) | No | NULL | No |
+| resp\_desc | 汇付接口返回码描述| VARCHAR(255) | No | NULL | No |
+| created\_at | | DATETIME | Yes | NULL | No |
+| updated\_at | | DATETIME | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | hfpay\_merchant\_payment\_id | Yes |
+| idx\_company\_id | company\_id | No |
+| idx\_rel\_scene\_id\_rel\_scene\_name | rel\_scene\_id, rel\_scene\_name | No |
+
+
+## hfpay\_trade\_record
+
+> **汇付记账表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| hfpay\_trade\_record\_id | 汇付记账表| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | company\_id| INT | No | NULL | No |
+| distributor\_id | 店铺id| VARCHAR(255) | No | NULL | No |
+| trade\_id | 业务id| VARCHAR(255) | No | NULL | No |
+| outer\_order\_id | 订单id| VARCHAR(255) | No | NULL | No |
+| form\_user\_id | 用户| VARCHAR(255) | No | NULL | No |
+| target\_user\_id | 对象id| VARCHAR(255) | No | NULL | No |
+| trade\_time | 时间戳| VARCHAR(255) | No | NULL | No |
+| trade\_type | 交易类型| INT | No | NULL | No |
+| fin\_type | 财务科目| VARCHAR(255) | No | NULL | No |
+| income | 收入| INT | No | NULL | No |
+| outcome | 支出| INT | No | NULL | No |
+| is\_clean | 结算状态 0未结算 1已结算| INT | No | 0 | No |
+| clean\_time | 结算时间| INT | No | NULL | No |
+| message | 描述| VARCHAR(255) | No | NULL | No |
+| created\_at | | DATETIME | Yes | NULL | No |
+| updated\_at | | DATETIME | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | hfpay\_trade\_record\_id | Yes |
+| idx\_company\_id | company\_id | No |
+
+
+## icbc\_pay\_log
+
+> **工商银行接口日志**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 企业ID| BIGINT | Yes | NULL | No |
+| order\_id | 订单号| VARCHAR(64) | No | NULL | No |
+| unique\_key | 唯一ID| VARCHAR(64) | No | | No |
+| log\_type | 日志类型| VARCHAR(20) | No | NULL | No |
+| log\_data | 日志内容| LONGTEXT | No | NULL | No |
+| api\_res | 请求结果| LONGTEXT | No | NULL | No |
+| add\_time | 创建时间| DATETIME | No | NULL | No |
+| modify\_time | 更新时间| DATETIME | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_company\_id | company\_id | No |
+| idx\_order\_id | order\_id | No |
+| idx\_unique\_key | unique\_key | No |
+| idx\_add\_time | add\_time | No |
+
+
+## item\_keywords
+
+> **商品热门关键词表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| distributor\_id | 店铺id| BIGINT | Yes | 0 | No |
+| content | 内容| VARCHAR(255) | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| ix\_company\_id | company\_id | No |
+
+
+## items
+
+> **商品表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| item\_id | 商品ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| item\_type | 商品类型,services:服务商品,normal: 普通商品| VARCHAR(15) | Yes | services | No |
+| item\_category | 商品主类目| VARCHAR(15) | No | null | No |
+| consume\_type | 核销类型,every:每个物料都要核销(例如3个物料要核销3次),all:所有物料作为一个整体核销一次(例如3个物料只需要核销1次)| VARCHAR(15) | Yes | every | No |
+| item\_name | 商品名称| VARCHAR(255) | Yes | NULL | No |
+| item\_bn | 商品编号| VARCHAR(255) | Yes | NULL | No |
+| barcode | 商品条形码| LONGTEXT | Yes | NULL | No |
+| brief | 简洁的描述| VARCHAR(255) | Yes | NULL | No |
+| company\_id | 公司ID| BIGINT | Yes | NULL | No |
+| price | 销售价,单位为‘分’| INT | Yes | NULL | No |
+| cost\_price | 成本价,单位为‘分’| INT | No | 0 | No |
+| item\_unit | 商品计量单位| VARCHAR(255) | No | NULL | No |
+| special\_type | 商品特殊类型 drug 处方药 normal 普通商品| VARCHAR(255) | No | normal | No |
+| item\_address\_province | 产地省| VARCHAR(255) | No | NULL | No |
+| item\_address\_city | 产地市| VARCHAR(255) | No | NULL | No |
+| regions\_id | 产地地区id| VARCHAR(255) | No | NULL | No |
+| regions | 产地地区| LONGTEXT | No | NULL | No |
+| store | 库存| INT | No | NULL | No |
+| sales | 销量| INT | No | 0 | No |
+| rebate\_conf | 分销配置| JSON | No | NULL | No |
+| rebate | 推广商品 1已选择 0未选择 2申请加入 3拒绝| INT | No | NULL | No |
+| rebate\_type | 分佣计算方式| VARCHAR(255) | No | default | No |
+| approve\_status | 商品状态 onsale 前台可销售,offline\_sale前端不展示,instock 不可销售, only\_show 前台仅展示| VARCHAR(255) | Yes | NULL | No |
+| audit\_status | 审核状态 submitting待提交 approved成功 processing审核中 rejected审核拒绝| VARCHAR(255) | No | approved | No |
+| audit\_reason | 审核拒绝原因| LONGTEXT | No | NULL | No |
+| market\_price | 原价,单位为‘分’| INT | Yes | NULL | No |
+| goods\_function | 商品功能| VARCHAR(255) | No | NULL | No |
+| goods\_series | 商品系列| VARCHAR(255) | No | NULL | No |
+| goods\_color | 商品颜色| VARCHAR(255) | No | NULL | No |
+| goods\_brand | 商品品牌| VARCHAR(255) | No | NULL | No |
+| is\_default | 商品是否为默认商品| TINYINT(1) | No | 1 | No |
+| default\_item\_id | 默认商品ID| BIGINT | No | 0 | No |
+| goods\_id | 产品ID| BIGINT | No | 0 | No |
+| nospec | 商品是否为单规格| VARCHAR(255) | No | true | No |
+| weight | 商品重量| DOUBLE PRECISION | No | 0 | No |
+| sort | 商品排序| INT | Yes | 0 | No |
+| is\_epidemic | 是否为疫情需要登记的商品 1:是 0:否| INT | No | 0 | No |
+| templates\_id | 运费模板id| INT | No | NULL | No |
+| pics | 图片| JSON | Yes | NULL | No |
+| pics\_create\_qrcode | 图片是否生成小程序码| JSON | No | NULL | No |
+| video\_type | 视频类型 local:本地视频 tencent:腾讯视频| VARCHAR(255) | Yes | local | No |
+| videos | 视频| LONGTEXT | No | NULL | No |
+| video\_pic\_url | 视频封面图| LONGTEXT | No | NULL | No |
+| intro | 图文详情| LONGTEXT | No | NULL | No |
+| purchase\_agreement | 购买协议| LONGTEXT | No | NULL | No |
+| is\_show\_specimg | 详情页是否显示规格图片| TINYINT(1) | Yes | | No |
+| enable\_agreement | 开启购买协议| TINYINT(1) | Yes | | No |
+| date\_type | 有效期的类型, DATE\_TYPE\_FIX\_TIME\_RANGE:指定日期范围内, DATE\_TYPE\_FIX\_TERM:固定天数后| VARCHAR(255) | No | NULL | No |
+| begin\_date | 有效期开始时间| INT | No | NULL | No |
+| end\_date | 有效期结束时间| INT | No | NULL | No |
+| fixed\_term | 有效期的有效天数| INT | No | NULL | No |
+| brand\_logo | 品牌图片| VARCHAR(1024) | No | NULL | No |
+| is\_point | 是否积分兑换 true可以 false不可以| TINYINT(1) | No | | No |
+| point | 积分个数| INT | No | 0 | No |
+| distributor\_id | 店铺id,为0时表示该商品为商城商品,否则为店铺自有商品| INT | Yes | 0 | No |
+| volume | 商品体积| DOUBLE PRECISION | No | NULL | No |
+| item\_source | 商品来源:mall:主商城;distributor:店铺自有;openapi:开放接口;| VARCHAR(255) | Yes | mall | No |
+| brand\_id | 品牌id| INT | No | 0 | No |
+| tax\_rate | 税率, 百分之~/100| INT | Yes | NULL | No |
+| crossborder\_tax\_rate | 跨境税率,百分比,小数点2位| VARCHAR(10) | Yes | NULL | No |
+| profit\_type | 分润类型, 默认为0配置分润,1主类目分润,2商品指定分润(比例),3商品指定分润(金额)| INT | No | 0 | No |
+| origincountry\_id | 产地国id| BIGINT | Yes | 0 | No |
+| taxstrategy\_id | 税费策略id| BIGINT | Yes | 0 | No |
+| taxation\_num | 计税单位份数| INT | Yes | 0 | No |
+| profit\_fee | 分润金额,单位为分 冗余字段| INT | No | 0 | No |
+| type | 商品类型,0普通,1跨境商品,可扩展| INT | Yes | 0 | No |
+| is\_profit | 是否支持分润| TINYINT(1) | No | | No |
+| is\_medicine | 是否为药品,0否 1是| SMALLINT | Yes | 0 | No |
+| is\_prescription | 是否为处方药,0否 1是| SMALLINT | Yes | 0 | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+| is\_gift | 是否为赠品| TINYINT(1) | No | | No |
+| is\_package | 是否为打包产品| TINYINT(1) | No | | No |
+| tdk\_content | tdk详情| LONGTEXT | No | NULL | No |
+| supplier\_id | 供应商id| INT | Yes | 0 | No |
+| supplier\_item\_id | 供应商商品id| INT | Yes | 0 | No |
+| is\_market | 供应商控制商品是否可售,0不可售,1可售| INT | Yes | 1 | No |
+| goods\_bn | 产品编号| VARCHAR(255) | No | NULL | No |
+| supplier\_goods\_bn | 供应商货号| VARCHAR(255) | No | NULL | No |
+| audit\_date | 商品审核时间| INT | No | NULL | No |
+| start\_num | 起订量| INT | No | 0 | No |
+| delivery\_time | 发货时间,如2,表示2天发货| INT | No | 0 | No |
+| is\_taobao | 是否淘宝商品| INT | No | 0 | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | item\_id | Yes |
+| ix\_company\_id | company\_id | No |
+| ix\_default\_item\_id | default\_item\_id | No |
+| ix\_supplier\_item\_id | supplier\_item\_id | No |
+| ix\_item\_category | item\_category | No |
+| ix\_item\_bn | item\_bn | No |
+| ix\_goods\_id | goods\_id | No |
+| ix\_is\_default | is\_default | No |
+| ix\_is\_medicine | is\_medicine | No |
+| ix\_is\_prescription | is\_prescription | No |
+| ix\_default\_item\_list | company\_id, default\_item\_id, approve\_status, item\_type, item\_category | No |
+
+
+## items\_attribute\_values
+
+> **商品属性值表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| attribute\_value\_id | 商品属性值id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| attribute\_id | 商品属性ID| BIGINT | Yes | NULL | No |
+| company\_id | 公司ID| BIGINT | Yes | NULL | No |
+| shop\_id | 店铺ID,如果为0则表示总部| BIGINT | Yes | NULL | No |
+| attribuattribute\_valuete\_name | 商品属性值| VARCHAR(255) | Yes | NULL | No |
+| sort | 商品属性排序,越大越在前| VARCHAR(15) | Yes | NULL | No |
+| image\_url | 图片| LONGTEXT | No | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+| oms\_value\_id | oms商品属性值id| BIGINT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | attribute\_value\_id | Yes |
+| ix\_company\_id | company\_id | No |
+| ix\_attribute\_id | attribute\_id | No |
+| ix\_attribuattribute\_valuete\_name | attribuattribute\_valuete\_name | No |
+
+
+## items\_attributes
+
+> **商品属性表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| attribute\_id | 商品属性id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司ID| BIGINT | Yes | NULL | No |
+| shop\_id | 店铺ID,如果为0则表示总部| BIGINT | Yes | 0 | No |
+| attribute\_type | 商品属性类型 unit单位,brand品牌,item\_params商品参数, item\_spec规格| VARCHAR(15) | Yes | NULL | No |
+| attribute\_show | 属性展示方式 select 下拉 input 平铺| VARCHAR(15) | No | NULL | No |
+| attribute\_name | 商品属性名称| VARCHAR(255) | Yes | NULL | No |
+| attribute\_memo | 商品属性备注| VARCHAR(255) | No | NULL | No |
+| attribute\_sort | 商品属性排序,越大越在前| VARCHAR(15) | Yes | NULL | No |
+| distributor\_id | 店铺ID| BIGINT | No | 0 | No |
+| is\_show | 是否用于筛选| VARCHAR(15) | Yes | NULL | No |
+| is\_image | 属性是否需要配置图片| VARCHAR(255) | Yes | NULL | No |
+| image\_url | 图片| LONGTEXT | No | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+| attribute\_code | oms 规格编码| VARCHAR(32) | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | attribute\_id | Yes |
+| ix\_company\_id | company\_id | No |
+| ix\_attribute\_type | attribute\_type | No |
+| ix\_attribute\_name | attribute\_name | No |
+
+
+## items\_barcode
+
+> **商品条形码表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| barcode | 商品条形码| VARCHAR(50) | Yes | NULL | No |
+| item\_id | 商品id| BIGINT | Yes | NULL | No |
+| default\_item\_id | 默认商品id| BIGINT | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | company\_id, barcode | Yes |
+| ix\_item\_id | item\_id | No |
+
+
+## items\_category
+
+> **商品分类表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| category\_id | 商品分类id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司ID| BIGINT | Yes | NULL | No |
+| category\_name | 分类名称| VARCHAR(50) | Yes | NULL | No |
+| category\_code | 分类编码| VARCHAR(50) | No | NULL | No |
+| parent\_id | 父级id, 0为顶级| BIGINT | Yes | 0 | No |
+| category\_level | 商品分类等级| INT | No | 1 | No |
+| is\_main\_category | 是否为商品主类目| TINYINT(1) | No | | No |
+| path | 路径| VARCHAR(255) | No | 0 | No |
+| distributor\_id | 店铺ID| BIGINT | No | 0 | No |
+| commission\_ratio | 佣金比例| INT | Yes | 0 | No |
+| sort | 排序| BIGINT | No | 0 | No |
+| goods\_params | 商品参数| LONGTEXT | No | NULL | No |
+| goods\_spec | 商品规格| LONGTEXT | No | NULL | No |
+| image\_url | 分类图片链接| LONGTEXT | No | NULL | No |
+| crossborder\_tax\_rate | 跨境税率,百分比,小数点2位| VARCHAR(10) | No | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+| customize\_page\_id | 自定义模板id| BIGINT | No | 0 | No |
+| category\_id\_taobao | 淘宝分类id| BIGINT | No | 0 | No |
+| parent\_id\_taobao | 淘宝父级分类ID| BIGINT | No | 0 | No |
+| taobao\_category\_info | 淘宝分类信息行| JSON | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | category\_id | Yes |
+| ix\_company\_id | company\_id | No |
+| ix\_distributor\_id | distributor\_id | No |
+| ix\_parent\_id | parent\_id | No |
+| ix\_is\_main\_category | is\_main\_category | No |
+
+
+## items\_category\_profit
+
+> **商品分润配置表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| category\_id | 商品ID| BIGINT | Yes | NULL | No |
+| company\_id | 公司ID| BIGINT | Yes | NULL | No |
+| profit\_type | 分佣计算方式| VARCHAR(255) | No | default | No |
+| profit\_conf | 分销配置| JSON | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | category\_id | Yes |
+| ix\_company\_id | company\_id | No |
+
+
+## items\_commission
+
+> **商品佣金配置表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司ID| BIGINT | Yes | NULL | No |
+| rel\_id | 关联ID| BIGINT | Yes | NULL | No |
+| type | 数据类型 goods:SPU,item:SKU| VARCHAR(255) | No | goods | No |
+| commission\_type | 佣金计算方式 1:按照比例,2:按照填写金额| VARCHAR(255) | No | 1 | No |
+| commission\_conf | 佣金| JSON | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| ix\_company\_id | company\_id | No |
+| ix\_rel\_id | rel\_id | No |
+| ix\_type | type | No |
+
+
+## items\_medicine
+
+> **商品药品数据表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| item\_id | 商品id| BIGINT | Yes | NULL | No |
+| company\_id | 公司ID| BIGINT | Yes | NULL | No |
+| medicine\_type | 药品分类:0为西药,1为中成药,3为其他| SMALLINT | Yes | NULL | No |
+| common\_name | 通用名(重要,具体请查看《同步药品信息规范指引》文档)| VARCHAR(255) | Yes | NULL | No |
+| dosage | 剂型| VARCHAR(255) | Yes | | No |
+| spec | 规格(重要,具体请查看《同步药品信息规范指引》文档)| VARCHAR(255) | Yes | NULL | No |
+| packing\_spec | 包装规格| VARCHAR(255) | Yes | | No |
+| manufacturer | 生产厂家| VARCHAR(255) | Yes | NULL | No |
+| approval\_number | 批准文号| VARCHAR(255) | Yes | NULL | No |
+| unit | 最小售卖单位| VARCHAR(255) | Yes | NULL | No |
+| is\_prescription | 是否处方药(1为是,0为否)| SMALLINT | Yes | NULL | No |
+| special\_common\_name | 特殊通用名| VARCHAR(255) | Yes | | No |
+| special\_spec | 特殊规格| VARCHAR(255) | Yes | | No |
+| audit\_status | 审核状态,0不需要审核(非处方药),1未审核,2审核通过,3审核不通过| SMALLINT | Yes | 1 | No |
+| audit\_reason | 审核不通过原因| VARCHAR(255) | Yes | | No |
+| item\_type | 商品类型 normal普通商品 point积分商品| VARCHAR(255) | Yes | normal | No |
+| use\_tip | 处方药用药提示| VARCHAR(255) | Yes | | No |
+| symptom | 处方药适用症状| VARCHAR(255) | Yes | | No |
+| max\_num | 处方药单次下单最大购买数量| INT | Yes | 0 | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | item\_id | Yes |
+| ix\_company\_id | company\_id | No |
+| ix\_medicine\_type | medicine\_type | No |
+| ix\_common\_name | common\_name | No |
+| ix\_approval\_number | approval\_number | No |
+| ix\_is\_prescription | is\_prescription | No |
+
+
+## items\_profit
+
+> **商品分润配置表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| item\_id | 商品ID| BIGINT | Yes | NULL | No |
+| company\_id | 公司ID| BIGINT | Yes | NULL | No |
+| profit\_type | 分佣计算方式 0商品不设置默认分润,1按照比例分润,2按照填写金额分润| VARCHAR(255) | No | 0 | No |
+| profit\_conf | 分销配置| JSON | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | item\_id | Yes |
+| ix\_company\_id | company\_id | No |
+
+
+## items\_recommend
+
+> **商品推荐表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| main\_item\_id | 主商品| BIGINT | Yes | NULL | No |
+| item\_id | 商品| BIGINT | Yes | NULL | No |
+| company\_id | 公司ID| BIGINT | Yes | NULL | No |
+| item\_name | 商品名称| VARCHAR(255) | Yes | NULL | No |
+| brief | 简洁的描述| VARCHAR(255) | No | NULL | No |
+| pics | 商品图片| LONGTEXT | Yes | NULL | No |
+| price | 价格,单位为‘分’| INT | Yes | NULL | No |
+| market\_price | 原价,单位为‘分’| INT | Yes | 0 | No |
+| item\_spec\_desc | 产品规格描述| VARCHAR(255) | No | | No |
+| sort | 商品排序| INT | Yes | 0 | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_company\_id | company\_id | No |
+| idx\_main\_item\_id | main\_item\_id | No |
+
+
+## items\_rel\_attributes
+
+> **商品关联属性表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司ID| BIGINT | Yes | NULL | No |
+| item\_id | 商品ID| BIGINT | Yes | NULL | No |
+| attribute\_sort | 商品属性排序| INT | No | 0 | No |
+| attribute\_id | 商品属性id| BIGINT | Yes | NULL | No |
+| attribute\_type | 商品属性类型 unit单位,brand品牌,item\_params商品参数, item\_spec规格| VARCHAR(15) | Yes | NULL | No |
+| attribute\_value\_id | 商品属性值id| BIGINT | No | NULL | No |
+| custom\_attribute\_value | 自定义属性名称| VARCHAR(255) | No | NULL | No |
+| image\_url | 规格自定义图片| JSON | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| ix\_company\_id | company\_id | No |
+| ix\_item\_id | item\_id | No |
+| ix\_attribute\_type | attribute\_type | No |
+
+
+## items\_rel\_point\_access
+
+> **商品和积分获取设置关联表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| item\_id | 商品ID| BIGINT | Yes | NULL | No |
+| company\_id | 公司ID| BIGINT | Yes | NULL | No |
+| point | 积分| BIGINT | Yes | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | item\_id | Yes |
+| ix\_itemid\_companyid | company\_id, item\_id | No |
+
+
+## items\_rel\_tags
+
+> **商品关联标签表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| tag\_id | 标签id| BIGINT | Yes | NULL | No |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| item\_id | 商品id| BIGINT | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | tag\_id, company\_id, item\_id | Yes |
+| ix\_company\_id | company\_id | No |
+| ix\_item\_id | item\_id | No |
+| ix\_tag\_id | tag\_id | No |
+
+
+## items\_rel\_type
+
+> **商品数值属性关联表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| item\_id | 商品ID| BIGINT | Yes | NULL | No |
+| label\_id | 数值属性ID| BIGINT | Yes | NULL | No |
+| label\_name | 数值属性名称| VARCHAR(255) | Yes | NULL | No |
+| label\_price | 价格,单位为‘分’| INT | Yes | NULL | No |
+| num\_type | 会员数值属性类型,plus:加,minux:减,multiple:乘| VARCHAR(30) | Yes | NULL | No |
+| num | 数值属性值,例如买了50个次卡,就是填50;赠送了10个经验,就是填10| BIGINT | Yes | NULL | No |
+| is\_not\_limit\_num | 限制核销次数,1:不限制;2:限制| INT | Yes | 2 | No |
+| limit\_time | 有效期,例如30天| BIGINT | Yes | 0 | No |
+| company\_id | 公司ID| BIGINT | Yes | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | item\_id, label\_id | Yes |
+
+
+## items\_tags
+
+> **商品标签库表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| tag\_id | 标签id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| tag\_name | 标签名称| VARCHAR(50) | Yes | NULL | No |
+| tag\_color | 标签颜色| VARCHAR(50) | Yes | NULL | No |
+| distributor\_id | 店铺ID| BIGINT | No | 0 | No |
+| font\_color | 字体颜色| VARCHAR(50) | Yes | NULL | No |
+| description | 标签描述| VARCHAR(255) | No | NULL | No |
+| tag\_icon | 标签icon| LONGTEXT | No | NULL | No |
+| front\_show | 前台是否显示 0 否 1 是| SMALLINT | No | 0 | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | tag\_id | Yes |
+| ix\_company\_id | company\_id | No |
+| ix\_tag\_id | tag\_id | No |
+
+
+## kaquan\_card\_related
+
+> **卡券库存统计表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| card\_id | 卡券id| VARCHAR(40) | Yes | NULL | No |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| title | 卡券名,最大9个汉字| VARCHAR(27) | Yes | NULL | No |
+| quantity | 卡券总库存| INT | No | 0 | No |
+| get\_num | 被领取数量| INT | No | 0 | No |
+| consume\_num | 被核销数量| INT | No | 0 | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | card\_id, company\_id | Yes |
+
+
+## kaquan\_discount\_cards
+
+> **优惠券信息表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| card\_id | 卡券id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| card\_type | 卡券类型,可选值有,discount:折扣券;cash:代金券;gift:兑换券;new\_gift:兑换券(新)| VARCHAR(16) | Yes | NULL | No |
+| brand\_name | 商户名称| VARCHAR(36) | No | NULL | No |
+| logo\_url | 卡券商户 logo| VARCHAR(255) | No | NULL | No |
+| title | 卡券名,最大9个汉字| VARCHAR(27) | Yes | NULL | No |
+| color | 券颜色值| VARCHAR(16) | Yes | NULL | No |
+| notice | 卡券使用提醒,最大16汉字| VARCHAR(48) | No | NULL | No |
+| description | 卡券使用说明| LONGTEXT | Yes | NULL | No |
+| date\_type | 有效期的类型| VARCHAR(255) | Yes | NULL | No |
+| begin\_date | 有效期开始时间| INT | No | NULL | No |
+| end\_date | 有效期结束时间| INT | No | NULL | No |
+| fixed\_term | 有效期的有效天数| INT | No | NULL | No |
+| grade\_ids | 指定会员id| VARCHAR(255) | Yes | | No |
+| vip\_grade\_ids | 指定付费会员id| VARCHAR(255) | Yes | | No |
+| kq\_status | 卡券状态 0:正常 1:暂停 2:关闭| INT | Yes | 0 | No |
+| lock\_time | 兑换商品后的锁定时间| INT | Yes | 0 | No |
+| send\_begin\_time | 发放开始时间| INT | No | NULL | No |
+| send\_end\_time | 发放结束时间| INT | No | NULL | No |
+| service\_phone | 客服电话| VARCHAR(15) | No | NULL | No |
+| center\_title | 卡券顶部居中的按钮,仅在卡券状态正常(可以核销)时显示| VARCHAR(255) | No | NULL | No |
+| center\_sub\_title | 显示在入口下方的提示语| VARCHAR(255) | No | NULL | No |
+| center\_url | 顶部居中的url| VARCHAR(255) | No | NULL | No |
+| custom\_url\_name | 自定义跳转外链的入口名字| VARCHAR(15) | No | NULL | No |
+| custom\_url | 自定义跳转的URL| VARCHAR(255) | No | NULL | No |
+| custom\_url\_sub\_title | 显示在入口右侧的提示语| VARCHAR(18) | No | NULL | No |
+| promotion\_url\_name | 营销场景的自定义入口名称| VARCHAR(15) | No | NULL | No |
+| promotion\_url | 营销场景的自定义入口url| VARCHAR(255) | No | NULL | No |
+| promotion\_url\_sub\_title | 营销入口右侧的提示语| VARCHAR(18) | No | NULL | No |
+| get\_limit | 每人可领券的数量限制| INT | No | NULL | No |
+| use\_limit | 每人可核销的数量限制| INT | No | NULL | No |
+| can\_share | 卡券领取页面是否可分享| VARCHAR(255) | No | false | No |
+| can\_give\_friend | 卡券是否可转赠| VARCHAR(255) | No | false | No |
+| abstract | 封面摘要| VARCHAR(255) | No | NULL | No |
+| icon\_url\_list | 封面图片| VARCHAR(255) | No | NULL | No |
+| text\_image\_list | 图文列表| LONGTEXT | No | NULL | No |
+| time\_limit | 使用时段限制| LONGTEXT | No | NULL | No |
+| gift | 兑换券兑换内容名称| VARCHAR(255) | No | NULL | No |
+| default\_detail | 优惠券优惠详情| VARCHAR(255) | No | NULL | No |
+| discount | 折扣券打折额度(百分比)| INT | No | 0 | No |
+| least\_cost | 代金券起用金额| INT | No | 0 | No |
+| reduce\_cost | 代金券减免金额 or 兑换券起用金额| INT | No | 0 | No |
+| deal\_detail | 团购券详情| VARCHAR(255) | No | NULL | No |
+| accept\_category | 指定可用的商品类目,代金券专用| VARCHAR(255) | No | NULL | No |
+| reject\_category | 指定不可用的商品类目,代金券专用| VARCHAR(255) | No | NULL | No |
+| object\_use\_for | 购买xx可用类型门槛,仅用于兑换| VARCHAR(255) | No | NULL | No |
+| can\_use\_with\_other\_discount | 是否可与其他优惠共享| VARCHAR(255) | No | false | No |
+| use\_platform | 优惠券适用平台(线上商城专用 or 门店专用)| VARCHAR(255) | No | store | No |
+| quantity | 卡券数量| INT | Yes | NULL | No |
+| use\_all\_shops | 是否适用所有门店| VARCHAR(255) | No | true | No |
+| rel\_shops\_ids | 适用的门店| LONGTEXT | No | NULL | No |
+| use\_scenes | 核销场景。可选值有,ONLINE:线上商城(兑换券不可使用);QUICK:快捷买单(兑换券不可使用);SWEEP:门店支付(扫码核销);SELF:到店支付(自助核销)| VARCHAR(255) | No | QUICK | No |
+| self\_consume\_code | 自助核销验证码| INT | No | 0 | No |
+| receive | 是否前台直接领取| VARCHAR(255) | No | true | No |
+| distributor\_id | 店铺id| LONGTEXT | No | , | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | Yes | NULL | No |
+| most\_cost | 代金券最高消费限额| INT | No | 0 | No |
+| use\_bound | 适用范围: 0:全场可用,1:指定商品可用,2:指定分类可用,3:指定商品标签可用,4:指定商品品牌可用| INT | Yes | 0 | No |
+| tag\_ids | 标签id集合| LONGTEXT | No | NULL | No |
+| brand\_ids | 品牌id集合| LONGTEXT | No | NULL | No |
+| apply\_scope | 适用范围| LONGTEXT | No | NULL | No |
+| card\_code | 优惠券模板ID-第三方使用| VARCHAR(255) | No | NULL | No |
+| card\_rule\_code | 优惠券规则ID-第三方使用| VARCHAR(255) | No | NULL | No |
+| source\_type | 添加者类型:distributor| VARCHAR(20) | No | NULL | No |
+| source\_id | 添加者ID: 如店铺ID| BIGINT | No | 0 | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | card\_id | Yes |
+| ix\_company\_id | company\_id | No |
+| ix\_source\_id | source\_id | No |
+
+
+## kaquan\_rel\_items
+
+> **卡券关联商品表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| item\_id | 筛选id(按item\_type区分为商品ID,标签ID等)| BIGINT | Yes | NULL | No |
+| card\_id | 优惠券id| BIGINT | Yes | NULL | No |
+| item\_type | 筛选类型,可选值有normal:普通商品,tag:标签,brand:品牌,category:主类目| VARCHAR(255) | Yes | normal | No |
+| is\_show | 是否为列表默认展示| TINYINT(1) | Yes | 1 | No |
+| company\_id | 公司id| BIGINT | No | NULL | No |
+| use\_limit | 兑换上限| INT | Yes | 0 | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | item\_id, card\_id, item\_type | Yes |
+| idx\_card\_id | card\_id | No |
+| idx\_company\_id | company\_id | No |
+
+
+## kaquan\_rel\_member\_tags
+
+> **卡券关联用户标签表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| card\_id | 卡券id| BIGINT | Yes | NULL | No |
+| tag\_id | 用户标签id| BIGINT | Yes | NULL | No |
+| company\_id | 公司id| BIGINT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | card\_id, tag\_id | Yes |
+| idx\_company\_id | company\_id | No |
+| idx\_tag\_id | tag\_id | No |
+
+
+## kaquan\_salesperson\_give\_coupons
+
+> **导购员发放给用户优惠券记录**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | 自增id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | | BIGINT | Yes | NULL | No |
+| salesperson\_id | 导购员id| BIGINT | Yes | NULL | No |
+| salesperson\_name | 导购员名称| VARCHAR(255) | Yes | NULL | No |
+| user\_id | 会员id| BIGINT | Yes | NULL | No |
+| user\_name | 会员名称| VARCHAR(255) | Yes | | No |
+| coupons\_id | 优惠券id| BIGINT | Yes | NULL | No |
+| coupons\_name | 优惠券名称| VARCHAR(255) | Yes | NULL | No |
+| number | 发送优惠券数量| INT | Yes | 0 | No |
+| status | 发放优惠券状态,1成功,0失败| INT | Yes | 1 | No |
+| fail\_reason | 失败原因| VARCHAR(255) | No | NULL | No |
+| give\_time | 发送优惠券时间| INT | Yes | NULL | No |
+| updated | 修改时间| INT | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+
+
+## kaquan\_user\_discount
+
+> **用户领取的优惠券表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | 自增id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| user\_id | 用户的唯一标识| BIGINT | Yes | NULL | No |
+| company\_id | 公司id| BIGINT | No | NULL | No |
+| card\_id | 微信用户领取的卡券 id | BIGINT | Yes | NULL | No |
+| code | 卡券 code 序列号| VARCHAR(30) | Yes | NULL | No |
+| source\_type | 卡券来源类型,可选值有 local:本地卡券,wechat:微信卡券| VARCHAR(30) | Yes | local | No |
+| status | 用户领取的优惠券使用状态{1:未使用,2:已核销,3:已转赠,5:已过期,6:作废,10:已使用(兑换券)};| INT | No | 1 | No |
+| card\_type | 优惠券类型,可选值有 discount:折扣券,cash:代金券,new\_gift:兑换券| VARCHAR(255) | No | 1 | No |
+| use\_platform | 优惠券适用平台(mall:线上商城专用, store:门店专用)| VARCHAR(255) | No | store | No |
+| begin\_date | 有效期开始时间| INT | Yes | NULL | No |
+| end\_date | 有效期结束时间| INT | Yes | NULL | No |
+| get\_date | 优惠券获取时间| INT | Yes | NULL | No |
+| title | 卡券名,最大9个汉字| VARCHAR(27) | Yes | NULL | No |
+| color | 券颜色值| VARCHAR(16) | Yes | NULL | No |
+| discount | 折扣券打折额度(百分比)| INT | No | 0 | No |
+| least\_cost | 代金券起用金额| INT | No | 0 | No |
+| reduce\_cost | 代金券减免金额 or 兑换券起用金额| INT | No | 0 | No |
+| rel\_shops\_ids | 门店shop\_id;线下门店时,必填;| LONGTEXT | No | NULL | No |
+| rel\_item\_ids | 使用商品| LONGTEXT | No | NULL | No |
+| rel\_distributor\_ids | 使用商品| LONGTEXT | No | NULL | No |
+| consume\_source | 核销来源| VARCHAR(255) | No | NULL | No |
+| get\_outer\_str | 领取场景值| VARCHAR(255) | No | NULL | No |
+| location\_name | 核销卡券的门店名称| VARCHAR(255) | No | NULL | No |
+| staff\_open\_id | 卡券核销员| VARCHAR(255) | No | NULL | No |
+| verify\_code | 自助核销的验证码| VARCHAR(255) | No | NULL | No |
+| remark\_amount | 自助核销时备注金额| VARCHAR(255) | No | NULL | No |
+| consume\_outer\_str | 核销渠道| VARCHAR(255) | No | NULL | No |
+| trans\_id | 微信支付交易订单号,买单核销专用| VARCHAR(255) | No | NULL | No |
+| fee | 实付金额,买单核销专用| VARCHAR(255) | No | NULL | No |
+| original\_fee | 应付金额,买单核销专用| VARCHAR(255) | No | NULL | No |
+| location\_id | 当前卡券核销的门店ID| VARCHAR(255) | No | NULL | No |
+| use\_scenes | 可被核销的方式| VARCHAR(255) | No | QUICK | No |
+| most\_cost | 代金券最高消费限额| INT | No | 0 | No |
+| use\_condition | 使用条件字段| LONGTEXT | No | NULL | No |
+| is\_give\_by\_friend | 是否为转赠领取| TINYINT(1) | No | | No |
+| old\_code | 转赠之后,旧的 code 序列号| VARCHAR(255) | No | NULL | No |
+| friend\_open\_id | 转赠卡券时接收方 open\_id| VARCHAR(255) | No | NULL | No |
+| is\_return\_back | 转赠时是否退回| TINYINT(1) | No | | No |
+| is\_chat\_room | 是否群转赠| TINYINT(1) | No | | No |
+| salesperson\_id | 导购id| BIGINT | No | NULL | No |
+| use\_limited | 是否可以多次使用,仅记录无业务| INT | No | 0 | No |
+| remain\_times | 剩余使用次数,仅记录无业务| INT | No | 1 | No |
+| use\_bound | 适用范围: 0:全场可用,1:指定商品可用,2:指定分类可用,3:指定商品标签可用,4:指定商品品牌可用| INT | Yes | 0 | No |
+| rel\_category\_ids | 可使用的类目| LONGTEXT | No | NULL | No |
+| apply\_scope | 适用范围| LONGTEXT | No | NULL | No |
+| used\_time | 兑换券使用时间| INT | Yes | 0 | No |
+| expired\_time | 兑换券过期时间| INT | Yes | 0 | No |
+| activity\_name | 参与活动名称| VARCHAR(100) | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_company\_id | company\_id | No |
+| idx\_code | code | No |
+| idx\_source\_type | source\_type | No |
+| idx\_userid\_status\_companyid | user\_id, status, company\_id | No |
+| idx\_userid\_enddate | user\_id, end\_date | No |
+| idx\_status\_expiredtime | status, expired\_time | No |
+| idx\_cardid\_companyid\_userid | card\_id, company\_id, user\_id | No |
+
+
+## kaquan\_user\_discount\_logs
+
+> **优惠券核销记录表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | 自增id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| user\_id | 用户的唯一标识| BIGINT | Yes | NULL | No |
+| company\_id | 公司ID| BIGINT | Yes | NULL | No |
+| mobile | 手机号| VARCHAR(255) | Yes | NULL | No |
+| username | 姓名| VARCHAR(500) | No | NULL | No |
+| card\_id | 微信用户领取的卡券 id | BIGINT | Yes | NULL | No |
+| code | 卡券 code 序列号| VARCHAR(30) | Yes | NULL | No |
+| title | 卡券名,最大9个汉字| VARCHAR(27) | Yes | NULL | No |
+| card\_type | 优惠券类型,可选值有 discount 折扣券;cash:代金券;gift:兑换券| VARCHAR(255) | Yes | NULL | No |
+| shop\_name | 核销卡券的门店名称| VARCHAR(255) | No | NULL | No |
+| used\_time | 核销时间| INT | Yes | NULL | No |
+| used\_status | 核销状态;consume:核销,callback:回退| VARCHAR(255) | No | NULL | No |
+| used\_order | 核销订单| VARCHAR(255) | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+
+
+## kaquan\_vip\_grade
+
+> **付费会员等级库表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| vip\_grade\_id | ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司ID| INT | Yes | NULL | No |
+| grade\_name | 等级名称| VARCHAR(255) | Yes | NULL | No |
+| lv\_type | 等级类型,可选值有 vip:普通vip;svip:进阶vip| VARCHAR(255) | Yes | NULL | No |
+| guide\_title | 购买引导文本| VARCHAR(255) | No | NULL | No |
+| is\_default | 购买引导文本| TINYINT(1) | Yes | | No |
+| default\_grade | 是否默认等级| TINYINT(1) | No | | No |
+| is\_disabled | 是否禁用| TINYINT(1) | No | | No |
+| background\_pic\_url | 商家自定义会员卡背景图| VARCHAR(1024) | No | NULL | No |
+| price\_list | 阶段价格表| LONGTEXT | No | NULL | No |
+| privileges | 会员权益| LONGTEXT | No | NULL | No |
+| description | 详细说明| LONGTEXT | No | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | Yes | NULL | No |
+| external\_id | 外部唯一标识,外部调用方自定义的值| VARCHAR(50) | Yes | | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | vip\_grade\_id | Yes |
+| idx\_companyid\_created | company\_id, created | No |
+
+
+## kaquan\_vip\_grade\_order
+
+> **付费会员等级卡**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| order\_id | 订单号| BIGINT | Yes | NULL | No |
+| vip\_grade\_id | 付费会员卡等级ID| INT | Yes | NULL | No |
+| lv\_type | 等级类型| VARCHAR(255) | Yes | NULL | No |
+| company\_id | 公司ID| INT | Yes | NULL | No |
+| user\_id | 用户id| BIGINT | No | NULL | No |
+| mobile | 用户手机号| VARCHAR(255) | No | NULL | No |
+| title | 会员卡标题| VARCHAR(255) | No | NULL | No |
+| price | 付款金额| INT UNSIGNED | Yes | NULL | No |
+| card\_type | 购买的卡片类型,可选值有 monthly:30天月度卡;quarter:30天季度卡;year:365天年度卡| JSON | Yes | NULL | No |
+| discount | 折扣额度| INT | Yes | 0 | No |
+| shop\_id | 门店id| BIGINT UNSIGNED | Yes | 0 | No |
+| distributor\_id | 分销商id| BIGINT UNSIGNED | Yes | 0 | No |
+| source\_id | 订单来源id| BIGINT | No | NULL | No |
+| monitor\_id | 订单监控页面id| BIGINT | No | NULL | No |
+| order\_status | 订单状态,可选值有 DONE—订单完成;NOTPAY—未支付;CANCEL—已取消| VARCHAR(255) | No | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | Yes | NULL | No |
+| fee\_type | 货币类型| VARCHAR(5) | Yes | CNY | No |
+| fee\_rate | 货币汇率| DOUBLE PRECISION | Yes | 1 | No |
+| fee\_symbol | 货币符号| VARCHAR(255) | Yes | ¥ | No |
+| source\_type | 订单来源,可选值有 sale:购买;receive:领取;admin:后台手动续期;gift:赠送| VARCHAR(255) | Yes | sale | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | order\_id | Yes |
+
+
+## kaquan\_vip\_rel\_user
+
+> **付费会员的等级卡表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司ID| INT | Yes | NULL | No |
+| user\_id | 用户id| BIGINT | No | NULL | No |
+| vip\_type | 会员类型| VARCHAR(255) | No | NULL | No |
+| vip\_grade\_id | 会员等级id| BIGINT | No | NULL | No |
+| end\_date | 会员到期时间| VARCHAR(255) | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| inx\_company\_id | company\_id | No |
+| inx\_user\_id | user\_id | No |
+| inx\_vip\_grade\_id | vip\_grade\_id | No |
+
+
+## kaquan\_wechat\_card
+
+> **关联微信卡券**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| card\_id | 会员卡id| BIGINT | Yes | NULL | No |
+| wechat\_card\_id | 微信会员卡id| VARCHAR(40) | Yes | NULL | No |
+| company\_id | 公司id| BIGINT | No | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | card\_id | Yes |
+| idx\_company\_id | company\_id | No |
+| idx\_wechat\_card\_id | wechat\_card\_id | No |
+
+
+## logistics
+
+> **物流公司表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| corp\_id | 物流公司ID| SMALLINT AUTO_INCREMENT | Yes | NULL | Yes |
+| corp\_code | 快递鸟代码| VARCHAR(255) | Yes | NULL | No |
+| kuaidi\_code | 快递100代码| VARCHAR(255) | Yes | NULL | No |
+| full\_name | 物流公司全名| VARCHAR(255) | Yes | NULL | No |
+| corp\_name | 物流公司简称| VARCHAR(255) | Yes | NULL | No |
+| order\_sort | 排序| SMALLINT | Yes | 99 | No |
+| custom | 是否自定义| TINYINT(1) | No | | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+| phone | 物流公司电话| VARCHAR(20) | No | NULL | No |
+| logo | logo| VARCHAR(255) | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | corp\_id | Yes |
+
+
+## lucky\_draw\_activity
+
+> **抽奖表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | 抽奖id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司ID| BIGINT | Yes | NULL | No |
+| area\_id | 区域id| BIGINT | Yes | NULL | No |
+| begin\_time | 开始时间| BIGINT | Yes | NULL | No |
+| end\_time | 结束时间| BIGINT | Yes | NULL | No |
+| cost\_type | 消耗类型,1互动分2积分| BIGINT | Yes | NULL | No |
+| cost\_value | 具体的消耗值| BIGINT | Yes | NULL | No |
+| limit\_total | 活动期限内总限制| BIGINT | Yes | NULL | No |
+| limit\_day | 按天限制| BIGINT | Yes | NULL | No |
+| activity\_type | 活动类型,wheel为大转盘| VARCHAR(64) | No | NULL | No |
+| activity\_name | 活动名称| VARCHAR(255) | No | NULL | No |
+| activity\_template\_config | 活动模板配置| LONGTEXT | No | NULL | No |
+| prize\_data | 奖项配置| LONGTEXT | No | NULL | No |
+| intro | 活动说明| LONGTEXT | No | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+
+
+## map\_config
+
+> **地图配置表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | 地区id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司company id| BIGINT | Yes | NULL | No |
+| type | 第三方类型【amap 高德地图】【tencent 腾讯地图】| VARCHAR(20) | Yes | NULL | No |
+| app\_key | 第三方控制台中生成的key| VARCHAR(255) | Yes | | No |
+| app\_secret | 第三方控制台中生成的秘钥| VARCHAR(255) | Yes | | No |
+| is\_default | 是否是默认的地图配置项| TINYINT(1) | Yes | 0 | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| ix\_company\_id | company\_id | No |
+
+
+## map\_config\_service
+
+> **地图配置表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | 本地的唯一id,如果外部表要与该表做关联,需要使用该id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司company id| BIGINT | Yes | NULL | No |
+| config\_id | 地图配置的id| BIGINT | Yes | NULL | No |
+| type | 服务的类型| SMALLINT | Yes | NULL | No |
+| service\_id | 第三方平台提供的服务id| VARCHAR(20) | Yes | NULL | No |
+| service\_data | json内容,第三方平台中的服务数据| LONGTEXT | Yes | NULL | No |
+| status | 状态【1 生效】【0 失效】| SMALLINT | Yes | 1 | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| ix\_company\_config\_type | company\_id, config\_id, type, status | No |
+
+
+## medication\_personnel
+
+> **用药人信息**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| user\_id | 用户id| BIGINT | Yes | NULL | No |
+| user\_family\_name | 用药人姓名| VARCHAR(255) | Yes | NULL | No |
+| user\_family\_id\_card | 用药人身份证号| VARCHAR(255) | Yes | | No |
+| user\_family\_age | 用药人年龄| INT | Yes | NULL | No |
+| user\_family\_gender | 用药人性别1-男,2-女| SMALLINT | Yes | NULL | No |
+| user\_family\_phone | 用药人手机号码| VARCHAR(255) | Yes | NULL | No |
+| relationship | 用药人与问诊人关系(1本人 2父母 3配偶 4子女 5其他)| SMALLINT | Yes | NULL | No |
+| is\_default | 是否默认| SMALLINT | Yes | 0 | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_company\_id | company\_id | No |
+| idx\_user\_id | user\_id | No |
+| idx\_user\_family\_id\_card | user\_family\_id\_card | No |
+| idx\_is\_default | is\_default | No |
+
+
+## member\_group
+
+> **分组表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| group\_id | 分组id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| group\_name | 分组名| VARCHAR(255) | Yes | NULL | No |
+| salesperson\_id | 导购员| BIGINT | Yes | NULL | No |
+| sort | 排序| INT | Yes | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | group\_id | Yes |
+| idx\_company\_id | company\_id | No |
+| idx\_salesperson\_id | salesperson\_id | No |
+
+
+## member\_outfit
+
+> ****
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | | BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| member\_id | | INT | Yes | NULL | No |
+| model\_image | | VARCHAR(255) | Yes | NULL | No |
+| status | | SMALLINT | Yes | NULL | No |
+| created\_at | | DATETIME | Yes | NULL | No |
+| updated\_at | | DATETIME | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+
+
+## member\_outfit\_log
+
+> ****
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | | BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| model\_id | | BIGINT | No | NULL | No |
+| member\_id | | INT | Yes | NULL | No |
+| item\_id | | INT | No | NULL | No |
+| request\_id | | VARCHAR(64) | Yes | NULL | No |
+| top\_garment\_url | | VARCHAR(255) | No | NULL | No |
+| bottom\_garment\_url | | VARCHAR(255) | No | NULL | No |
+| result\_url | | VARCHAR(255) | No | NULL | No |
+| status | | SMALLINT | Yes | NULL | No |
+| created\_at | | DATETIME | Yes | NULL | No |
+| updated\_at | | DATETIME | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| uniq\_92d9fff3427eb8a5 | request\_id | Yes |
+| idx\_92d9fff37975b7e7 | model\_id | No |
+| primary | id | Yes |
+
+
+## member\_rel\_group
+
+> **会员分组表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| group\_id | 分组id| BIGINT | Yes | NULL | No |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| salesperson\_id | 导购员id| BIGINT | Yes | NULL | No |
+| user\_id | 用户id| BIGINT | Yes | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_company\_id | company\_id | No |
+| idx\_salesperson\_id | salesperson\_id | No |
+| idx\_group\_id | group\_id | No |
+
+
+## member\_remarks
+
+> **会员备注表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| remarks\_id | 主键id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| salesperson\_id | 导购员id| BIGINT | Yes | NULL | No |
+| user\_id | 导购员id| BIGINT | Yes | NULL | No |
+| remarks | 导购员会员备注内容| VARCHAR(255) | Yes | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | remarks\_id | Yes |
+| idx\_company\_id | company\_id | No |
+| idx\_salesperson\_id | salesperson\_id | No |
+| idx\_user\_id | user\_id | No |
+
+
+## membercard
+
+> **会员卡**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| brand\_name | 商户名称| VARCHAR(36) | Yes | NULL | No |
+| logo\_url | 商户 logo| VARCHAR(255) | Yes | NULL | No |
+| title | 卡券名,最大9个汉字| VARCHAR(27) | Yes | NULL | No |
+| color | 券颜色值| VARCHAR(16) | Yes | NULL | No |
+| code\_type | 卡券码类型(CODE\_TYPE\_TEXT CODE\_TYPE\_BARCODE CODE\_TYPE\_QRCODE CODE\_TYPE\_ONLY\_QRCODE CODE\_TYPE\_ONLY\_BARCODE CODE\_TYPE\_NONE)| VARCHAR(48) | Yes | NULL | No |
+| background\_pic\_url | 会员卡背景图| VARCHAR(255) | Yes | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | company\_id | Yes |
+
+
+## membercard\_grade
+
+> **会员卡等级表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| grade\_id | 等级ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司ID| VARCHAR(255) | Yes | NULL | No |
+| grade\_name | 等级名称| VARCHAR(255) | Yes | NULL | No |
+| default\_grade | 是否默认等级| TINYINT(1) | Yes | | No |
+| background\_pic\_url | 商家自定义会员卡背景图| VARCHAR(1024) | No | NULL | No |
+| promotion\_condition | 升级条件| JSON | No | NULL | No |
+| privileges | 会员权益| JSON | No | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | Yes | NULL | No |
+| third\_data | 第三方数据| VARCHAR(255) | No | NULL | No |
+| external\_id | 外部唯一标识,外部调用方自定义的值| VARCHAR(50) | Yes | | No |
+| description | 详细说明| LONGTEXT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | grade\_id | Yes |
+| idx\_companyid | company\_id | No |
+
+
+## members
+
+> **会员主表,其他平台的会员本地化表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| user\_id | 用户id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| grade\_id | 等级id| BIGINT | Yes | NULL | No |
+| mobile | 手机号| VARCHAR(255) | Yes | NULL | No |
+| region\_mobile | 带区号的手机号| VARCHAR(50) | Yes | NULL | No |
+| mobile\_country\_code | 手机号的区号| VARCHAR(50) | Yes | NULL | No |
+| password | 密码| VARCHAR(255) | Yes | NULL | No |
+| user\_card\_code | 会员卡号| VARCHAR(255) | Yes | NULL | No |
+| offline\_card\_code | 线下会员卡号| VARCHAR(255) | No | NULL | No |
+| authorizer\_appid | 公众号的appid| VARCHAR(64) | No | NULL | No |
+| wxa\_appid | 小程序的appid| VARCHAR(64) | No | NULL | No |
+| alipay\_appid | 支付宝小程序appid| VARCHAR(64) | No | NULL | No |
+| inviter\_id | 推荐人id| BIGINT | No | NULL | No |
+| source\_from | 来源类型 default默认| VARCHAR(255) | No | default | No |
+| source\_id | 来源id| BIGINT | No | NULL | No |
+| monitor\_id | 监控页面id| BIGINT | No | NULL | No |
+| latest\_source\_id | 最近来源id| BIGINT | No | NULL | No |
+| latest\_monitor\_id | 最近监控页面id| BIGINT | No | NULL | No |
+| remarks | 会员备注| VARCHAR(255) | No | NULL | No |
+| created | | INT | Yes | NULL | No |
+| created\_year | 创建年份| INT | No | 0 | No |
+| created\_month | 创建月份| INT | No | 0 | No |
+| created\_day | 创建日期| INT | No | 0 | No |
+| updated | | INT | Yes | NULL | No |
+| disabled | 是否禁用。0:可用;1:禁用| TINYINT(1) | Yes | 0 | No |
+| use\_point | 是否可以使用积分| TINYINT(1) | Yes | 0 | No |
+| third\_data | 第三方数据| VARCHAR(255) | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | user\_id | Yes |
+| idx\_company\_id | company\_id | No |
+| idx\_mobile | mobile | No |
+| idx\_grade\_id | grade\_id | No |
+| idx\_company\_id\_user\_card\_code | company\_id, user\_card\_code | No |
+| mobile\_company | mobile, company\_id | Yes |
+
+
+## members\_address
+
+> **会员收货地址表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| address\_id | id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| user\_id | 用户id| BIGINT | Yes | NULL | No |
+| username | 收货人| VARCHAR(50) | Yes | NULL | No |
+| telephone | 手机号码| VARCHAR(20) | Yes | NULL | No |
+| area | 地区| VARCHAR(255) | No | NULL | No |
+| province | 地区:省| VARCHAR(255) | Yes | NULL | No |
+| city | 地区:市| VARCHAR(255) | Yes | NULL | No |
+| county | 地区:区| VARCHAR(255) | Yes | NULL | No |
+| adrdetail | 详细地址| VARCHAR(255) | Yes | NULL | No |
+| postalCode | 邮编| VARCHAR(20) | No | NULL | No |
+| is\_def | 是否默认地址| TINYINT(1) | Yes | 0 | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | Yes | NULL | No |
+| third\_data | 第三方数据| VARCHAR(255) | No | NULL | No |
+| lng | 腾讯地图纬度| VARCHAR(255) | Yes | | No |
+| lat | 腾讯地图经度| VARCHAR(255) | Yes | | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | address\_id | Yes |
+| idx\_user\_id | user\_id | No |
+| idx\_company\_id | company\_id | No |
+
+
+## members\_article\_fav
+
+> **会员心愿单收藏**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| fav\_id | 收藏id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| user\_id | 会员id| BIGINT | Yes | NULL | No |
+| article\_id | 文章ID| BIGINT | Yes | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | 更新时间| INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | fav\_id | Yes |
+| idx\_company\_id | company\_id | No |
+| idx\_user\_id | user\_id | No |
+
+
+## members\_associations
+
+> **不同平台会员关联表,关联到members表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| user\_id | 用户id| BIGINT | Yes | NULL | No |
+| unionid | 第三方unionid| VARCHAR(40) | Yes | NULL | No |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| user\_type | 用户类型,可选值有 wechat:微信;ali:支付宝| VARCHAR(30) | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | user\_id, unionid, company\_id, user\_type | Yes |
+| ind\_member\_id\_miss | unionid, company\_id, user\_type | No |
+
+
+## members\_browse\_history
+
+> **会员浏览足迹**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| history\_id | id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| user\_id | 会员id| BIGINT | Yes | NULL | No |
+| item\_id | 商品id| BIGINT | Yes | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | history\_id | Yes |
+| idx\_company\_id | company\_id | No |
+| idx\_item\_id | item\_id | No |
+| idx\_user\_id | user\_id | No |
+
+
+## members\_delete\_record
+
+> **会员删除记录**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | 主键id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| user\_id | 用户id| BIGINT | Yes | NULL | No |
+| mobile | 手机号| VARCHAR(255) | Yes | NULL | No |
+| created | 创建时间| INT | No | NULL | No |
+| updated | 更新时间| INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_company\_id | company\_id | No |
+| idx\_mobile | mobile | No |
+| idx\_user\_id | user\_id | No |
+
+
+## members\_distribution\_fav
+
+> **会员店铺收藏**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| fav\_id | 收藏id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| user\_id | 会员id| BIGINT | Yes | NULL | No |
+| distributor\_id | 店铺ID| BIGINT | Yes | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | 更新时间| INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | fav\_id | Yes |
+| idx\_company\_id | company\_id | No |
+| idx\_user\_id | user\_id | No |
+
+
+## members\_info
+
+> **会员详情信息表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| user\_id | 用户id| BIGINT | Yes | NULL | No |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| username | 姓名| VARCHAR(500) | No | NULL | No |
+| name | 名称| VARCHAR(255) | No | NULL | No |
+| avatar | 头像| VARCHAR(255) | No | NULL | No |
+| sex | 性别。0 未知 1 男 2 女| SMALLINT | No | 0 | No |
+| birthday | 出生日期| VARCHAR(100) | No | NULL | No |
+| address | 家庭住址| VARCHAR(255) | No | NULL | No |
+| email | 常用邮箱| VARCHAR(100) | No | NULL | No |
+| industry | 从事行业| VARCHAR(255) | No | NULL | No |
+| income | 年收入| VARCHAR(50) | No | NULL | No |
+| edu\_background | 学历| VARCHAR(50) | No | NULL | No |
+| habbit | 爱好| JSON | No | NULL | No |
+| have\_consume | 是否有消费| TINYINT(1) | No | | No |
+| year | 生日年份| INT | No | 0 | No |
+| month | 生日月份| INT | No | 0 | No |
+| day | 生日日期| INT | No | 0 | No |
+| other\_params | 其他参数,透传前端传递进来的参数| LONGTEXT | Yes | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | user\_id | Yes |
+| idx\_company\_id | company\_id | No |
+
+
+## members\_invoices
+
+> **会员发票信息表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| invoices\_id | id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| user\_id | 用户id| BIGINT | Yes | NULL | No |
+| invoices\_type | 类型 personal 个人 ;corporate 企业 | VARCHAR(15) | Yes | NULL | No |
+| name | 名称| VARCHAR(255) | Yes | NULL | No |
+| telephone | 电话号码| VARCHAR(20) | No | NULL | No |
+| tax\_number | 税号| VARCHAR(255) | No | NULL | No |
+| business\_address | 单位地址| VARCHAR(255) | No | NULL | No |
+| bank | 开户银行| VARCHAR(255) | No | NULL | No |
+| bank\_account | 银行账号| VARCHAR(255) | No | NULL | No |
+| is\_def | 是否默认| TINYINT(1) | Yes | 0 | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | invoices\_id | Yes |
+
+
+## members\_items\_fav
+
+> **会员收藏商品表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| fav\_id | id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| user\_id | 会员id| BIGINT | Yes | NULL | No |
+| item\_id | 商品id| BIGINT | Yes | NULL | No |
+| item\_name | 商品名称| VARCHAR(100) | Yes | NULL | No |
+| item\_image | 商品图片| LONGTEXT | Yes | NULL | No |
+| item\_price | 价格,单位为‘分’| INT | Yes | NULL | No |
+| item\_type | 商品类型,normal: 普通商品 pointsmall:积分商城| VARCHAR(15) | Yes | normal | No |
+| point | 积分兑换价格,item\_type=pointsmall时必须| INT | No | 0 | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | fav\_id | Yes |
+| idx\_company\_id | company\_id | No |
+| idx\_user\_id | user\_id | No |
+
+
+## members\_msmsend\_log
+
+> **群发短信log**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| log\_id | 用户id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| send\_to\_phones | 收信手机号| LONGTEXT | Yes | NULL | No |
+| sms\_content | 短信内容| VARCHAR(256) | Yes | NULL | No |
+| operator | 操作员信息| VARCHAR(50) | Yes | NULL | No |
+| status | 状态| INT | Yes | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | log\_id | Yes |
+
+
+## members\_offine\_log
+
+> **会员线下实体卡日志**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | | BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司\_ID| BIGINT | Yes | NULL | No |
+| offline\_card\_code | 实体卡\_编号| VARCHAR(255) | Yes | NULL | No |
+| username | 姓名| VARCHAR(50) | No | NULL | No |
+| sex | 性别。0 未知 1 男 2 女| SMALLINT | No | NULL | No |
+| grade\_id | 会员等级| VARCHAR(50) | No | NULL | No |
+| birthday | 出生日期| VARCHAR(100) | No | NULL | No |
+| address | 家庭住址| VARCHAR(255) | No | NULL | No |
+| email | 常用邮箱| VARCHAR(100) | No | NULL | No |
+| created\_time | 入会日期| VARCHAR(100) | No | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_company\_id | company\_id | No |
+
+
+## members\_operate\_log
+
+> **管理员修改员工操作日志表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | | BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| user\_id | 用户id| BIGINT | Yes | NULL | No |
+| operate\_type | log类型,mobile:修改手机号,grade\_id:修改会员等级| VARCHAR(255) | Yes | NULL | No |
+| remarks | 操作备注| VARCHAR(255) | No | NULL | No |
+| old\_data | 修改前历史数据| LONGTEXT | No | NULL | No |
+| new\_data | 新修改的数据| LONGTEXT | Yes | NULL | No |
+| operater | 管理员描述| LONGTEXT | Yes | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | 更新时间| INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+
+
+## members\_protocol\_log
+
+> **会员隐私协议记录表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| log\_id | id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| user\_id | 用户id| BIGINT | Yes | NULL | No |
+| digest | 摘要| VARCHAR(64) | Yes | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | 更新时间| INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | log\_id | Yes |
+| idx\_user\_id | user\_id | No |
+| idx\_company\_id | company\_id | No |
+
+
+## members\_rel\_shop
+
+> **店铺管理会员表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| user\_id | 用户id| BIGINT | Yes | NULL | No |
+| shop\_id | 店铺id| BIGINT | Yes | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | Yes | NULL | No |
+| shop\_type | 店铺类型| VARCHAR(15) | Yes | shop | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_company\_id | company\_id | No |
+| idx\_shop\_id | shop\_id | No |
+| idx\_user\_id | user\_id | No |
+
+
+## members\_rel\_tags
+
+> **会员关联标签表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| tag\_id | 标签id| BIGINT | Yes | NULL | No |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| user\_id | 用户id| BIGINT | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | tag\_id, company\_id, user\_id | Yes |
+
+
+## members\_subscribe\_notice
+
+> **订阅通知**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| sub\_id | 订阅id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| user\_id | 会员id| BIGINT | Yes | NULL | No |
+| open\_id | open\_id| VARCHAR(40) | Yes | NULL | No |
+| source | 订阅来源 wechat:微信 alipay:支付宝| VARCHAR(10) | Yes | wechat | No |
+| rel\_id | 关联id| BIGINT | No | NULL | No |
+| sub\_type | 订阅类型。可选值有 goods:商品缺货通知| VARCHAR(255) | Yes | goods | No |
+| remarks | 订阅备注| VARCHAR(255) | No | NULL | No |
+| sub\_status | 通知状态。可选值有 NO—未通知;SUCCESS-已通知;ERROR-通知失败| VARCHAR(255) | Yes | NO | No |
+| err\_reason | 通知失败原因| VARCHAR(255) | No | NULL | No |
+| updated | | INT | Yes | NULL | No |
+| created | | INT | Yes | NULL | No |
+| distributor\_id | 店铺id| INT | Yes | 0 | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | sub\_id | Yes |
+| idx\_company\_id | company\_id | No |
+| idx\_user\_id | user\_id | No |
+
+
+## members\_tags
+
+> **会员标签库表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| tag\_id | 标签id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| tag\_name | 标签名称| VARCHAR(50) | Yes | NULL | No |
+| description | 标签描述| VARCHAR(255) | No | NULL | No |
+| tag\_icon | 标签icon| LONGTEXT | No | NULL | No |
+| saleman\_id | 自定义标签添加人员id| INT | Yes | 0 | No |
+| tag\_status | 标签类型,online:线上发布, self: 私有自定义| VARCHAR(32) | Yes | online | No |
+| category\_id | 分类id| INT | Yes | 0 | No |
+| self\_tag\_count | 自定义标签下会员数量| INT | Yes | 0 | No |
+| tag\_color | 标签颜色| VARCHAR(50) | Yes | NULL | No |
+| font\_color | 字体颜色| VARCHAR(50) | Yes | NULL | No |
+| distributor\_id | 分销商id| BIGINT UNSIGNED | Yes | 0 | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | Yes | NULL | No |
+| source | 标签来源,self:商户自定义,staff:系统固定员工tag| VARCHAR(255) | Yes | self | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | tag\_id | Yes |
+| idx\_company\_id | company\_id | No |
+| idx\_source | source | No |
+| idx\_tag\_name | tag\_name | No |
+
+
+## members\_tags\_category
+
+> **标签分类**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| category\_id | 标签分类id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| category\_name | 标签分类名称| VARCHAR(50) | Yes | NULL | No |
+| sort | 排序| BIGINT | Yes | 1 | No |
+| company\_id | 公司ID| BIGINT | Yes | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | category\_id | Yes |
+
+
+## members\_wechat\_fans
+
+> **微信粉丝表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| unionid | 第三方unionid| VARCHAR(40) | Yes | NULL | No |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| authorizer\_appid | 公众号appid| VARCHAR(64) | Yes | NULL | No |
+| subscribed | 是否订阅| TINYINT(1) | No | NULL | No |
+| open\_id | open\_id| VARCHAR(40) | Yes | NULL | No |
+| nickname | 昵称| VARCHAR(255) | Yes | NULL | No |
+| sex | 性别。0 未知;1 男;2 女| SMALLINT | No | NULL | No |
+| city | 市| VARCHAR(255) | No | NULL | No |
+| country | 国| VARCHAR(255) | No | NULL | No |
+| province | 省| VARCHAR(255) | No | NULL | No |
+| language | 语言| VARCHAR(255) | No | NULL | No |
+| headimgurl | | VARCHAR(255) | No | NULL | No |
+| subscribe\_time | 订阅时间| INT | No | NULL | No |
+| remark | 备注| VARCHAR(255) | No | NULL | No |
+| groupid | | INT | No | NULL | No |
+| tagids | | VARCHAR(255) | No | NULL | No |
+| tagpop | 列表标签弹出框所需字段| TINYINT(1) | Yes | | No |
+| remarkpop | 列表页备注弹出框所需字段| TINYINT(1) | Yes | | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | unionid | Yes |
+| idx\_company\_id | company\_id | No |
+| idx\_openid | open\_id | No |
+
+
+## members\_wechatusers
+
+> **微信会员表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| authorizer\_appid | 小程序或者公众号appid| VARCHAR(64) | Yes | NULL | No |
+| open\_id | open\_id| VARCHAR(40) | Yes | NULL | No |
+| unionid | union\_id| VARCHAR(40) | Yes | NULL | No |
+| nickname | 昵称| VARCHAR(500) | No | NULL | No |
+| headimgurl | 头像url| VARCHAR(255) | No | NULL | No |
+| inviter\_id | 来源id| INT | No | 0 | No |
+| source\_from | 来源类型 default默认| VARCHAR(255) | No | default | No |
+| need\_transfer | 是否需要迁移。0:不用迁移或迁移完成;1:需要迁移| TINYINT(1) | Yes | 0 | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | company\_id, authorizer\_appid, open\_id, unionid | Yes |
+| idx\_unionid | unionid | No |
+| idx\_openid | open\_id | No |
+
+
+## members\_whitelist
+
+> **会员白名单**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| whitelist\_id | 白名单id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| mobile | 手机号| VARCHAR(255) | Yes | NULL | No |
+| name | 名称| VARCHAR(500) | Yes | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | whitelist\_id | Yes |
+| idx\_company\_id | company\_id | No |
+| idx\_mobile | mobile | No |
+| mobile\_company | mobile, company\_id | Yes |
+
+
+## merchant
+
+> **商户表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | No | NULL | No |
+| settlement\_apply\_id | 入驻申请id| BIGINT | No | NULL | No |
+| merchant\_name | 商户名称| VARCHAR(255) | No | NULL | No |
+| merchant\_type\_id | 商户类型ID| BIGINT | Yes | NULL | No |
+| settled\_type | 商户入驻类型。enterprise:企业;soletrader:个体户| VARCHAR(255) | Yes | | No |
+| social\_credit\_code\_id | 统一社会信用代码| VARCHAR(255) | No | NULL | No |
+| province | | VARCHAR(50) | No | NULL | No |
+| city | | VARCHAR(50) | No | NULL | No |
+| area | | VARCHAR(50) | No | NULL | No |
+| regions\_id | 国家行政区划编码组合,逗号隔开| LONGTEXT | No | NULL | No |
+| address | 详细地址| VARCHAR(255) | No | NULL | No |
+| legal\_name | 联系人| VARCHAR(500) | Yes | NULL | No |
+| legal\_cert\_id | 法人身份证号码| VARCHAR(255) | Yes | | No |
+| legal\_mobile | 法人手机号码| VARCHAR(255) | No | NULL | No |
+| email | 联系邮箱| VARCHAR(255) | No | NULL | No |
+| bank\_acct\_type | 银行账户类型:1-对公;2-对私| VARCHAR(10) | Yes | | No |
+| card\_id\_mask | 结算银行卡号| VARCHAR(255) | No | NULL | No |
+| bank\_name | 结算银行卡所属银行名称| VARCHAR(100) | No | NULL | No |
+| bank\_mobile | 银行预留手机号| VARCHAR(255) | No | NULL | No |
+| license\_url | 营业执照图片url| VARCHAR(255) | No | NULL | No |
+| legal\_certid\_front\_url | 法人手持身份证正面url| VARCHAR(255) | No | NULL | No |
+| legal\_cert\_id\_back\_url | 法人手持身份证反面url| VARCHAR(255) | No | NULL | No |
+| bank\_card\_front\_url | 结算银行卡正面url| VARCHAR(255) | No | NULL | No |
+| contract\_url | 合同url| VARCHAR(255) | No | NULL | No |
+| settled\_succ\_sendsms | 入驻成功发送时间 1:立即 2:商家H5确认入驻协议后| VARCHAR(10) | Yes | 1 | No |
+| audit\_goods | 是否需要平台审核商品 0:不需要 1:需要| TINYINT(1) | Yes | 1 | No |
+| source | 来源 admin:平台管理员;h5:h5入驻;| VARCHAR(30) | No | h5 | No |
+| disabled | 禁用| TINYINT(1) | Yes | 0 | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_company\_id | company\_id | No |
+| idx\_settlement\_apply\_id | settlement\_apply\_id | No |
+| idx\_legal\_mobile | legal\_mobile | No |
+
+
+## merchant\_settlement\_apply
+
+> **商户入驻申请表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | No | NULL | No |
+| mobile | 手机号| VARCHAR(255) | Yes | NULL | No |
+| is\_agree\_agreement | 是否同意入驻协议| TINYINT(1) | Yes | | No |
+| merchant\_type\_id | 商户类型ID| BIGINT | Yes | 0 | No |
+| settled\_type | 入驻类型。enterprise:企业;soletrader:个体户| VARCHAR(255) | No | | No |
+| merchant\_name | 商户名称| VARCHAR(255) | No | NULL | No |
+| social\_credit\_code\_id | 统一社会信用代码| VARCHAR(255) | No | NULL | No |
+| province | | VARCHAR(50) | No | NULL | No |
+| city | | VARCHAR(50) | No | NULL | No |
+| area | | VARCHAR(50) | No | NULL | No |
+| regions\_id | 国家行政区划编码组合,逗号隔开| LONGTEXT | No | NULL | No |
+| address | 详细地址| VARCHAR(255) | No | NULL | No |
+| legal\_name | 法人姓名| VARCHAR(50) | No | NULL | No |
+| legal\_cert\_id | 法人身份证号码| VARCHAR(255) | No | | No |
+| legal\_mobile | 法人手机号码| VARCHAR(255) | No | NULL | No |
+| bank\_acct\_type | 银行账户类型:1-对公;2-对私| VARCHAR(10) | No | | No |
+| card\_id\_mask | 结算银行卡号| VARCHAR(255) | No | NULL | No |
+| bank\_name | 结算银行卡所属银行名称| VARCHAR(100) | No | NULL | No |
+| bank\_mobile | 银行预留手机号| VARCHAR(255) | No | NULL | No |
+| license\_url | 营业执照图片url| VARCHAR(255) | No | NULL | No |
+| legal\_certid\_front\_url | 法人手持身份证正面url| VARCHAR(255) | No | NULL | No |
+| legal\_cert\_id\_back\_url | 法人手持身份证反面url| VARCHAR(255) | No | NULL | No |
+| bank\_card\_front\_url | 结算银行卡正面url| VARCHAR(255) | No | NULL | No |
+| audit\_status | 审核状态:1:审核中 2:审核成功 3:审核驳回| VARCHAR(10) | No | 1 | No |
+| audit\_memo | 审核备注| VARCHAR(500) | No | NULL | No |
+| source | 来源 admin:平台管理员;h5:h5入驻;| VARCHAR(30) | No | h5 | No |
+| audit\_goods | 是否需要平台审核商品 0:不需要 1:需要| TINYINT(1) | Yes | 1 | No |
+| disabled | 禁用| TINYINT(1) | Yes | 0 | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_company\_id | company\_id | No |
+| idx\_audit\_status | audit\_status | No |
+| idx\_settled\_type | settled\_type | No |
+| idx\_source | source | No |
+
+
+## merchant\_type
+
+> **商户类型表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | No | NULL | No |
+| name | 商户类型名称| VARCHAR(50) | Yes | NULL | No |
+| parent\_id | 父级id, 0为顶级| BIGINT | Yes | 0 | No |
+| path | 路径| VARCHAR(255) | No | 0 | No |
+| sort | 排序| BIGINT | No | 0 | No |
+| is\_show | 是否显示| TINYINT(1) | Yes | | No |
+| level | 等级| INT | No | 1 | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_company\_id | company\_id | No |
+| idx\_name | name | No |
+| idx\_parent\_id | parent\_id | No |
+
+
+## offline\_bank\_account
+
+> **线下转账收款账户**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| bank\_account\_name | 收款账户名称| VARCHAR(50) | Yes | NULL | No |
+| bank\_account\_no | 银行账号| VARCHAR(30) | Yes | NULL | No |
+| bank\_name | 开户银行| VARCHAR(100) | Yes | NULL | No |
+| china\_ums\_no | 银联号| VARCHAR(20) | Yes | NULL | No |
+| pic | 图片| VARCHAR(255) | Yes | NULL | No |
+| remark | 备注| VARCHAR(255) | Yes | NULL | No |
+| is\_default | 是否默认| TINYINT(1) | Yes | 0 | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_company\_id | company\_id | No |
+| idx\_is\_default | is\_default | No |
+
+
+## offline\_payment
+
+> **线下转账支付订单**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | 自增ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| order\_id | 订单号| BIGINT | Yes | NULL | No |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| user\_id | 用户id| BIGINT | Yes | NULL | No |
+| shop\_id | 门店id| BIGINT | No | 0 | No |
+| distributor\_id | 分销商id| BIGINT UNSIGNED | Yes | 0 | No |
+| total\_fee | 订单金额,以分为单位| BIGINT UNSIGNED | Yes | NULL | No |
+| pay\_fee | 支付金额,以分为单位| BIGINT UNSIGNED | Yes | NULL | No |
+| check\_status | 审核状态。可选值有 0 待处理;1 已审核;2 已拒绝;9 已取消| SMALLINT | Yes | 0 | No |
+| bank\_account\_id | 收款账户id| BIGINT | Yes | NULL | No |
+| bank\_account\_name | 收款账户名称| VARCHAR(50) | Yes | NULL | No |
+| bank\_account\_no | 银行账号| VARCHAR(30) | Yes | NULL | No |
+| bank\_name | 开户银行| VARCHAR(100) | Yes | NULL | No |
+| china\_ums\_no | 银联号| VARCHAR(20) | Yes | NULL | No |
+| pay\_account\_name | 付款账户名| VARCHAR(100) | No | | No |
+| pay\_account\_bank | 付款银行| VARCHAR(100) | No | | No |
+| pay\_account\_no | 付款账号| VARCHAR(100) | No | | No |
+| pay\_sn | 付款流水单号| VARCHAR(100) | No | | No |
+| voucher\_pic | 付款凭证图片| JSON | Yes | NULL | No |
+| transfer\_remark | 转账备注| VARCHAR(100) | No | | No |
+| operator\_name | 审核人| VARCHAR(50) | No | | No |
+| remark | 审核备注| VARCHAR(500) | No | | No |
+| create\_time | 创建时间| INT | Yes | NULL | No |
+| update\_time | 更新时间| INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_order\_id | order\_id | No |
+| idx\_company\_id | company\_id | No |
+| idx\_user\_id | user\_id | No |
+| idx\_create\_time | create\_time | No |
+| idx\_check\_status | check\_status | No |
+
+
+## onecode\_batchs
+
+> **物品批次表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| batch\_id | 批次ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司ID| BIGINT | Yes | NULL | No |
+| thing\_id | 物品ID| BIGINT | Yes | NULL | No |
+| batch\_number | 批次编号| VARCHAR(255) | Yes | NULL | No |
+| batch\_name | 批次名称| VARCHAR(255) | Yes | NULL | No |
+| batch\_quantity | 批次件数| INT | Yes | NULL | No |
+| show\_trace | 前台是否可以查看流通信息| TINYINT(1) | Yes | 1 | No |
+| trace\_info | 流通信息| JSON | No | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | batch\_id | Yes |
+
+
+## onecode\_things
+
+> **物品表,一物一码的物**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| thing\_id | 物品ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| thing\_name | 物品名称| VARCHAR(255) | Yes | NULL | No |
+| company\_id | 公司ID| BIGINT | Yes | NULL | No |
+| price | 官方建议售价,单位为‘分’| INT | Yes | NULL | No |
+| pic | 图片| VARCHAR(255) | Yes | NULL | No |
+| intro | 图文详情| LONGTEXT | No | NULL | No |
+| batch\_total\_count | 总批次数| INT | Yes | NULL | No |
+| batch\_total\_quantity | 总件数| INT | Yes | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | thing\_id | Yes |
+
+
+## openapi\_developer
+
+> **openapi开发配置表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| developer\_id | developer\_id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| app\_key | app\_key| VARCHAR(255) | Yes | NULL | No |
+| app\_secret | app\_secret| VARCHAR(255) | Yes | NULL | No |
+| external\_base\_uri | 外部请求配置uri| VARCHAR(255) | Yes | NULL | No |
+| external\_app\_key | 外部请求配置app\_key| VARCHAR(255) | Yes | NULL | No |
+| external\_app\_secret | 外部请求配置app\_secret| VARCHAR(255) | Yes | NULL | No |
+| created\_at | | DATETIME | Yes | NULL | No |
+| updated\_at | | DATETIME | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | developer\_id | Yes |
+| idx\_company\_id | company\_id | No |
+
+
+## operator\_bind\_shop
+
+> **员工关联门店表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| operator\_id | | BIGINT | Yes | NULL | No |
+| shop\_id | | BIGINT | Yes | NULL | No |
+| bind\_status | | TINYINT(1) | Yes | NULL | No |
+| is\_shopadmin | | TINYINT(1) | Yes | NULL | No |
+| created\_at | | DATETIME | Yes | NULL | No |
+| updated\_at | | DATETIME | Yes | NULL | No |
+| deleted\_at | | DATETIME | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | operator\_id, shop\_id | Yes |
+| idx\_shop\_id | shop\_id | No |
+
+
+## operator\_data\_pass
+
+> **数据敏感信息申请**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| pass\_id | 审核id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | 0 | No |
+| operator\_id | 操作者id| INT | Yes | 0 | No |
+| status | 审批状态 0:未审批 1:同意 2:驳回| INT | Yes | 0 | No |
+| is\_closed | 关闭状态: 0:未关闭 1:关闭| INT | Yes | 0 | No |
+| start\_time | 生效开始时间| INT | Yes | 0 | No |
+| end\_time | 生效结束时间| INT | Yes | 0 | No |
+| rule | 生效规则 '8-18 *': 每天8到18点有效 '* 1-5':周一到周五全天有效| VARCHAR(255) | Yes | | No |
+| reason | 申请理由| VARCHAR(255) | Yes | | No |
+| remarks | 审批备注| VARCHAR(255) | Yes | | No |
+| create\_time | 创建时间| INT | Yes | 0 | No |
+| approve\_time | 审批时间| INT | Yes | 0 | No |
+| merchant\_id | 商户id| BIGINT | Yes | 0 | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | pass\_id | Yes |
+| idx\_company\_id | company\_id | No |
+| idx\_operator\_id | operator\_id | No |
+| idx\_merchant\_id | merchant\_id | No |
+
+
+## operator\_data\_pass\_log
+
+> **数据敏感信息查看**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| log\_id | id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | 0 | No |
+| operator\_id | 操作者id| INT | Yes | 0 | No |
+| create\_time | 创建时间| INT | Yes | 0 | No |
+| path | 路由地址| VARCHAR(255) | Yes | | No |
+| url | 全地址| VARCHAR(1000) | Yes | | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | log\_id | Yes |
+| idx\_company\_id | company\_id | No |
+| idx\_operator\_id | operator\_id | No |
+
+
+## operator\_license
+
+> **商户许可协议表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | 协议id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| type | 许可协议类型: app| VARCHAR(255) | Yes | NULL | No |
+| title | 许可协议标题| VARCHAR(255) | Yes | NULL | No |
+| content | 许可协议内容| LONGTEXT | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+
+
+## operators
+
+> **账号表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| operator\_id | 账号id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| mobile | 手机号| VARCHAR(255) | Yes | NULL | No |
+| login\_name | 员工账号名| VARCHAR(255) | No | NULL | No |
+| operator\_type | 操作员类型类型。admin:超级管理员;staff:员工;distributor:店铺管理员;dealer:经销商;merchant:商户;supplier:供应商;self\_delivery\_staff:自配送员| VARCHAR(255) | Yes | admin | No |
+| password | | VARCHAR(255) | No | NULL | No |
+| eid | | VARCHAR(255) | No | NULL | No |
+| passport\_uid | | VARCHAR(255) | No | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+| company\_id | 公司id| BIGINT | No | NULL | No |
+| distributor\_ids | 员工管理的店铺id集合| LONGTEXT | No | NULL | No |
+| shop\_ids | 员工管理的门店id集合| LONGTEXT | No | NULL | No |
+| username | 名称| VARCHAR(255) | No | NULL | No |
+| head\_portrait | 头像| VARCHAR(255) | No | NULL | No |
+| regionauth\_id | 区域id| BIGINT | Yes | 0 | No |
+| contact | 联系人姓名| VARCHAR(500) | No | NULL | No |
+| split\_ledger\_info | 分账信息| VARCHAR(255) | No | NULL | No |
+| is\_disable | 是否禁用。1:是 0:否| TINYINT(1) | No | 0 | No |
+| adapay\_open\_account\_time | adapay子商户开户时间| VARCHAR(255) | No | NULL | No |
+| dealer\_parent\_id | 经销商子账号父级id| VARCHAR(255) | No | NULL | No |
+| is\_dealer\_main | 是否是经销商主账号。1:是,0:否| TINYINT(1) | Yes | 1 | No |
+| merchant\_id | 商户id| BIGINT | No | 0 | No |
+| is\_merchant\_main | 是否是商户端超级管理员。1:是,0:否| TINYINT(1) | Yes | 0 | No |
+| is\_distributor\_main | 是否是店铺超级管理员.1:是,0:否| TINYINT(1) | Yes | 0 | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | operator\_id | Yes |
+| idx\_eid | eid | No |
+| idx\_passportuid | passport\_uid | Yes |
+
+
+## order\_epidemic\_register
+
+> **订单疫情登记表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| order\_id | 订单id| BIGINT | Yes | NULL | No |
+| user\_id | 用户ID| BIGINT | Yes | NULL | No |
+| company\_id | 公司id| INT | Yes | NULL | No |
+| distributor\_id | 店铺ID| BIGINT | Yes | NULL | No |
+| name | 登记姓名| LONGTEXT | Yes | NULL | No |
+| mobile | 手机号| LONGTEXT | Yes | NULL | No |
+| cert\_id | 身份证号| LONGTEXT | Yes | NULL | No |
+| temperature | 体温| VARCHAR(30) | Yes | NULL | No |
+| job | 职业| VARCHAR(100) | Yes | NULL | No |
+| symptom | 症状| VARCHAR(50) | Yes | NULL | No |
+| symptom\_des | 症状描述| VARCHAR(500) | No | NULL | No |
+| is\_risk\_area | 是否去过中高风险地区 1:是 0:否| INT | Yes | NULL | No |
+| is\_use | 是否使用这条登记信息 1:是 0:否| INT | Yes | 1 | No |
+| order\_time | 下单时间| INT | Yes | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_company\_id | company\_id | No |
+| idx\_distributor\_id | distributor\_id | No |
+| idx\_order\_id | order\_id | No |
+| idx\_user\_id | user\_id | No |
+
+
+## order\_profit\_sharing
+
+> **订单资金分账**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| order\_profit\_sharing\_id | ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| order\_id | 订单号| BIGINT | Yes | NULL | No |
+| distributor\_id | 分销商id| BIGINT UNSIGNED | No | 0 | No |
+| user\_id | 用户id| BIGINT UNSIGNED | No | 0 | No |
+| pay\_type | 支付方式| VARCHAR(255) | No | | No |
+| channel\_id | 渠道分账账户id| VARCHAR(255) | No | | No |
+| channel\_acct\_id | 渠道分账账户号| VARCHAR(255) | No | | No |
+| total\_fee | 分账金额,以分为单位| INT | No | NULL | No |
+| status | 订单状态。可选值有 0 1 成功 2失败| INT | No | 0 | No |
+| hf\_order\_id | 汇付接口请求id| VARCHAR(255) | No | NULL | No |
+| hf\_order\_date | 汇付接口请求日期| VARCHAR(255) | No | NULL | No |
+| resp\_code | 汇付接口请求响应码| VARCHAR(255) | No | NULL | No |
+| resp\_desc | 汇付接口请求描述| VARCHAR(255) | No | NULL | No |
+| created\_at | | DATETIME | Yes | NULL | No |
+| updated\_at | | DATETIME | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | order\_profit\_sharing\_id | Yes |
+| idx\_company\_id\_order\_id | company\_id, order\_id | No |
+
+
+## order\_profit\_sharing\_details
+
+> **订单资金分账详情**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| order\_profit\_sharing\_detail\_id | ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| sharing\_id | 分账ID| BIGINT | Yes | NULL | No |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| order\_id | 订单号| BIGINT | Yes | NULL | No |
+| distributor\_id | 分销商id| BIGINT UNSIGNED | No | 0 | No |
+| channel\_id | 渠道分账账户id| VARCHAR(255) | No | | No |
+| channel\_acct\_id | 渠道分账账户号| VARCHAR(255) | No | | No |
+| total\_fee | 分账金额,以分为单位| INT | No | 0 | No |
+| created\_at | | DATETIME | Yes | NULL | No |
+| updated\_at | | DATETIME | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | order\_profit\_sharing\_detail\_id | Yes |
+| idx\_company\_id\_order\_id | company\_id, order\_id | No |
+| idx\_sharing\_id | sharing\_id | No |
+
+
+## orders\_associations
+
+> **订单主关联表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| order\_id | 订单号| BIGINT | Yes | NULL | No |
+| authorizer\_appid | 公众号的appid| VARCHAR(64) | No | NULL | No |
+| wxa\_appid | 小程序的appid| VARCHAR(64) | No | NULL | No |
+| title | 订单标题| VARCHAR(255) | No | NULL | No |
+| total\_fee | 订单金额,以分为单位| BIGINT | No | NULL | No |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| shop\_id | 店铺id| BIGINT | No | NULL | No |
+| store\_name | 店铺名称| VARCHAR(100) | No | NULL | No |
+| user\_id | 用户id| BIGINT | No | NULL | No |
+| promoter\_user\_id | 推广员user\_id| BIGINT | No | NULL | No |
+| promoter\_shop\_id | 推广员店铺id,实际为推广员的user\_id| BIGINT | No | NULL | No |
+| source\_id | 订单来源id| BIGINT | No | NULL | No |
+| monitor\_id | 订单监控页面id| BIGINT | No | NULL | No |
+| mobile | 手机号| VARCHAR(255) | No | NULL | No |
+| order\_class | 订单种类。可选值有 normal:普通订单;groups:拼团订单;;community 社区活动订单;bargain:助力订单;seckill:秒杀订单;shopguide:导购订单| VARCHAR(255) | Yes | normal | No |
+| order\_type | 订单类型。可选值有 service 服务业订单;bargain 砍价订单;distribution 分销订单;normal 普通实体订单| VARCHAR(255) | No | NULL | No |
+| order\_status | 订单状态。可选值有 DONE—订单完成;PAYED-已支付;NOTPAY—未支付;CANCEL—已取消;WAIT\_BUYER\_CONFIRM-待用户收货| VARCHAR(255) | Yes | NULL | No |
+| is\_distribution | 是否是分销订单| TINYINT(1) | Yes | | No |
+| total\_rebate | 订单总分销金额,以分为单位| INT UNSIGNED | Yes | 0 | No |
+| delivery\_corp | 快递公司| VARCHAR(255) | No | NULL | No |
+| delivery\_code | 快递单号| VARCHAR(255) | No | NULL | No |
+| delivery\_time | 发货时间| INT | No | NULL | No |
+| member\_discount | 会员折扣金额,以分为单位| INT UNSIGNED | Yes | NULL | No |
+| coupon\_discount | 优惠券抵扣金额,以分为单位| INT UNSIGNED | Yes | NULL | No |
+| coupon\_discount\_desc | 优惠券使用详情| LONGTEXT | No | NULL | No |
+| member\_discount\_desc | 会员折扣使用详情| LONGTEXT | No | NULL | No |
+| delivery\_status | 发货状态。可选值有 DONE—已发货;PENDING—待发货;PARTAIL\_DELIVERY-部分发货| VARCHAR(255) | Yes | PENDING | No |
+| cancel\_status | 取消订单状态。可选值有 NO\_APPLY\_CANCEL 未申请;WAIT\_PROCESS 等待审核;REFUND\_PROCESS 退款处理;SUCCESS 取消成功;FAILS 取消失败| VARCHAR(255) | Yes | NO_APPLY_CANCEL | No |
+| create\_time | 订单创建时间| INT | Yes | NULL | No |
+| end\_time | 订单完成时间| BIGINT | No | NULL | No |
+| update\_time | 订单更新时间| INT | No | NULL | No |
+| fee\_type | 货币类型| VARCHAR(5) | Yes | CNY | No |
+| fee\_rate | 货币汇率| DOUBLE PRECISION | Yes | 1 | No |
+| fee\_symbol | 货币符号| VARCHAR(255) | Yes | ¥ | No |
+| salesman\_id | 导购员ID| BIGINT | No | 0 | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | order\_id | Yes |
+| idx\_company\_id | company\_id | No |
+| idx\_order\_type | order\_type | No |
+| idx\_order\_class | order\_class | No |
+| idx\_user\_id | user\_id | No |
+| idx\_salesman\_id | salesman\_id | No |
+
+
+## orders\_bargain
+
+> **砍价订单表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| order\_id | 订单号| BIGINT | Yes | NULL | No |
+| title | 订单标题| VARCHAR(255) | No | NULL | No |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| user\_id | 用户id| BIGINT | No | NULL | No |
+| bargain\_id | 活动id| BIGINT | Yes | NULL | No |
+| item\_name | 商品名称| VARCHAR(255) | No | NULL | No |
+| item\_price | 商品价格| VARCHAR(255) | Yes | NULL | No |
+| item\_pics | 商品图片| VARCHAR(255) | Yes | NULL | No |
+| item\_num | 购买商品数量| BIGINT | Yes | NULL | No |
+| templates\_id | 运费模板id| INT | Yes | 0 | No |
+| mobile | 手机号| VARCHAR(255) | No | NULL | No |
+| freight\_fee | 运费价格,以分为单位| INT | No | 0 | No |
+| item\_fee | 商品金额,以分为单位| VARCHAR(255) | Yes | NULL | No |
+| total\_fee | 订单金额,以分为单位| BIGINT | Yes | NULL | No |
+| order\_status | 订单状态| VARCHAR(255) | Yes | NULL | No |
+| order\_type | 订单类型| VARCHAR(255) | Yes | bargain | No |
+| trade\_source | 订单来源| VARCHAR(255) | No | NULL | No |
+| receiver\_name | 收货人姓名| VARCHAR(255) | No | NULL | No |
+| receiver\_mobile | 收货人手机号| VARCHAR(255) | No | NULL | No |
+| receiver\_zip | 收货人邮编| VARCHAR(255) | No | NULL | No |
+| receiver\_state | 收货人所在省份| VARCHAR(255) | No | NULL | No |
+| receiver\_city | 收货人所在城市| VARCHAR(255) | No | NULL | No |
+| receiver\_district | 收货人所在地区| VARCHAR(255) | No | NULL | No |
+| receiver\_address | 收货人详细地址| VARCHAR(255) | No | NULL | No |
+| create\_time | 订单创建时间| INT | Yes | NULL | No |
+| update\_time | 订单更新时间| INT | No | NULL | No |
+| auto\_cancel\_time | 订单自动取消时间| VARCHAR(255) | Yes | NULL | No |
+| source\_id | 订单来源id| BIGINT | No | NULL | No |
+| monitor\_id | 订单监控页面id| BIGINT | No | NULL | No |
+| remark | 订单备注| VARCHAR(255) | Yes | NULL | No |
+| member\_discount | 会员折扣金额,以分为单位| INT UNSIGNED | Yes | NULL | No |
+| coupon\_discount | 优惠券抵扣金额,以分为单位| INT UNSIGNED | Yes | NULL | No |
+| coupon\_discount\_desc | 优惠券使用详情| LONGTEXT | No | NULL | No |
+| member\_discount\_desc | 会员折扣使用详情| LONGTEXT | No | NULL | No |
+| fee\_type | 货币类型| VARCHAR(5) | Yes | CNY | No |
+| fee\_rate | 货币汇率| DOUBLE PRECISION | Yes | 1 | No |
+| fee\_symbol | 货币符号| VARCHAR(255) | Yes | ¥ | No |
+| third\_params | 第三方特殊字段存储| JSON | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | order\_id | Yes |
+
+
+## orders\_cancel\_orders
+
+> **已付钱订单取消退款记录表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| cancel\_id | 取消ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| order\_id | 订单号| BIGINT | Yes | NULL | No |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| supplier\_id | 供应商id| BIGINT | Yes | 0 | No |
+| shop\_id | 门店id| BIGINT | No | 0 | No |
+| user\_id | 用户id| BIGINT | Yes | NULL | No |
+| distributor\_id | 分销商id| BIGINT UNSIGNED | Yes | 0 | No |
+| order\_type | 订单类型。可选值有 service 服务业订单;bargain 砍价订单;distribution 分销订单;normal 普通实体订单| VARCHAR(255) | No | NULL | No |
+| total\_fee | 订单金额,以分为单位| BIGINT UNSIGNED | Yes | NULL | No |
+| progress | 处理进度。可选值有 0 待处理;1 已取消;2 处理中;3 已完成; 4 已驳回| SMALLINT | Yes | 0 | No |
+| cancel\_from | 取消来源。可选值有 buyer 用户取消订单;shop 商家取消订单| VARCHAR(255) | Yes | buyer | No |
+| cancel\_reason | 取消原因| VARCHAR(300) | No | NULL | No |
+| shop\_reject\_reason | 商家拒绝理由| VARCHAR(300) | No | NULL | No |
+| refund\_status | 退款状态。可选值有 READY 待审核;AUDIT\_SUCCESS 审核成功待退款;SUCCESS 退款成功;SHOP\_CHECK\_FAILS 商家审核不通过;CANCEL 撤销退款;PROCESSING 已发起退款等待到账;FAILS 退款失败;| VARCHAR(30) | Yes | READY | No |
+| create\_time | 订单创建时间| INT | Yes | NULL | No |
+| update\_time | 订单更新时间| INT | No | NULL | No |
+| fee\_type | 货币类型| VARCHAR(5) | Yes | CNY | No |
+| fee\_rate | 货币汇率| DOUBLE PRECISION | Yes | 1 | No |
+| fee\_symbol | 货币符号| VARCHAR(255) | Yes | ¥ | No |
+| point | 消费积分| INT UNSIGNED | No | 0 | No |
+| pay\_type | 支付方式| VARCHAR(255) | No | | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | cancel\_id | Yes |
+| idx\_order\_id | order\_id | No |
+| idx\_company\_id | company\_id | No |
+| idx\_user\_id | user\_id | No |
+
+
+## orders\_cart
+
+> **购物车**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| cart\_id | ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| user\_id | 用户id| BIGINT | Yes | NULL | No |
+| promoter\_user\_id | 推广员user\_id| BIGINT | No | NULL | No |
+| user\_ident | 会员ident,会员信息和session生成的唯一值| VARCHAR(50) | No | NULL | No |
+| shop\_type | 店铺类型;distributor:店铺,shop:门店,community:社区, mall:商城, drug 药品清单| VARCHAR(255) | No | distributor | No |
+| shop\_id | 店铺id 或者 社区id| BIGINT UNSIGNED | No | 0 | No |
+| activity\_type | 活动类型| VARCHAR(255) | No | NULL | No |
+| activity\_id | 活动id| BIGINT UNSIGNED | No | 0 | No |
+| marketing\_type | 促销类型| VARCHAR(255) | No | NULL | No |
+| marketing\_id | 促销id| BIGINT UNSIGNED | No | 0 | No |
+| item\_type | 商品类型。可选值有 normal 实体类商品;services 服务类商品, normal\_gift:实体赠品,services\_gift:服务类赠品| VARCHAR(255) | Yes | normal | No |
+| item\_id | 商品id| BIGINT | Yes | NULL | No |
+| items\_id | 组合商品关联商品id| VARCHAR(255) | No | | No |
+| item\_name | 商品名称| VARCHAR(255) | No | NULL | No |
+| pics | 图片| VARCHAR(1024) | No | NULL | No |
+| num | 购买商品数量| INT UNSIGNED | Yes | NULL | No |
+| price | 购买商品价格| INT | Yes | 0 | No |
+| point | 积分兑换价格| INT | No | 0 | No |
+| wxa\_appid | 小程序appid| VARCHAR(255) | No | NULL | No |
+| is\_checked | 购物车是否选中| TINYINT(1) | Yes | 1 | No |
+| is\_plus\_buy | 是加价购商品| TINYINT(1) | Yes | | No |
+| source\_type | 购物车数据来源:scancode:扫码加入购物车, normal:正常加入购物车,salesperson:业务员导购下单| VARCHAR(255) | Yes | normal | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | cart\_id | Yes |
+| idx\_item\_id | item\_id | No |
+| idx\_user\_id | user\_id | No |
+| idx\_promoter\_user\_id | promoter\_user\_id | No |
+| idx\_company\_id | company\_id | No |
+| idx\_shop\_type | shop\_type | No |
+| idx\_wxa\_appid | wxa\_appid | No |
+| idx\_is\_checked | is\_checked | No |
+
+
+## orders\_delivery
+
+> **订单发货单表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| orders\_delivery\_id | orders\_delivery\_id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| supplier\_id | 供应商id| INT | Yes | 0 | No |
+| order\_id | 订单id| BIGINT | Yes | NULL | No |
+| user\_id | 用户id| BIGINT | Yes | NULL | No |
+| delivery\_corp | 快递公司| VARCHAR(255) | Yes | NULL | No |
+| delivery\_corp\_name | 快递公司名称| VARCHAR(255) | Yes | NULL | No |
+| delivery\_code | 快递单号| VARCHAR(255) | Yes | NULL | No |
+| delivery\_time | 发货时间| INT | Yes | NULL | No |
+| delivery\_corp\_source | 快递代码来源| VARCHAR(255) | No | NULL | No |
+| receiver\_mobile | 收货人手机号| VARCHAR(255) | No | NULL | No |
+| package\_type | 订单包裹类型 batch 整单发货 sep拆单发货| VARCHAR(255) | No | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+| self\_delivery\_operator\_id | 自配送员id| BIGINT | No | 0 | No |
+| delivery\_remark | 配送备注| VARCHAR(255) | No | NULL | No |
+| delivery\_pics | 配送图片| JSON | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | orders\_delivery\_id | Yes |
+| idx\_company\_id | company\_id | No |
+| idx\_order\_id | order\_id | No |
+| idx\_supplier\_id | supplier\_id | No |
+
+
+## orders\_delivery\_items
+
+> **订单发货单商品表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| orders\_delivery\_items\_id | orders\_delivery\_items\_id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| order\_id | 订单id| BIGINT | Yes | NULL | No |
+| order\_items\_id | 订单items表id| BIGINT | Yes | NULL | No |
+| orders\_delivery\_id | 订单发货单id| BIGINT | Yes | NULL | No |
+| goods\_id | 产品id| BIGINT | Yes | NULL | No |
+| item\_id | 商品id| BIGINT | Yes | NULL | No |
+| num | 发货数量| INT | Yes | NULL | No |
+| item\_name | 商品名称| VARCHAR(255) | Yes | NULL | No |
+| pic | 商品图片| VARCHAR(255) | Yes | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | orders\_delivery\_items\_id | Yes |
+| idx\_company\_id | company\_id | No |
+| idx\_order\_id | order\_id | No |
+| idx\_orders\_delivery\_id | orders\_delivery\_id | No |
+
+
+## orders\_diagnosis
+
+> **问诊单**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | 自增id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| order\_id | 订单号| VARCHAR(64) | Yes | NULL | No |
+| user\_id | 用户id| BIGINT | No | NULL | No |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| kuaizhen\_store\_id | 580门店Id| BIGINT | Yes | NULL | No |
+| distributor\_id | 店铺id| BIGINT | Yes | NULL | No |
+| service\_type | 服务类型,0为图文,1为视频| SMALLINT | Yes | NULL | No |
+| is\_examine | 是否需要审方(0为不需要,1为需要)| SMALLINT | Yes | NULL | No |
+| is\_pregnant\_woman | 用药人是否孕妇(0为否,1为是)| SMALLINT | Yes | NULL | No |
+| is\_lactation | 用药人是否哺乳期0为否,1为是| SMALLINT | Yes | NULL | No |
+| souce\_from | 来源(0为微信小程序,1为APP,2为H5,3为支付宝小程序)| SMALLINT | Yes | 0 | No |
+| user\_family\_name | 用药人姓名| VARCHAR(255) | Yes | NULL | No |
+| user\_family\_id\_card | 用药人身份证号| VARCHAR(255) | Yes | | No |
+| user\_family\_age | 用药人年龄| INT | Yes | NULL | No |
+| user\_family\_gender | 用药人性别1-男,2-女| SMALLINT | Yes | NULL | No |
+| user\_family\_phone | 用药人手机号码| VARCHAR(255) | Yes | NULL | No |
+| relationship | 用药人与问诊人关系(1本人 2父母 3配偶 4子女 5其他)| SMALLINT | Yes | NULL | No |
+| before\_ai\_data\_list | AI问诊前5道题| LONGTEXT | No | NULL | No |
+| prescription\_status | 开方状态,1未开方,2已开方,3医生拒绝开方| SMALLINT | Yes | 1 | No |
+| prescription\_refuse\_reason | 拒绝开方原因| VARCHAR(255) | Yes | | No |
+| location\_url | 跳转问诊H5页面地址| LONGTEXT | Yes | | No |
+| status | 问诊单状态(1为进行中,2为已完成,5-AI问诊时取消)| SMALLINT | Yes | 1 | No |
+| end\_time | 问诊结束时间| INT | Yes | 0 | No |
+| cancel\_time | 问诊取消时间| INT | Yes | 0 | No |
+| doctor\_office | 医生科室| VARCHAR(255) | Yes | | No |
+| doctor\_name | 医生姓名| VARCHAR(255) | Yes | | No |
+| hospital\_name | 互联网医院名称| VARCHAR(255) | Yes | | No |
+| first\_visit\_list | 首诊信息| LONGTEXT | No | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_order\_id | order\_id | No |
+| idx\_company\_id | company\_id | No |
+| idx\_user\_id | user\_id | No |
+| idx\_distributor\_id | distributor\_id | No |
+| idx\_status | status | No |
+
+
+## orders\_invoice
+
+> **订单发票表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | 自增id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| invoice\_apply\_bn | 发票申请单号| VARCHAR(64) | Yes | NULL | No |
+| user\_id | 用户id| BIGINT | Yes | NULL | No |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| regionauth\_id | 区域id| BIGINT | No | NULL | No |
+| order\_id | 订单id,多订单以英文逗号分隔| VARCHAR(255) | Yes | NULL | No |
+| invoice\_type | 开票类型,企业enterprise,和个人individual| VARCHAR(20) | Yes | NULL | No |
+| company\_title | 公司抬头| VARCHAR(255) | Yes | NULL | No |
+| company\_tax\_number | 公司税号| VARCHAR(64) | No | NULL | No |
+| company\_address | 公司地址| VARCHAR(255) | No | NULL | No |
+| company\_telephone | 公司电话| VARCHAR(20) | No | NULL | No |
+| bank\_name | 开户银行| VARCHAR(255) | No | NULL | No |
+| bank\_account | 开户账号| VARCHAR(64) | No | NULL | No |
+| email | 电子邮箱| VARCHAR(255) | No | NULL | No |
+| mobile | 手机号码| VARCHAR(20) | No | NULL | No |
+| invoice\_status | 开票状态:待开票:pending,开票中:inProgress,开票成功:success,已作废:waste,开票失败:failed| VARCHAR(20) | Yes | pending | No |
+| invoice\_amount | 开票金额,以分为单位| INT | No | 0 | No |
+| invoice\_file\_url | 发票文件地址| VARCHAR(255) | No | NULL | No |
+| invoice\_method | 开票类型:线上和线下| VARCHAR(20) | Yes | online | No |
+| invoice\_source | 开票来源:user客户端,oms| VARCHAR(20) | Yes | NULL | No |
+| remark | 备注| VARCHAR(255) | No | NULL | No |
+| is\_oms | 是否推送OMS,0是未推送,1是已推送| INT | Yes | 0 | No |
+| create\_time | 创建时间| INT | Yes | NULL | No |
+| update\_time | 更新时间| INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_invoice\_apply\_bn | invoice\_apply\_bn | No |
+| idx\_company\_id | company\_id | No |
+| idx\_user\_id | user\_id | No |
+| idx\_order\_id | order\_id | No |
+
+
+## orders\_invoice\_item
+
+> **订单发票商品表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | 自增id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| user\_id | 用户id| BIGINT | Yes | NULL | No |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| invoice\_id | 关联发票表id| BIGINT | Yes | NULL | No |
+| invoice\_apply\_bn | 发票申请单号| VARCHAR(64) | Yes | NULL | No |
+| order\_id | 订单号| VARCHAR(64) | Yes | NULL | No |
+| oid | OMS系统订单ID| VARCHAR(64) | No | NULL | No |
+| item\_name | 商品名称| VARCHAR(255) | Yes | NULL | No |
+| item\_bn | 商品编码| VARCHAR(64) | No | NULL | No |
+| main\_img | 商品主图| VARCHAR(255) | No | NULL | No |
+| spec\_info | 商品规格| VARCHAR(255) | No | NULL | No |
+| num | 数量| INT | Yes | NULL | No |
+| amount | 金额,以分为单位| INT | Yes | NULL | No |
+| create\_time | 创建时间| INT | Yes | NULL | No |
+| update\_time | 更新时间| INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_invoice\_id | invoice\_id | No |
+| idx\_invoice\_apply\_bn | invoice\_apply\_bn | No |
+| idx\_company\_id | company\_id | No |
+| idx\_user\_id | user\_id | No |
+| idx\_order\_id | order\_id | No |
+
+
+## orders\_invoice\_log
+
+> **订单发票日志表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | 自增id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| invoice\_id | 关联发票表id| BIGINT | Yes | NULL | No |
+| operator\_type | 操作类型| VARCHAR(20) | Yes | NULL | No |
+| user\_id | 用户id| BIGINT | No | NULL | No |
+| operator\_id | 操作人id| BIGINT | No | NULL | No |
+| operator\_content | 操作内容| JSON | No | NULL | No |
+| create\_time | 创建时间| INT | Yes | NULL | No |
+| update\_time | 更新时间| INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_invoice\_id | invoice\_id | No |
+| idx\_user\_id | user\_id | No |
+| idx\_operator\_id | operator\_id | No |
+
+
+## orders\_invoices
+
+> **发票表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | 自增id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| invoice\_id | 关联发票表id| BIGINT | Yes | NULL | No |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| invoice\_type | 开票类型,红red,和蓝blue| VARCHAR(20) | Yes | NULL | No |
+| invoice\_no | 发票号码| VARCHAR(255) | No | NULL | No |
+| invoice\_code | 发票代码| VARCHAR(255) | No | NULL | No |
+| invoice\_time | 开票时间| VARCHAR(255) | No | NULL | No |
+| create\_time | 创建时间| INT | Yes | NULL | No |
+| update\_time | 更新时间| INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_invoice\_id | invoice\_id | No |
+| idx\_company\_id | company\_id | No |
+
+
+## orders\_items\_rel\_profit
+
+> **订单商品分润表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| order\_id | 订单id| BIGINT | Yes | NULL | No |
+| item\_id | 商品id| BIGINT | Yes | NULL | No |
+| order\_profit\_status | 0 无效分润 1 冻结分润 2 分润成功| BIGINT | Yes | NULL | No |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| total\_fee | 订单金额,以分为单位| BIGINT | No | NULL | No |
+| profit\_type | 分润类型 1 总部分润 2 自营门店分润 3 加盟门店分润| SMALLINT | Yes | NULL | No |
+| user\_id | 购买用户id| BIGINT | Yes | 0 | No |
+| dealer\_id | 区域经销商id| BIGINT | Yes | 0 | No |
+| distributor\_id | 拉新门店id| BIGINT | Yes | 0 | No |
+| order\_distributor\_id | 下单当前所在门店id| BIGINT | Yes | 0 | No |
+| distributor\_nid | 拉新导购当前所在门店id| BIGINT | Yes | 0 | No |
+| seller\_id | 拉新导购id| BIGINT | Yes | 0 | No |
+| popularize\_distributor\_id | 推广门店id| BIGINT | Yes | 0 | No |
+| popularize\_seller\_id | 推广导购id| BIGINT | Yes | 0 | No |
+| proprietary | 判断拉新门店 0 无门店 1 自营门店 2 加盟门店| BIGINT | Yes | 0 | No |
+| popularize\_proprietary | 判断推广门店 0 无门店 1 自营门店 2 加盟门店| BIGINT | Yes | 0 | No |
+| dealers | 区域经销商分成| BIGINT | Yes | 0 | No |
+| distributor | 拉新门店分成| BIGINT | Yes | 0 | No |
+| seller | 拉新导购分成(分给门店)| BIGINT | Yes | 0 | No |
+| popularize\_distributor | 推广门店分成| BIGINT | Yes | 0 | No |
+| popularize\_seller | 推广导购分成(分给门店)| BIGINT | Yes | 0 | No |
+| commission | 总部手续费| BIGINT | Yes | 0 | No |
+| rule | 分润规则| JSON | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_orderid\_userid\_companyid | order\_id, user\_id, company\_id | No |
+
+
+## orders\_merchant\_trade
+
+> **企业付款账单**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| merchant\_trade\_id | 商家支付交易单号| VARCHAR(32) | Yes | NULL | No |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| rel\_scene\_id | 关联支付场景ID| VARCHAR(255) | No | NULL | No |
+| rel\_scene\_name | 关联支付场景名称| VARCHAR(255) | No | NULL | No |
+| mch\_appid | 商户APPId| VARCHAR(32) | No | NULL | No |
+| mchid | 商户号| VARCHAR(32) | No | NULL | No |
+| payment\_action | 商户支付方式| VARCHAR(32) | Yes | NULL | No |
+| check\_name | 是否强验用户姓名| VARCHAR(11) | Yes | NULL | No |
+| mobile | 支付手机号| VARCHAR(32) | No | NULL | No |
+| re\_user\_name | 收款用户姓名| VARCHAR(255) | No | NULL | No |
+| user\_id | 用户id| BIGINT | Yes | NULL | No |
+| open\_id | 用户openId| VARCHAR(255) | No | NULL | No |
+| amount | 付款金额(分)| BIGINT | Yes | NULL | No |
+| payment\_desc | 付款备注| VARCHAR(255) | Yes | NULL | No |
+| spbill\_create\_ip | ip地址| VARCHAR(255) | Yes | NULL | No |
+| status | 支付状态。可选值有 NOT\_PAY:未付款;PAYING:付款中;SUCCESS:付款成功;FAIL:付款失败| VARCHAR(255) | Yes | NULL | No |
+| payment\_no | 微信支付订单号| VARCHAR(64) | No | NULL | No |
+| payment\_time | 微信支付成功时间| VARCHAR(255) | No | NULL | No |
+| error\_code | 支付错误code码| VARCHAR(255) | No | NULL | No |
+| error\_desc | 支付错误描述| VARCHAR(255) | No | NULL | No |
+| create\_time | 订单创建时间| INT | Yes | NULL | No |
+| update\_time | 订单更新时间| INT | No | NULL | No |
+| fee\_type | 货币类型| VARCHAR(5) | Yes | CNY | No |
+| cur\_fee\_type | 系统配置货币类型| VARCHAR(5) | Yes | CNY | No |
+| cur\_fee\_rate | 系统配置货币汇率| DOUBLE PRECISION | Yes | 1 | No |
+| cur\_fee\_symbol | 系统配置货币符号| VARCHAR(255) | Yes | ¥ | No |
+| cur\_pay\_fee | 系统货币支付金额| VARCHAR(255) | Yes | NULL | No |
+| hf\_order\_id | 汇付请求订单号| VARCHAR(255) | No | NULL | No |
+| hf\_order\_date | 汇付请求日期| VARCHAR(255) | No | NULL | No |
+| hf\_cash\_type | 汇付取现方式 T0:T0取现; T1:T1取现 D1:D1取现| VARCHAR(255) | No | NULL | No |
+| user\_cust\_id | 汇付商户客户号| VARCHAR(255) | No | NULL | No |
+| bind\_card\_id | 汇付取现银行卡id| VARCHAR(255) | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | merchant\_trade\_id | Yes |
+
+
+## orders\_normal\_orders
+
+> **实体订单表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| order\_id | 订单号| BIGINT | Yes | NULL | No |
+| title | 订单标题| VARCHAR(255) | No | NULL | No |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| shop\_id | 门店id| BIGINT | No | 0 | No |
+| cost\_fee | 商品成本价,以分为单位| INT UNSIGNED | Yes | NULL | No |
+| commission\_fee | 佣金(分)| INT | Yes | 0 | No |
+| user\_id | 用户id| BIGINT | No | NULL | No |
+| act\_id | 营销活动ID,团购ID,社区拼团ID,秒杀活动ID等| BIGINT | No | NULL | No |
+| mobile | 手机号| VARCHAR(255) | No | NULL | No |
+| order\_class | 订单种类。可选值有 normal:普通订单;groups:拼团订单;;community 社区活动订单;bargain:助力订单;seckill:秒杀订单;shopguide:导购订单;pointsmall:积分商城;excard:兑换券| VARCHAR(255) | Yes | normal | No |
+| freight\_fee | 运费价格,以分为单位| INT | No | 0 | No |
+| freight\_type | 运费类型-用于积分商城 cash:现金 point:积分| VARCHAR(255) | Yes | cash | No |
+| item\_fee | 商品金额,以分为单位| VARCHAR(255) | Yes | NULL | No |
+| total\_fee | 订单金额,以分为单位| VARCHAR(255) | Yes | NULL | No |
+| market\_fee | 销售价总金额,以分为单位| VARCHAR(255) | No | NULL | No |
+| step\_paid\_fee | 分阶段付款已支付金额,以分为单位| INT UNSIGNED | No | 0 | No |
+| total\_rebate | 订单总分销金额,以分为单位| INT UNSIGNED | Yes | 0 | No |
+| distributor\_id | 分销商id| BIGINT UNSIGNED | Yes | 0 | No |
+| is\_rate | 是否评价| TINYINT(1) | No | 0 | No |
+| receipt\_type | 收货方式。可选值有 【logistics 物流】【ziti 店铺自提】【dada 达达同城配】【merchant 商家自配】| VARCHAR(255) | Yes | logistics | No |
+| ziti\_code | 店铺自提码| BIGINT | Yes | 0 | No |
+| ziti\_status | 店铺自提状态。可选值有 PENDING:等待自提;DONE:自提完成;NOTZITI:自提完成; APPROVE:审核通过,药品自提需要审核| VARCHAR(255) | No | NOTZITI | No |
+| self\_delivery\_status | 店铺自配送状态。可选值有 CONFIRMING:等待确认;RECEIVEORDER:已接单;PACKAGED:已打包;DELIVERING:配送中;DONE:已送达;NOTMERCHANT:不是自配送;| VARCHAR(255) | No | NOTMERCHANT | No |
+| order\_status | 订单状态。可选值有 DONE—订单完成;NOTPAY—未支付;PART\_PAYMENT-部分付款;WAIT\_GROUPS\_SUCCESS-等待拼团成功;PAYED-已支付;CANCEL—已取消;WAIT\_BUYER\_CONFIRM-待用户收货| VARCHAR(255) | Yes | NULL | No |
+| pay\_status | 支付状态。可选值有 NOTPAY—未支付;PAYED-已支付;ADVANCE\_PAY-预付款完成;TAIL\_PAY-支付尾款中| VARCHAR(255) | Yes | NOTPAY | No |
+| order\_source | 订单来源。可选值有 member-用户自主下单;shop-商家代客下单 salesperson:业务员导购下单| VARCHAR(255) | No | member | No |
+| order\_holder | 订单归属。可选值 self-自营订单;distributor-商家订单;supplier-供应商订单;self\_supplier-自营和供应商订单| VARCHAR(20) | No | self | No |
+| order\_type | 订单类型。可选值有 normal:普通实体订单| VARCHAR(255) | Yes | normal | No |
+| auto\_cancel\_time | 订单自动取消时间| VARCHAR(255) | Yes | NULL | No |
+| auto\_finish\_time | 订单自动完成时间| VARCHAR(255) | No | NULL | No |
+| is\_distribution | 是否分销订单| TINYINT(1) | Yes | | No |
+| source\_id | 订单来源id| BIGINT | No | NULL | No |
+| monitor\_id | 订单监控页面id| BIGINT | No | NULL | No |
+| salesman\_id | 导购员ID| BIGINT | No | 0 | No |
+| delivery\_corp | 快递公司| VARCHAR(255) | No | NULL | No |
+| delivery\_corp\_source | 快递代码来源| VARCHAR(255) | No | NULL | No |
+| delivery\_code | 快递单号| VARCHAR(255) | No | NULL | No |
+| delivery\_img | 快递发货凭证| VARCHAR(255) | No | NULL | No |
+| delivery\_time | 发货时间| INT | No | NULL | No |
+| end\_time | 订单完成时间| BIGINT | No | NULL | No |
+| delivery\_status | 发货状态。可选值有 DONE—已发货;PENDING—待发货;PARTAIL-部分发货| VARCHAR(255) | Yes | PENDING | No |
+| cancel\_status | 取消订单状态。可选值有 NO\_APPLY\_CANCEL 未申请;WAIT\_PROCESS 等待审核;REFUND\_PROCESS 退款处理;SUCCESS 取消成功;FAILS 取消失败| VARCHAR(255) | Yes | NO_APPLY_CANCEL | No |
+| receiver\_name | 收货人姓名| VARCHAR(500) | No | NULL | No |
+| receiver\_mobile | 收货人手机号| VARCHAR(255) | No | NULL | No |
+| receiver\_zip | 收货人邮编| VARCHAR(255) | No | NULL | No |
+| receiver\_state | 收货人所在省份| VARCHAR(255) | No | NULL | No |
+| receiver\_city | 收货人所在城市| VARCHAR(255) | No | NULL | No |
+| receiver\_district | 收货人所在地区| VARCHAR(255) | No | NULL | No |
+| receiver\_address | 收货人详细地址| LONGTEXT | No | NULL | No |
+| member\_discount | 会员折扣金额,以分为单位| INT UNSIGNED | Yes | NULL | No |
+| coupon\_discount | 优惠券抵扣金额,以分为单位| INT UNSIGNED | Yes | NULL | No |
+| discount\_fee | 订单优惠金额,以分为单位| INT | Yes | 0 | No |
+| discount\_info | 订单优惠详情| LONGTEXT | No | NULL | No |
+| coupon\_discount\_desc | 优惠券使用详情| LONGTEXT | No | NULL | No |
+| member\_discount\_desc | 会员折扣使用详情| LONGTEXT | No | NULL | No |
+| create\_time | 订单创建时间| INT | Yes | NULL | No |
+| update\_time | 订单更新时间| INT | No | NULL | No |
+| fee\_type | 货币类型| VARCHAR(5) | Yes | CNY | No |
+| fee\_rate | 货币汇率| DOUBLE PRECISION | Yes | 1 | No |
+| fee\_symbol | 货币符号| VARCHAR(255) | Yes | ¥ | No |
+| item\_point | 商品消费总积分| INT UNSIGNED | No | 0 | No |
+| point | 消费积分| INT UNSIGNED | No | 0 | No |
+| pay\_type | 支付方式| VARCHAR(255) | No | | No |
+| pay\_channel | adapay支付渠道| VARCHAR(255) | No | | No |
+| remark | 订单备注| VARCHAR(255) | No | NULL | No |
+| third\_params | 第三方特殊字段存储| JSON | No | NULL | No |
+| invoice | 发票信息| JSON | No | NULL | No |
+| invoice\_number | 发票号| VARCHAR(255) | No | | No |
+| is\_invoiced | 是否已开发票| TINYINT(1) | No | 0 | No |
+| send\_point | 是否分发积分0否 1是| INT | Yes | 0 | No |
+| is\_online\_order | 是否为线上订单| TINYINT(1) | Yes | 1 | No |
+| is\_profitsharing | 是否分账订单 1不分账 2分账| INT | No | 1 | No |
+| profitsharing\_status | 分账状态 1未分账 2已分账| INT | No | 1 | No |
+| profitsharing\_rate | 分账费率| INT | No | NULL | No |
+| order\_auto\_close\_aftersales\_time | 自动关闭售后时间| INT | No | 0 | No |
+| type | 订单类型,0普通订单,1跨境订单,....其他| INT | Yes | 0 | No |
+| taxable\_fee | 计税总价,以分为单位| INT UNSIGNED | Yes | 0 | No |
+| identity\_id | 身份证号码| VARCHAR(18) | No | | No |
+| identity\_name | 身份证姓名| VARCHAR(20) | No | | No |
+| total\_tax | 总税费| INT | Yes | 0 | No |
+| audit\_status | 跨境订单审核状态 approved成功 processing审核中 rejected审核拒绝| VARCHAR(255) | No | processing | No |
+| audit\_msg | 审核意见| VARCHAR(255) | No | 正在审核订单 | No |
+| point\_fee | 积分抵扣金额,以分为单位| INT | No | 0 | No |
+| point\_use | 积分抵扣使用的积分数| INT | No | 0 | No |
+| uppoint\_use | 积分抵扣商家补贴的积分数(基础积分-使用的升值积分)| INT UNSIGNED | No | 0 | No |
+| point\_up\_use | 积分抵扣使用的积分升值数| INT UNSIGNED | No | 0 | No |
+| get\_point\_type | 获取积分类型,0 老订单按订单完成时送,1 新订单按下单时计算送| INT | Yes | 0 | No |
+| pack | 包装| VARCHAR(255) | No | NULL | No |
+| is\_shopscreen | 是否门店订单| TINYINT(1) | No | | No |
+| is\_logistics | 门店缺货商品总部快递发货| TINYINT(1) | No | | No |
+| get\_points | 订单获取积分| INT UNSIGNED | No | 0 | No |
+| extra\_points | 订单获取额外积分| INT UNSIGNED | No | 0 | No |
+| bonus\_points | 购物赠送积分| INT UNSIGNED | No | 0 | No |
+| bind\_auth\_code | 订单订单验证码| VARCHAR(10) | No | | No |
+| sale\_salesman\_distributor\_id | 销售导购店铺id| BIGINT UNSIGNED | Yes | 0 | No |
+| bind\_salesman\_id | 绑定导购员ID| BIGINT | No | 0 | No |
+| bind\_salesman\_distributor\_id | 绑定导购店铺id| BIGINT UNSIGNED | Yes | 0 | No |
+| chat\_id | 客户群ID| VARCHAR(32) | No | | No |
+| is\_consumption | 是否处理了增加消费金额,0未处理,1已处理| INT | Yes | 0 | No |
+| app\_pay\_type | 支付类型 01:微信正扫 02:支付宝正扫 03:银联正扫 05:微信公众号 06:支付宝小程序/生活号 07:微信小程序 08:微信正扫(直连) 09:微信app支付(直连) 10:银联app支付 11:apple支付 12:微信H5支付(直连) 13:支付宝app支付(直连)| VARCHAR(255) | No | 07 | No |
+| distributor\_remark | 商家备注| VARCHAR(255) | Yes | NULL | No |
+| merchant\_id | 商户id| BIGINT | Yes | 0 | No |
+| self\_delivery\_operator\_id | 自配送员id| BIGINT | No | 0 | No |
+| self\_delivery\_fee | 操作者id| INT | No | 0 | No |
+| self\_delivery\_time | 自配送预约时间| INT | No | 0 | No |
+| self\_delivery\_end\_time | 自配送送达时间| BIGINT | No | NULL | No |
+| subdistrict\_parent\_id | 街道id| BIGINT | Yes | NULL | No |
+| subdistrict\_id | 社区id| BIGINT | Yes | NULL | No |
+| building\_number | 楼栋号| VARCHAR(20) | Yes | NULL | No |
+| house\_number | 门牌号| VARCHAR(20) | Yes | NULL | No |
+| operator\_id | 操作者id| INT | No | 0 | No |
+| left\_aftersales\_num | 剩余可申请售后的数量| INT UNSIGNED | Yes | 0 | No |
+| source\_from | 订单来源 pc,h5,wxapp,aliapp,unknow,dianwu| VARCHAR(10) | No | NULL | No |
+| supplier\_id | 供应商id| INT | Yes | 0 | No |
+| original\_order\_id | 拆单前原始订单号| BIGINT | No | NULL | No |
+| offline\_payment\_status | 线下支付状态:-1-未上传转账凭证;0-待处理;1-已审核;2-已拒绝;9-已取消| SMALLINT | No | -1 | No |
+| prescription\_status | 开方状态,0不需要开方,1未开方,2已开方,处方药开方后才能继续支付| INT | Yes | 0 | No |
+| invoice\_status | 开票状态。可选值有 DONE—已开票;PENDING—待开票;PARTAIL-部分开票| VARCHAR(255) | Yes | PENDING | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | order\_id | Yes |
+| idx\_order\_type | order\_type | No |
+| idx\_order\_class | order\_class | No |
+| idx\_shop\_id | shop\_id | No |
+| idx\_distributor\_id | distributor\_id | No |
+| idx\_company\_id | company\_id | No |
+| idx\_user\_id | user\_id | No |
+| idx\_salesman\_id | salesman\_id | No |
+| idx\_order\_source | order\_source | No |
+| idx\_create\_time | create\_time | No |
+| idx\_merchant\_id | merchant\_id | No |
+| idx\_supplier\_id | supplier\_id | No |
+| idx\_order\_holder | order\_holder | No |
+| idx\_66c5819c17fbd9b018f167a7dfd85ba9 | order\_status, pay\_type, is\_profitsharing, profitsharing\_status, order\_auto\_close\_aftersales\_time | No |
+| idx\_prescription\_status | prescription\_status | No |
+
+
+## orders\_normal\_orders\_items
+
+> **实体订单明细表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| order\_id | 订单号| BIGINT | Yes | NULL | No |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| user\_id | 用户id| BIGINT | Yes | NULL | No |
+| goods\_id | 产品id| BIGINT | Yes | NULL | No |
+| item\_id | 商品id| BIGINT | Yes | NULL | No |
+| item\_bn | 商品编码| VARCHAR(255) | No | NULL | No |
+| goods\_bn | 商品spu编码| VARCHAR(255) | No | NULL | No |
+| cost\_fee | 商品成本价,以分为单位| INT UNSIGNED | Yes | NULL | No |
+| commission\_fee | 佣金(分)| INT | Yes | 0 | No |
+| shop\_id | 门店id| BIGINT | No | 0 | No |
+| act\_id | 营销活动ID,团购ID,社区拼团ID,秒杀活动ID等| BIGINT | No | NULL | No |
+| is\_total\_store | 是否是总部库存(true:总部库存,false:店铺库存)| TINYINT(1) | No | 1 | No |
+| distributor\_id | 分销商id| BIGINT UNSIGNED | Yes | 0 | No |
+| item\_name | 商品名称| VARCHAR(255) | No | NULL | No |
+| item\_unit | 商品计量单位| VARCHAR(255) | No | NULL | No |
+| pic | 商品图片| VARCHAR(255) | No | NULL | No |
+| num | 购买商品数量| INT UNSIGNED | Yes | NULL | No |
+| price | 单价,以分为单位| INT UNSIGNED | Yes | NULL | No |
+| cost\_price | 原价价,以分为单位| INT UNSIGNED | Yes | 0 | No |
+| market\_price | 原价,以分为单位| INT UNSIGNED | Yes | 0 | No |
+| total\_fee | 订单金额,以分为单位| INT UNSIGNED | Yes | NULL | No |
+| rebate | 单个分销金额,以分为单位| INT UNSIGNED | Yes | 0 | No |
+| total\_rebate | 总分销金额,以分为单位| INT UNSIGNED | Yes | 0 | No |
+| templates\_id | 运费模板id| INT | Yes | 0 | No |
+| item\_fee | 商品总金额,以分为单位| INT UNSIGNED | Yes | NULL | No |
+| member\_discount | 会员折扣金额,以分为单位| INT UNSIGNED | Yes | NULL | No |
+| coupon\_discount | 优惠券抵扣金额,以分为单位| INT UNSIGNED | Yes | NULL | No |
+| discount\_fee | 订单优惠金额,以分为单位| INT | Yes | 0 | No |
+| discount\_info | 订单优惠详情| LONGTEXT | No | NULL | No |
+| add\_service\_info | 订单商品附加信息| LONGTEXT | No | NULL | No |
+| order\_item\_type | 订单商品类型,normal:正常商品,gift: 赠品, plus\_buy: 加价购商品| VARCHAR(255) | Yes | normal | No |
+| coupon\_discount\_desc | 优惠券使用详情| LONGTEXT | No | NULL | No |
+| member\_discount\_desc | 会员折扣使用详情| LONGTEXT | No | NULL | No |
+| is\_rate | 是否评价| TINYINT(1) | No | 0 | No |
+| auto\_close\_aftersales\_time | 自动关闭售后时间| INT | No | NULL | No |
+| create\_time | 订单创建时间| INT | Yes | NULL | No |
+| update\_time | 订单更新时间| INT | No | NULL | No |
+| delivery\_corp | 快递公司| VARCHAR(255) | No | NULL | No |
+| delivery\_code | 快递单号| VARCHAR(255) | No | NULL | No |
+| delivery\_img | 快递发货凭证| VARCHAR(255) | No | NULL | No |
+| delivery\_time | 发货时间| INT | No | NULL | No |
+| delivery\_status | 发货状态。可选值有 DONE—已发货;PENDING—待发货| VARCHAR(255) | Yes | PENDING | No |
+| aftersales\_status | 售后状态。可选值有 WAIT\_SELLER\_AGREE 0 等待商家处理;WAIT\_BUYER\_RETURN\_GOODS 1 商家接受申请,等待消费者回寄;WAIT\_SELLER\_CONFIRM\_GOODS 2 消费者回寄,等待商家收货确认;SELLER\_REFUSE\_BUYER 3 售后驳回;SELLER\_SEND\_GOODS 4 卖家重新发货 换货完成;REFUND\_SUCCESS 5 退款成功;REFUND\_CLOSED 6 退款关闭;CLOSED 7 售后关闭| VARCHAR(255) | No | NULL | No |
+| refunded\_fee | 退款金额,以分为单位| INT UNSIGNED | Yes | 0 | No |
+| fee\_type | 货币类型| VARCHAR(5) | Yes | CNY | No |
+| fee\_rate | 货币汇率| DOUBLE PRECISION | Yes | 1 | No |
+| fee\_symbol | 货币符号| VARCHAR(255) | Yes | ¥ | No |
+| item\_point | 商品积分| INT UNSIGNED | No | 0 | No |
+| point | 商品总积分| INT UNSIGNED | No | 0 | No |
+| item\_spec\_desc | 商品规格描述| LONGTEXT | No | NULL | No |
+| volume | 商品体积| INT UNSIGNED | No | 0 | No |
+| weight | 商品重量| DOUBLE PRECISION | No | 0 | No |
+| type | 订单类型,0普通订单,1跨境订单,....其他| INT | Yes | 0 | No |
+| tax\_rate | 商品税率| VARCHAR(6) | No | | No |
+| cross\_border\_tax | 商品跨境税费| INT | Yes | 0 | No |
+| origincountry\_name | 产地国名称| VARCHAR(50) | No | | No |
+| origincountry\_img\_url | 产地国国旗| VARCHAR(255) | No | | No |
+| point\_fee | 积分抵扣时分摊的积分的金额,以分为单位| INT | No | 0 | No |
+| is\_logistics | 门店缺货商品总部快递发货| TINYINT(1) | No | | No |
+| share\_points | 积分抵扣时分摊的积分值| INT | No | 0 | No |
+| up\_share\_points | 积分抵扣时分摊的积分升值数| INT UNSIGNED | No | 0 | No |
+| taxable\_fee | 计税总价,以分为单位| INT UNSIGNED | Yes | 0 | No |
+| delivery\_item\_num | 发货单发货数量| INT | No | NULL | No |
+| cancel\_item\_num | 取消数量| INT | No | NULL | No |
+| get\_points | 商品获取积分| INT UNSIGNED | No | 0 | No |
+| supplier\_id | 供应商id| INT | Yes | 0 | No |
+| is\_prescription | 是否为处方药商品,0否 1是| INT | Yes | 0 | No |
+| is\_invoice | 是否开票,0否 1是| INT | Yes | 0 | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_company\_order\_id | company\_id, order\_id | No |
+| idx\_order\_id | order\_id | No |
+
+
+## orders\_operate\_logs
+
+> **订单操作日志表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | 订单操作日志| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| order\_id | 订单号| BIGINT | Yes | NULL | No |
+| company\_id | 公司Id| BIGINT | Yes | NULL | No |
+| operator\_id | 操作员Id| BIGINT | No | NULL | No |
+| supplier\_id | 供应商ID| BIGINT | Yes | 0 | No |
+| operator | 操作员| VARCHAR(255) | No | NULL | No |
+| operator\_role | 操作角色,buyer:购买者;seller:卖家;shopadmin:平台操作员;system:系统| VARCHAR(100) | No | NULL | No |
+| behavior | 操作行为,create:创建;update:修改;payed:支付;delivery:发货;confirm:收货;cancel:取消;refund:退款;reship:退货;exchange:换货;mark:修改备注;finish:完成;| VARCHAR(100) | No | NULL | No |
+| log\_text | 操作内容| LONGTEXT | No | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | 更新时间| INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| order\_id | order\_id | No |
+| operator\_id | operator\_id | No |
+| company\_id | company\_id | No |
+
+
+## orders\_prescription
+
+> **问诊单开方数据**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | 自增id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| order\_id | 订单号| VARCHAR(64) | Yes | NULL | No |
+| diagnosis\_id | 问诊单id| BIGINT | Yes | NULL | No |
+| user\_id | 用户id| BIGINT | No | NULL | No |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| distributor\_id | 店铺id| BIGINT | Yes | NULL | No |
+| prescription\_id | 快诊580处方ID| BIGINT | Yes | NULL | No |
+| hospital\_name | 互联网医院名称| VARCHAR(255) | Yes | NULL | No |
+| kuaizhen\_store\_id | 580门店Id| BIGINT | Yes | NULL | No |
+| kuaizhen\_store\_name | 580门店名称| VARCHAR(255) | Yes | NULL | No |
+| kuaizhen\_diagnosis\_id | 580问诊单ID| BIGINT | Yes | NULL | No |
+| doctor\_sign\_time | 医生签署时间(时间戳)| BIGINT | Yes | NULL | No |
+| doctor\_office | 医生科室| VARCHAR(255) | Yes | NULL | No |
+| doctor\_id | 医生id| BIGINT | Yes | NULL | No |
+| doctor\_name | 医生姓名| VARCHAR(255) | Yes | NULL | No |
+| user\_family\_name | 就诊人姓名| VARCHAR(255) | Yes | NULL | No |
+| user\_family\_phone | 就诊人手机号码| VARCHAR(255) | Yes | | No |
+| user\_family\_age | 就诊人年龄| INT | Yes | NULL | No |
+| user\_family\_gender | 就诊人性别,0未知,1男,2女| SMALLINT | Yes | NULL | No |
+| user\_family\_id\_card | 用药人身份证号| VARCHAR(255) | Yes | | No |
+| tags | 诊断标签| VARCHAR(255) | Yes | NULL | No |
+| status | 处方状态(1正常 2已作废)| SMALLINT | Yes | NULL | No |
+| memo | 备注| VARCHAR(255) | Yes | | No |
+| remarks | 补充说明| VARCHAR(255) | Yes | | No |
+| reason | 审核不通过的理由(可能为空)| VARCHAR(255) | Yes | | No |
+| dst\_file\_path | 处方图片地址| VARCHAR(255) | Yes | NULL | No |
+| serial\_no | 处方编号| VARCHAR(255) | Yes | NULL | No |
+| drug\_rsp\_list | 药品信息说明| LONGTEXT | No | NULL | No |
+| audit\_status | 处方审核状态,1未审核,2审核通过,3审核不通过,4不需要审方| SMALLINT | Yes | 1 | No |
+| audit\_time | 审方时间| INT | Yes | 0 | No |
+| audit\_reason | 审方不通过原因| VARCHAR(255) | Yes | | No |
+| audit\_apothecary\_name | 审方药师名称| VARCHAR(255) | Yes | | No |
+| is\_deleted | 是否已废弃, 0否 1是| SMALLINT | Yes | 0 | No |
+| delete\_time | 废弃时间| INT | Yes | 0 | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_order\_id | order\_id | No |
+| idx\_diagnosis\_id | diagnosis\_id | No |
+| idx\_company\_id | company\_id | No |
+| idx\_user\_id | user\_id | No |
+| idx\_distributor\_id | distributor\_id | No |
+| idx\_status | status | No |
+| idx\_is\_deleted | is\_deleted | No |
+| idx\_user\_family\_name | user\_family\_name | No |
+| idx\_user\_family\_phone | user\_family\_phone | No |
+| idx\_user\_family\_id\_card | user\_family\_id\_card | No |
+| idx\_doctor\_name | doctor\_name | No |
+| idx\_serial\_no | serial\_no | No |
+| idx\_audit\_apothecary\_name | audit\_apothecary\_name | No |
+| idx\_audit\_status | audit\_status | No |
+
+
+## orders\_process\_log
+
+> **订单流程记录表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| order\_id | 订单id| BIGINT | Yes | NULL | No |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| supplier\_id | 供应商id| INT | Yes | 0 | No |
+| operator\_type | 操作类型 用户:user 导购:salesperon 管理员:admin 系统:system| VARCHAR(20) | Yes | NULL | No |
+| operator\_id | 操作员id| BIGINT | No | 0 | No |
+| operator\_name | 操作员名字| VARCHAR(255) | No | | No |
+| remarks | 订单操作备注| VARCHAR(30) | Yes | NULL | No |
+| detail | 订单操作detail| LONGTEXT | Yes | NULL | No |
+| params | 提交参数| JSON | No | NULL | No |
+| is\_show | C端是否可见| TINYINT(1) | No | | No |
+| pics | 图片记录| JSON | No | NULL | No |
+| delivery\_remark | 订单发货备注| VARCHAR(255) | No | NULL | No |
+| create\_time | 订单操作时间| INT | Yes | NULL | No |
+| update\_time | 订单操作| INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_order\_id | order\_id | No |
+
+
+## orders\_rel\_chinaumspay\_division
+
+> **订单关联银联商务分账表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| order\_id | 订单号| BIGINT | Yes | NULL | No |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| status | 划付状态 0:待处理、1:已上传、2:无需处理| VARCHAR(255) | No | NULL | No |
+| create\_time | 订单创建时间| INT | Yes | NULL | No |
+| update\_time | 订单更新时间| INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_company | company\_id | No |
+| idx\_order\_id | order\_id | No |
+
+
+## orders\_rel\_dada
+
+> **实体订单关联达达同城配表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| order\_id | 订单号| BIGINT | Yes | NULL | No |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| dada\_status | 达达状态 0:待处理,1:待接单,2:待取货,3:配送中,4:已完成,5:已取消,9:妥投异常之物品返回中,10:妥投异常之物品返回完成,100: 骑士到店,1000:创建达达运单失败| INT | Yes | 0 | No |
+| dada\_delivery\_no | 达达平台订单号| VARCHAR(50) | No | NULL | No |
+| dada\_cancel\_from | 订单取消原因来源 1:达达回调配送员取消;2:达达回调商家主动取消;3:达达回调系统或客服取消;11:商城系统取消;12:商城商家主动取消;13:商城消费者主动取消;| INT | Yes | NULL | No |
+| dm\_id | 达达配送员id| INT | No | NULL | No |
+| dm\_name | 配送员姓名| VARCHAR(20) | No | NULL | No |
+| dm\_mobile | 配送员手机号| VARCHAR(255) | No | NULL | No |
+| pickup\_time | 取货时间| INT | Yes | NULL | No |
+| accept\_time | 商家接单时间| INT | Yes | NULL | No |
+| delivered\_time | 送达时间| INT | Yes | NULL | No |
+| create\_time | 创建时间| INT | Yes | NULL | No |
+| update\_time | 更新时间| INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_order\_id | order\_id | No |
+| idx\_company\_id | company\_id | No |
+| idx\_dada\_status | dada\_status | No |
+
+
+## orders\_rel\_jushuitan
+
+> **订单关联聚水潭表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| order\_id | 订单号| BIGINT | Yes | NULL | No |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| o\_id | 聚水潭内部单号| BIGINT | Yes | NULL | No |
+| created | 创建时间| INT | Yes | NULL | No |
+| updated | 更新时间| INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_company | company\_id | No |
+| idx\_order\_id | order\_id | No |
+
+
+## orders\_rel\_profit
+
+> **订单分润表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| order\_id | 订单id| BIGINT | Yes | NULL | No |
+| order\_profit\_status | 0 无效分润 1 冻结分润 2 分润成功| BIGINT | Yes | NULL | No |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| total\_fee | 分润完成之后金额,以分为单位| BIGINT | No | NULL | No |
+| pay\_fee | 支付订单金额,以分为单位| BIGINT | No | NULL | No |
+| profit\_type | 分润类型 1 总部分润 2 自营门店分润 3 加盟门店分润| SMALLINT | Yes | NULL | No |
+| user\_id | 购买用户id| BIGINT | Yes | 0 | No |
+| dealer\_id | 区域经销商id| BIGINT | Yes | 0 | No |
+| distributor\_id | 拉新门店id| BIGINT | Yes | 0 | No |
+| order\_distributor\_id | 下单当前所在门店id| BIGINT | Yes | 0 | No |
+| distributor\_nid | 拉新导购当前所在门店id| BIGINT | Yes | 0 | No |
+| seller\_id | 拉新导购id| BIGINT | Yes | 0 | No |
+| popularize\_distributor\_id | 推广门店id| BIGINT | Yes | 0 | No |
+| popularize\_seller\_id | 推广导购id| BIGINT | Yes | 0 | No |
+| proprietary | 判断拉新门店 0 无门店 1 自营门店 2 加盟门店| BIGINT | Yes | 0 | No |
+| popularize\_proprietary | 判断推广门店 0 无门店 1 自营门店 2 加盟门店| BIGINT | Yes | 0 | No |
+| dealers | 区域经销商分成| BIGINT | Yes | 0 | No |
+| distributor | 拉新门店分成| BIGINT | Yes | 0 | No |
+| seller | 拉新导购分成(分给门店)| BIGINT | Yes | 0 | No |
+| popularize\_distributor | 推广门店分成| BIGINT | Yes | 0 | No |
+| popularize\_seller | 推广导购分成(分给门店)| BIGINT | Yes | 0 | No |
+| commission | 总部手续费| BIGINT | Yes | 0 | No |
+| rule | 分润规则| JSON | No | NULL | No |
+| plan\_close\_time | 计划结算时间| BIGINT | No | 0 | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+
+
+## orders\_rel\_promotions
+
+> **商品促销和订单关联表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| moid | 主订单id| BIGINT | Yes | NULL | No |
+| coid | 子订单id| BIGINT | Yes | NULL | No |
+| user\_id | 用户id| BIGINT | No | NULL | No |
+| order\_type | 订单类型| VARCHAR(255) | Yes | normal | No |
+| item\_id | 商品id| BIGINT | Yes | NULL | No |
+| item\_name | 商品名称| VARCHAR(255) | No | NULL | No |
+| item\_type | 商品类型| VARCHAR(255) | No | normal | No |
+| activity\_id | 活动id| BIGINT | Yes | NULL | No |
+| activity\_name | 活动名称| VARCHAR(255) | No | NULL | No |
+| activity\_type | 活动类型| VARCHAR(255) | Yes | NULL | No |
+| activity\_tag | 活动标签| VARCHAR(255) | No | NULL | No |
+| activity\_desc | 活动描述| LONGTEXT | No | NULL | No |
+| shop\_id | 店铺id| BIGINT | No | 0 | No |
+| shop\_type | 店铺类型| VARCHAR(255) | No | shop | No |
+| status | 促销应用状态,valid:有效, invalid:失效| VARCHAR(255) | No | valid | No |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_moid | moid | No |
+| idx\_user\_id | user\_id | No |
+| idx\_activity\_id | activity\_id | No |
+| idx\_shop\_id | shop\_id | No |
+| idx\_company\_id | company\_id | No |
+
+
+## orders\_rel\_supplier
+
+> **实体订单关联供应商**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| order\_id | 订单号| BIGINT | Yes | NULL | No |
+| supplier\_id | 供应商id| INT | Yes | NULL | No |
+| freight\_fee | 运费价格,以分为单位| INT | No | 0 | No |
+| create\_time | 创建时间| INT | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_supplier\_order\_id | supplier\_id, order\_id | No |
+
+
+## orders\_rel\_ziti
+
+> **实体订单关联自提信息**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| order\_id | 订单号| BIGINT | Yes | NULL | No |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| name | 自提点名称| VARCHAR(255) | Yes | NULL | No |
+| lng | 纬度| VARCHAR(255) | No | NULL | No |
+| lat | 经度| VARCHAR(255) | No | NULL | No |
+| province | 省| VARCHAR(255) | No | NULL | No |
+| city | 市| VARCHAR(255) | No | NULL | No |
+| area | 区| VARCHAR(255) | No | NULL | No |
+| address | 地址| VARCHAR(255) | No | NULL | No |
+| contract\_phone | 联系电话| VARCHAR(20) | Yes | NULL | No |
+| pickup\_date | 自提日期| VARCHAR(20) | Yes | NULL | No |
+| pickup\_time | 自提时间| VARCHAR(20) | Yes | NULL | No |
+| create\_time | 创建时间| INT | Yes | NULL | No |
+| update\_time | 更新时间| INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_order\_id | order\_id | No |
+
+
+## orders\_rights
+
+> **权益表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| rights\_id | 权益ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| user\_id | 用户id| BIGINT | No | NULL | No |
+| company\_id | 公司ID| BIGINT | Yes | NULL | No |
+| can\_reservation | 是否可预约| TINYINT(1) | Yes | | No |
+| rights\_name | 权益标题| VARCHAR(255) | Yes | NULL | No |
+| rights\_subname | 权益子标题| VARCHAR(255) | No | NULL | No |
+| rights\_from | 权益来源| VARCHAR(255) | No | NULL | No |
+| operator\_desc | 操作员信息| VARCHAR(255) | No | NULL | No |
+| mobile | 手机号| VARCHAR(255) | Yes | NULL | No |
+| total\_num | 服务商品原始总次数,0标示无限制| BIGINT | Yes | 0 | No |
+| total\_consum\_num | 总消耗次数| BIGINT | Yes | 0 | No |
+| start\_time | 权益开始时间| INT | Yes | NULL | No |
+| end\_time | 权益结束时间| INT | Yes | NULL | No |
+| order\_id | 订单号| BIGINT | No | NULL | No |
+| label\_infos | 权益的物料信息json结构| LONGTEXT | No | NULL | No |
+| status | 权益状态; valid:有效的, expire:过期的; invalid:失效的| VARCHAR(255) | Yes | valid | No |
+| is\_not\_limit\_num | 限制核销次数,1:不限制;2:限制| INT | Yes | 2 | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | rights\_id | Yes |
+
+
+## orders\_rights\_detail
+
+> **权益详细ID**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| rights\_id | 权益ID| BIGINT | Yes | NULL | No |
+| item\_id | 商品id| BIGINT | Yes | NULL | No |
+| user\_id | 用户id| BIGINT | No | NULL | No |
+| company\_id | 公司ID| BIGINT | Yes | NULL | No |
+| item\_name | 商品名称| VARCHAR(255) | Yes | NULL | No |
+| label\_id | 数值属性ID| BIGINT | Yes | NULL | No |
+| label\_name | 数值属性名称| VARCHAR(255) | Yes | NULL | No |
+| total\_num | 服务商品原始总次数| BIGINT | Yes | NULL | No |
+| total\_consum\_num | 总消耗次数| BIGINT | Yes | 0 | No |
+| start\_time | 权益开始时间| VARCHAR(255) | Yes | NULL | No |
+| end\_time | 权益结束时间| VARCHAR(255) | Yes | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | rights\_id, item\_id | Yes |
+
+
+## orders\_rights\_log
+
+> **权益日志表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| rights\_log\_id | 权益日志ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| rights\_id | 权益ID| BIGINT | Yes | NULL | No |
+| company\_id | 公司ID| BIGINT | Yes | NULL | No |
+| user\_id | 用户id| BIGINT | No | NULL | No |
+| shop\_id | 门店ID| VARCHAR(255) | Yes | NULL | No |
+| rights\_name | 权益标题| VARCHAR(255) | Yes | NULL | No |
+| rights\_subname | 权益子标题| VARCHAR(255) | No | NULL | No |
+| consum\_num | 消耗次数| BIGINT | Yes | NULL | No |
+| attendant | 服务员| VARCHAR(255) | Yes | NULL | No |
+| salesperson\_mobile | 核销员手机号| VARCHAR(255) | Yes | NULL | No |
+| end\_time | 权益结束时间| VARCHAR(255) | Yes | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | 更新时间| INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | rights\_log\_id | Yes |
+
+
+## orders\_rights\_operate\_logs
+
+> **权益操作日志表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | 权益延期操作日志| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| rights\_id | 权益ID| BIGINT | Yes | NULL | No |
+| user\_id | 用户id| BIGINT | No | NULL | No |
+| company\_id | 公司ID| BIGINT | Yes | NULL | No |
+| remark | 操作备注| VARCHAR(255) | Yes | NULL | No |
+| operator\_id | 操作员Id| BIGINT | No | NULL | No |
+| operator | 操作员| VARCHAR(255) | No | NULL | No |
+| original\_date | 延期之前日期| INT | No | NULL | No |
+| delay\_date | 延期之后日期| INT | No | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+
+
+## orders\_rights\_transfer\_logs
+
+> **权益转赠表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | 权益延期操作日志| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| rights\_id | 权益ID| BIGINT | Yes | NULL | No |
+| user\_id | 用户id| BIGINT | Yes | NULL | No |
+| transfer\_user\_id | 转让用户id| BIGINT | Yes | NULL | No |
+| mobile | 用户手机号| VARCHAR(255) | Yes | NULL | No |
+| transfer\_mobile | 转让用户手机号| VARCHAR(255) | Yes | NULL | No |
+| company\_id | 公司ID| BIGINT | Yes | NULL | No |
+| remark | 操作备注| VARCHAR(255) | Yes | NULL | No |
+| operator\_id | 操作员Id| BIGINT | No | NULL | No |
+| operator | 操作员| VARCHAR(255) | No | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | 更新时间| INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+
+
+## orders\_user\_invoice
+
+> **订单发票**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | 自增id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| order\_id | 订单号| VARCHAR(64) | Yes | NULL | No |
+| user\_id | 用户id| BIGINT | No | NULL | No |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| status | 是否开票| INT | Yes | 0 | No |
+| invoice | 发票信息| LONGTEXT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_order\_id | order\_id | No |
+| idx\_company\_id | company\_id | No |
+| idx\_user\_id | user\_id | No |
+
+
+## pages\_open\_screen\_ad
+
+> **开屏广告设置**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | 设置id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| ad\_material | 广告素材| VARCHAR(255) | Yes | NULL | No |
+| is\_enable | 是否启用0否,1是| INT | Yes | 0 | No |
+| show\_time | 曝光设置:first,always| VARCHAR(255) | Yes | first | No |
+| position | 倒计时位置:right\_top,right\_bottom| VARCHAR(255) | Yes | 0 | No |
+| is\_jump | 是否跳过0否,1是| INT | Yes | 0 | No |
+| material\_type | 素材类型1图片,2视频| INT | Yes | 1 | No |
+| waiting\_time | 等待时间,秒| INT | Yes | 0 | No |
+| ad\_url | 广告链接| VARCHAR(1000) | Yes | NULL | No |
+| app | 设置应用, all 全部,app APP,wapp 小程序 | VARCHAR(100) | Yes | 0 | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| ix\_id | id | No |
+| ix\_company\_id | company\_id | No |
+
+
+## pages\_template
+
+> **页面模板表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| pages\_template\_id | | BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | | BIGINT | Yes | NULL | No |
+| distributor\_id | 店铺id| INT | No | 0 | No |
+| template\_title | 模板名称| VARCHAR(50) | Yes | NULL | No |
+| template\_name | 模板客户端名称| VARCHAR(50) | Yes | NULL | No |
+| template\_pic | 模板封面| VARCHAR(255) | No | NULL | No |
+| template\_type | 模板类型 0总部 1同步模板 2门店自有模板| INT | Yes | 0 | No |
+| element\_edit\_status | 可编辑挂件状态 1启用 2未启用| INT | No | 2 | No |
+| status | 启用状态 1启用 2未启用| INT | No | 2 | No |
+| timer\_status | 定时启用状态 1启用 2未启用| INT | No | 2 | No |
+| timer\_time | 定时模板切换时间| INT | No | NULL | No |
+| template\_status\_modify\_time | 模板状态变更时间| INT | No | NULL | No |
+| weapp\_pages | 模版页面| VARCHAR(255) | No | NULL | No |
+| template\_content | 模板内容| LONGTEXT | No | NULL | No |
+| created\_at | | DATETIME | Yes | NULL | No |
+| updated\_at | | DATETIME | Yes | NULL | No |
+| deleted\_at | | DATETIME | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | pages\_template\_id | Yes |
+| idx\_company\_id | company\_id | No |
+
+
+## pages\_template\_set
+
+> **模板设置表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | | BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | | BIGINT | Yes | NULL | No |
+| index\_type | 首页类型 1总部首页 2店铺首页| INT | No | 1 | No |
+| pages\_template\_id | 关联模版ID| BIGINT | No | 0 | No |
+| is\_enforce\_sync | 店铺首页同步状态 1强制同步 2非强制同步| INT | No | 2 | No |
+| is\_open\_recommend | 开启猜你喜欢 1开启 2关闭| INT | No | 2 | No |
+| is\_open\_wechatapp\_location | 开启小程序定位 1开启 2关闭| INT | No | 1 | No |
+| is\_open\_scan\_qrcode | 开启扫码功能 1开启 2关闭| INT | No | 2 | No |
+| is\_open\_official\_account | 开启关注公众号组件 1开启 2关闭| INT | No | 2 | No |
+| tab\_bar | 小程序菜单设置| LONGTEXT | No | NULL | No |
+| created\_at | | DATETIME | Yes | NULL | No |
+| updated\_at | | DATETIME | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_company\_id | company\_id | No |
+
+
+## point\_member
+
+> **用户积分表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| user\_id | 用户id| BIGINT | Yes | NULL | No |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| point | 积分个数| BIGINT | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | user\_id, company\_id | Yes |
+
+
+## point\_member\_log
+
+> **用户积分记录表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | 积分记录id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| user\_id | 用户id| BIGINT | Yes | NULL | No |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| journal\_type | 积分交易类型,1:注册送积分 2.推荐送分 3.充值返积分 4.推广注册返积分 5.积分换购 6.储值兑换积分 7.订单返积分 8.会员等级返佣 9.取消订处理积分 10.售后处理积分 11.大转盘抽奖送积分 12:管理员手动调整积分 13.外部开发者同步进来的会员积分 14:会员信息导入,初始化积分 15:会员信息导入,更新会员调整积分; 16 活动报名送积分| SMALLINT | Yes | NULL | No |
+| point\_desc | 积分描述| VARCHAR(255) | Yes | | No |
+| income | 入账积分| INT UNSIGNED | Yes | 0 | No |
+| outcome | 出账积分| INT UNSIGNED | Yes | 0 | No |
+| order\_id | 订单号(充值)| VARCHAR(64) | No | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+| external\_id | 外部唯一标识,外部调用方自定义的值| VARCHAR(50) | Yes | | No |
+| operater | 操作员名称| VARCHAR(50) | Yes | | No |
+| operater\_remark | 操作员备注| VARCHAR(255) | Yes | | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_company\_id\_external\_id | company\_id, external\_id | No |
+| idx\_company\_id\_operater | company\_id, operater | No |
+
+
+## pointsmall\_items
+
+> **积分商品表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| item\_id | 商品ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| item\_type | 商品类型,services:服务商品,normal: 普通商品| VARCHAR(15) | Yes | services | No |
+| item\_category | 商品主类目| VARCHAR(15) | No | null | No |
+| consume\_type | 核销类型,every:每个物料都要核销(例如3个物料要核销3次),all:所有物料作为一个整体核销一次(例如3个物料只需要核销1次)| VARCHAR(15) | Yes | every | No |
+| item\_name | 商品名称| VARCHAR(255) | Yes | NULL | No |
+| item\_bn | 商品编号| VARCHAR(255) | Yes | NULL | No |
+| barcode | 商品条形码| VARCHAR(255) | Yes | NULL | No |
+| brief | 简洁的描述| VARCHAR(255) | Yes | NULL | No |
+| company\_id | 公司ID| BIGINT | Yes | NULL | No |
+| price | 价格,单位为‘分’| INT | Yes | NULL | No |
+| cost\_price | 价格,单位为‘分’| INT | No | 0 | No |
+| item\_unit | 商品计量单位| VARCHAR(255) | No | NULL | No |
+| special\_type | 商品特殊类型 drug 处方药 normal 普通商品| VARCHAR(255) | No | normal | No |
+| item\_address\_province | 产地省| VARCHAR(255) | No | NULL | No |
+| item\_address\_city | 产地市| VARCHAR(255) | No | NULL | No |
+| regions\_id | 产地地区id| VARCHAR(255) | No | NULL | No |
+| store | 库存| INT | No | NULL | No |
+| sales | 销量| INT | No | 0 | No |
+| approve\_status | 商品状态 onsale 前台可销售,offline\_sale前端不展示,instock 不可销售| VARCHAR(255) | Yes | NULL | No |
+| audit\_status | 审核状态 approved成功 processing审核中 rejected审核拒绝| VARCHAR(255) | No | approved | No |
+| audit\_reason | 审核拒绝原因| LONGTEXT | No | NULL | No |
+| market\_price | 原价,单位为‘分’| INT | Yes | NULL | No |
+| goods\_function | 商品功能| VARCHAR(255) | No | NULL | No |
+| goods\_series | 商品系列| VARCHAR(255) | No | NULL | No |
+| goods\_color | 商品颜色| VARCHAR(255) | No | NULL | No |
+| goods\_brand | 商品品牌| VARCHAR(255) | No | NULL | No |
+| is\_default | 商品是否为默认商品| TINYINT(1) | No | 1 | No |
+| default\_item\_id | 默认商品ID| BIGINT | No | 0 | No |
+| goods\_id | 产品ID| BIGINT | No | 0 | No |
+| nospec | 商品是否为单规格| VARCHAR(255) | No | true | No |
+| weight | 商品重量| DOUBLE PRECISION | No | 0 | No |
+| sort | 商品排序| INT | Yes | 0 | No |
+| templates\_id | 运费模板id| INT | No | NULL | No |
+| pics | 图片| JSON | Yes | NULL | No |
+| video\_type | 视频类型 local:本地视频 tencent:腾讯视频| VARCHAR(255) | Yes | local | No |
+| videos | 视频| LONGTEXT | No | NULL | No |
+| video\_pic\_url | 视频封面图| LONGTEXT | No | NULL | No |
+| intro | 图文详情| LONGTEXT | No | NULL | No |
+| purchase\_agreement | 购买协议| LONGTEXT | No | NULL | No |
+| is\_show\_specimg | 详情页是否显示规格图片| TINYINT(1) | Yes | | No |
+| enable\_agreement | 开启购买协议| TINYINT(1) | Yes | | No |
+| date\_type | 有效期的类型, DATE\_TYPE\_FIX\_TIME\_RANGE:指定日期范围内, DATE\_TYPE\_FIX\_TERM:固定天数后| VARCHAR(255) | No | NULL | No |
+| begin\_date | 有效期开始时间| INT | No | NULL | No |
+| end\_date | 有效期结束时间| INT | No | NULL | No |
+| fixed\_term | 有效期的有效天数| INT | No | NULL | No |
+| brand\_logo | 品牌图片| VARCHAR(1024) | No | NULL | No |
+| point | 积分兑换价格| INT | No | 0 | No |
+| pay\_class | 支付方式 point积分支付 online在线支付 mix混合支付| VARCHAR(255) | No | point | No |
+| volume | 商品体积| DOUBLE PRECISION | No | NULL | No |
+| brand\_id | 品牌id| INT | No | 0 | No |
+| tax\_rate | 税率, 百分之~/100| INT | Yes | NULL | No |
+| crossborder\_tax\_rate | 跨境税率,百分比,小数点2位| VARCHAR(10) | Yes | NULL | No |
+| origincountry\_id | 产地国id| BIGINT | Yes | 0 | No |
+| type | 商品类型,0普通,1跨境商品,可扩展| INT | Yes | 0 | No |
+| is\_medicine | 是否为药品,0否 1是| SMALLINT | Yes | 0 | No |
+| is\_prescription | 是否为处方药,0否 1是| SMALLINT | Yes | 0 | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | item\_id | Yes |
+| ix\_company\_id | company\_id | No |
+| ix\_default\_item\_id | default\_item\_id | No |
+| ix\_item\_category | item\_category | No |
+| ix\_is\_default | is\_default | No |
+| ix\_goods\_id | goods\_id | No |
+| ix\_default\_item\_list | company\_id, default\_item\_id, approve\_status, item\_type, item\_category | No |
+
+
+## pointsmall\_items\_rel\_attributes
+
+> **积分商品关联属性表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司ID| BIGINT | Yes | NULL | No |
+| item\_id | 商品ID| BIGINT | Yes | NULL | No |
+| attribute\_sort | 商品属性排序| INT | No | 0 | No |
+| attribute\_id | 商品属性id| BIGINT | Yes | NULL | No |
+| attribute\_type | 商品属性类型 unit单位,brand品牌,item\_params商品参数, item\_spec规格| VARCHAR(15) | Yes | NULL | No |
+| attribute\_value\_id | 商品属性值id| BIGINT | No | NULL | No |
+| custom\_attribute\_value | 自定义属性名称| VARCHAR(255) | No | NULL | No |
+| image\_url | 规格自定义图片| JSON | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| ix\_company\_id | company\_id | No |
+| ix\_item\_id | item\_id | No |
+| ix\_attribute\_type | attribute\_type | No |
+
+
+## pointsmall\_items\_rel\_cats
+
+> **积分商品和分类关联表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| item\_id | 商品ID| BIGINT | Yes | NULL | No |
+| category\_id | 商品分类id| BIGINT | Yes | NULL | No |
+| company\_id | 公司ID| BIGINT | Yes | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | item\_id, category\_id | Yes |
+| ix\_company\_id | company\_id | No |
+| ix\_category\_id | category\_id | No |
+| ix\_created | created | No |
+
+
+## popularize\_brokerage
+
+> **分销佣金表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| brokerage\_type | 佣金类型| VARCHAR(15) | Yes | NULL | No |
+| order\_id | 订单号| VARCHAR(64) | No | NULL | No |
+| user\_id | | BIGINT | Yes | NULL | No |
+| buy\_user\_id | | BIGINT | Yes | NULL | No |
+| order\_type | 订单类型| VARCHAR(15) | Yes | NULL | No |
+| source | 佣金来源 订单,邀请等| VARCHAR(15) | Yes | NULL | No |
+| company\_id | 公司ID| BIGINT | Yes | NULL | No |
+| price | 销售金额,单位为‘分’| INT | Yes | NULL | No |
+| commission\_type | 返佣类型 money 金额 point 积分| VARCHAR(15) | Yes | NULL | No |
+| rebate | 返佣金额,单位为‘分’| INT | Yes | NULL | No |
+| rebate\_point | 返佣金额,单位为‘分’| VARCHAR(15) | No | money | No |
+| detail | 佣金计算详情| LONGTEXT | Yes | NULL | No |
+| is\_close | 是否已结算| TINYINT(1) | Yes | | No |
+| plan\_close\_time | 计划结算时间| INT | Yes | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+
+
+## popularize\_brokerage\_statistics
+
+> **分销佣金统计**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| user\_id | 用户id| BIGINT | Yes | NULL | No |
+| company\_id | 公司ID| BIGINT | Yes | NULL | No |
+| item\_total\_price | 分销商品总金额| BIGINT | No | 0 | No |
+| rebate\_total | 分销佣金总金额| BIGINT | No | 0 | No |
+| point\_total | 分销佣金总积分| BIGINT | Yes | 0 | No |
+| no\_close\_rebate | 未结算佣金| BIGINT | No | 0 | No |
+| no\_close\_point | 未结算佣金积分| BIGINT | Yes | 0 | No |
+| cash\_withdrawal\_rebate | 可提现佣金| BIGINT | No | 0 | No |
+| cash\_withdrawal\_point | 订单返佣中可使用积分| BIGINT | Yes | 0 | No |
+| freeze\_cash\_withdrawal\_rebate | 申请提现佣金,冻结提现佣金| BIGINT | No | 0 | No |
+| payed\_rebate | 已提现佣金| BIGINT | No | 0 | No |
+| recharge\_rebate | 充值返佣| BIGINT | No | 0 | No |
+| recharge\_point | 充值返佣金积分| BIGINT | Yes | 0 | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | user\_id | Yes |
+| ix\_user\_id | user\_id | No |
+| ix\_company\_id | company\_id | No |
+
+
+## popularize\_cash\_withdrawal
+
+> **推广员提现表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | | BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| user\_id | 推广员userId| VARCHAR(255) | Yes | NULL | No |
+| account\_name | 提现账号姓名| VARCHAR(255) | No | NULL | No |
+| pay\_account | 提现账号 微信为openid 支付宝为,支付账号| VARCHAR(255) | Yes | NULL | No |
+| mobile | 手机号| VARCHAR(255) | Yes | NULL | No |
+| money | 提现金额,以分为单位| INT UNSIGNED | Yes | 0 | No |
+| status | 提现状态| VARCHAR(255) | Yes | NULL | No |
+| remarks | 备注| VARCHAR(255) | No | NULL | No |
+| pay\_type | 提现支付类型| VARCHAR(255) | Yes | NULL | No |
+| wxa\_appid | 提现的小程序appid| VARCHAR(255) | Yes | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+
+
+## popularize\_promoter
+
+> **推广员表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 企业ID| BIGINT | Yes | NULL | No |
+| user\_id | 会员ID| BIGINT | Yes | NULL | No |
+| identity\_id | 推广员身份ID| BIGINT | Yes | 0 | No |
+| is\_subordinates | 是否可发展下级分销员| INT | Yes | 0 | No |
+| pid | 上级会员ID| BIGINT | No | NULL | No |
+| pmobile | 上级手机号| VARCHAR(255) | No | NULL | No |
+| pname | 上级推广员名称| VARCHAR(255) | No | NULL | No |
+| shop\_name | 推广员自定义店铺名称| VARCHAR(255) | No | NULL | No |
+| alipay\_name | 推广员提现的支付宝姓名| VARCHAR(255) | No | NULL | No |
+| brief | 推广店铺描述| VARCHAR(255) | No | NULL | No |
+| shop\_pic | 推广店铺封面| VARCHAR(255) | No | NULL | No |
+| alipay\_account | 推广员提现的支付宝账号| VARCHAR(255) | No | NULL | No |
+| grade\_level | 推广员等级| INT | Yes | NULL | No |
+| is\_promoter | 是否为推广员| INT | Yes | NULL | No |
+| shop\_status | 开店状态 0 未开店 1已开店 2申请中 3禁用 4申请审核拒绝 | INT | Yes | 0 | No |
+| reason | 审核拒绝原因| VARCHAR(255) | No | NULL | No |
+| disabled | 是否有效| INT | Yes | NULL | No |
+| is\_buy | 是否有购买记录| INT | Yes | NULL | No |
+| promoter\_name | 推广员名称| VARCHAR(255) | No | NULL | No |
+| regions\_id | 地区ID| LONGTEXT | No | NULL | No |
+| address | 地址| VARCHAR(255) | No | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_pid | pid | No |
+| idx\_companyid\_userid | company\_id, user\_id | No |
+| idx\_identity\_id | identity\_id | No |
+| idx\_is\_subordinates | is\_subordinates | No |
+
+
+## popularize\_promoter\_goods
+
+> **推广员商品表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 企业ID| BIGINT | Yes | NULL | No |
+| user\_id | 会员ID| BIGINT | Yes | NULL | No |
+| goods\_id | 商品ID| BIGINT | No | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+
+
+## popularize\_promoter\_identity
+
+> **推广员身份表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 企业ID| BIGINT | Yes | NULL | No |
+| name | 推广员身份名称| VARCHAR(255) | No | NULL | No |
+| is\_subordinates | 是否可发展下级分销员| INT | Yes | NULL | No |
+| is\_default | 是否为默认| INT | Yes | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_companyid | company\_id | No |
+| idx\_is\_subordinates | is\_subordinates | No |
+
+
+## popularize\_task\_brokerage
+
+> **任务制返佣**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| item\_id | 商品id| BIGINT | Yes | NULL | No |
+| user\_id | | BIGINT | Yes | NULL | No |
+| order\_id | 订单号| VARCHAR(64) | No | NULL | No |
+| buy\_user\_id | | BIGINT | Yes | NULL | No |
+| company\_id | 公司ID| BIGINT | Yes | NULL | No |
+| item\_name | 商品名称| VARCHAR(255) | No | NULL | No |
+| item\_spec\_desc | 商品规格描述| LONGTEXT | No | NULL | No |
+| price | 价格| INT | Yes | NULL | No |
+| num | 销售数量| INT | Yes | NULL | No |
+| status | 状态| VARCHAR(255) | Yes | NULL | No |
+| plan\_date | 计划结算时间| VARCHAR(255) | Yes | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+
+
+## popularize\_task\_brokerage\_count
+
+> **任务制返佣**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| rebate\_type | 返佣模式| VARCHAR(15) | Yes | NULL | No |
+| item\_id | 商品id| BIGINT | Yes | NULL | No |
+| item\_bn | 商品编号| VARCHAR(255) | Yes | NULL | No |
+| total\_fee | 已完成的总销售额| BIGINT | Yes | NULL | No |
+| item\_name | 商品名称| VARCHAR(255) | No | NULL | No |
+| item\_spec\_desc | 商品规格描述| LONGTEXT | No | NULL | No |
+| user\_id | | BIGINT | Yes | NULL | No |
+| company\_id | 公司ID| BIGINT | Yes | NULL | No |
+| rebate\_conf | 分销配置| JSON | No | NULL | No |
+| rebate\_money | 分销奖金| BIGINT | Yes | 0 | No |
+| finish\_num | 订单已完成数量| VARCHAR(255) | Yes | NULL | No |
+| wait\_num | 订单已支付,待完成数量| VARCHAR(255) | Yes | NULL | No |
+| close\_num | 订单已关闭数量,包含取消订单,售后订单| VARCHAR(255) | Yes | NULL | No |
+| plan\_date | 计划结算时间| VARCHAR(255) | Yes | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+
+
+## promotion\_check\_in
+
+> **签到日志**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司ID| BIGINT | Yes | NULL | No |
+| user\_id | 会员id| BIGINT | Yes | NULL | No |
+| create\_time | 签到时间| INT | Yes | NULL | No |
+| tag | 标签| VARCHAR(255) | No | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+
+
+## promotion\_groups\_activity
+
+> **拼团活动表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| groups\_activity\_id | 活动ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司ID| BIGINT | Yes | NULL | No |
+| act\_name | 活动名称| VARCHAR(50) | Yes | NULL | No |
+| goods\_id | 商品ID| BIGINT | Yes | NULL | No |
+| group\_goods\_type | 团购活动商品类型| VARCHAR(255) | Yes | services | No |
+| pics | 活动封面| VARCHAR(255) | Yes | NULL | No |
+| act\_price | 活动价格| BIGINT | Yes | NULL | No |
+| person\_num | 拼团人数| BIGINT | Yes | NULL | No |
+| begin\_time | 开始时间| BIGINT | Yes | NULL | No |
+| end\_time | 结束时间| BIGINT | Yes | NULL | No |
+| limit\_buy\_num | 限买数量| BIGINT | Yes | NULL | No |
+| limit\_time | 成团时效(单位时)| INT | Yes | NULL | No |
+| store | 拼团库存| BIGINT | Yes | NULL | No |
+| free\_post | 是否包邮| TINYINT(1) | No | 1 | No |
+| rig\_up | 是否展示开团列表| TINYINT(1) | No | 1 | No |
+| robot | 成团机器人| TINYINT(1) | No | 1 | No |
+| share\_desc | 分享描述| VARCHAR(100) | No | | No |
+| disabled | 是否禁用 true=禁用,false=启用| TINYINT(1) | No | | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | groups\_activity\_id | Yes |
+| idx\_goodsid\_begintime\_endtime | goods\_id, begin\_time, end\_time | No |
+
+
+## promotion\_groups\_team
+
+> **开团表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| team\_id | 团id号| VARCHAR(100) | Yes | NULL | No |
+| company\_id | 公司ID| BIGINT | Yes | NULL | No |
+| act\_id | 活动ID号| BIGINT | Yes | NULL | No |
+| head\_mid | 团长会员ID| BIGINT | Yes | NULL | No |
+| begin\_time | 开团时间| BIGINT | Yes | NULL | No |
+| end\_time | 结束时间(根据成团时效和活动结束时间算出来的)| BIGINT | Yes | NULL | No |
+| join\_person\_num | 参与人数| BIGINT | Yes | 0 | No |
+| group\_goods\_type | 团购活动商品类型| VARCHAR(255) | Yes | services | No |
+| team\_status | 状态:1.进行中2.成功3.失败| BIGINT | Yes | 1 | No |
+| disabled | 是否禁用 true=禁用,false=启用| TINYINT(1) | No | | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+
+
+## promotion\_groups\_team\_member
+
+> **参团表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| team\_id | 团id号| VARCHAR(100) | Yes | NULL | No |
+| company\_id | 公司ID| BIGINT | Yes | NULL | No |
+| act\_id | 活动ID号| BIGINT | Yes | NULL | No |
+| member\_id | 会员ID, 0为拼团机器人| BIGINT | No | NULL | No |
+| join\_time | 参团时间| BIGINT | Yes | NULL | No |
+| order\_id | 订单编号| VARCHAR(100) | No | NULL | No |
+| group\_goods\_type | 团购活动商品类型| VARCHAR(255) | Yes | services | No |
+| member\_info | 拼团机器人| VARCHAR(255) | No | NULL | No |
+| disabled | 是否禁用 true=禁用,false=启用| TINYINT(1) | No | | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+
+
+## promotion\_user\_task
+
+> **签到日志**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司ID| BIGINT | Yes | NULL | No |
+| user\_id | 会员id| BIGINT | Yes | NULL | No |
+| create\_time | 签到时间| INT | Yes | NULL | No |
+| tag | 标签| VARCHAR(255) | No | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+
+
+## promotions\_active\_articles
+
+> **活动文章表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司ID| BIGINT | Yes | NULL | No |
+| article\_title | 文章标题| VARCHAR(255) | Yes | NULL | No |
+| article\_subtitle | 文章副标题| VARCHAR(255) | No | NULL | No |
+| article\_content | 文章内容| LONGTEXT | Yes | NULL | No |
+| article\_cover | 封面| LONGTEXT | Yes | NULL | No |
+| directional\_url | 跳转地址,转json| LONGTEXT | Yes | NULL | No |
+| is\_show | 是否展示,1展示 0不展示| TINYINT(1) | Yes | 1 | No |
+| is\_delete | 是否已删除,1已删除 0未删除| TINYINT(1) | Yes | 0 | No |
+| sort | 排序| BIGINT | No | 0 | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+
+
+## promotions\_activity
+
+> **自动化营销活动表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| activity\_id | 活动ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司ID| BIGINT | Yes | NULL | No |
+| activity\_type | 活动类型| VARCHAR(255) | Yes | NULL | No |
+| title | 活动名称| VARCHAR(255) | Yes | NULL | No |
+| trigger\_condition | 触发条件| LONGTEXT | Yes | NULL | No |
+| discount\_config | 优惠配置| LONGTEXT | Yes | NULL | No |
+| sms\_params | 发送短信相关参数| VARCHAR(255) | No | NULL | No |
+| sms\_isopen | 是否开启发送短信| VARCHAR(255) | Yes | NULL | No |
+| activity\_status | 活动状态| VARCHAR(255) | Yes | NULL | No |
+| begin\_time | 活动开始时间| BIGINT | Yes | NULL | No |
+| end\_time | 活动结束时间| BIGINT | No | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | activity\_id | Yes |
+| idx\_company\_id | company\_id | No |
+
+
+## promotions\_bargain
+
+> **砍价活动表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| bargain\_id | 砍价活动ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司ID| BIGINT | Yes | NULL | No |
+| title | 活动名称| VARCHAR(255) | Yes | NULL | No |
+| ad\_pic | 广告图| VARCHAR(255) | Yes | NULL | No |
+| item\_name | 商品名称| VARCHAR(255) | Yes | NULL | No |
+| item\_pics | 商品图片| VARCHAR(255) | Yes | NULL | No |
+| item\_intro | 商品详情| LONGTEXT | No | NULL | No |
+| mkt\_price | 市场价格,单位为‘分’| INT | Yes | NULL | No |
+| price | 购买价格,单位为‘分’| INT | Yes | NULL | No |
+| limit\_num | 购买限制| INT | Yes | NULL | No |
+| order\_num | 已购买数量| INT | Yes | 0 | No |
+| cutdown\_rules | 砍价规则| LONGTEXT | Yes | NULL | No |
+| cutdown\_range | 砍价范围,单位 分。值有 min 最小值;max 最大值| JSON | Yes | NULL | No |
+| people\_range | 砍价人数,单位(个)。值有 min 最小人数;max 最大人数| JSON | Yes | NULL | No |
+| min\_price | 每个人最少能看的价钱,单位为‘分’| INT | Yes | NULL | No |
+| begin\_time | 开始时间| BIGINT | Yes | NULL | No |
+| end\_time | 结束时间| BIGINT | Yes | NULL | No |
+| share\_msg | 分享内容| VARCHAR(255) | Yes | NULL | No |
+| help\_pics | 翻牌图片| JSON | Yes | NULL | No |
+| item\_id | 商品id| VARCHAR(11) | Yes | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | bargain\_id | Yes |
+
+
+## promotions\_bargain\_log
+
+> **砍价日志表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| bargain\_log\_id | 砍价记录id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司ID| BIGINT | Yes | NULL | No |
+| authorizer\_appid | 公众号的appid| VARCHAR(64) | No | NULL | No |
+| wxa\_appid | 小程序的appid| VARCHAR(64) | No | NULL | No |
+| bargain\_id | 砍价ID| BIGINT | Yes | NULL | No |
+| user\_id | 用户id| BIGINT | No | NULL | No |
+| open\_id | 微信用户标识| VARCHAR(40) | No | NULL | No |
+| nickname | 用户昵称| VARCHAR(255) | No | NULL | No |
+| headimgurl | 用户头像url| VARCHAR(255) | No | NULL | No |
+| cutdown\_num | 砍掉金额,单位为‘分’| INT | Yes | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | bargain\_log\_id | Yes |
+
+
+## promotions\_distributor
+
+> **分销商营销**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | 自增ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 商户id| BIGINT | Yes | NULL | No |
+| promotion\_type | 营销类型| VARCHAR(255) | Yes | register | No |
+| promotion\_id | 营销id| BIGINT | Yes | NULL | No |
+| distributor\_id | 分销商id| BIGINT | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+
+
+## promotions\_extrapoint\_activity
+
+> **积分营销活动表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| activity\_id | 活动ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司ID| BIGINT | Yes | NULL | No |
+| type | 营销类型: shop:店铺额外积分,birthday:会员生日,item:商品额外积分| VARCHAR(255) | Yes | shop | No |
+| title | 活动名称| VARCHAR(255) | Yes | NULL | No |
+| trigger\_condition | 触发条件| LONGTEXT | Yes | NULL | No |
+| condition\_value | 优惠配置| INT | Yes | NULL | No |
+| condition\_type | 优惠方式: multiple:倍数, plus:增加| VARCHAR(255) | Yes | NULL | No |
+| valid\_grade | 会员级别集合| LONGTEXT | No | NULL | No |
+| use\_shop | 适用店铺: 0:全场可用,1:指定店铺可用| VARCHAR(255) | Yes | NULL | No |
+| shop\_ids | 店铺id集合| LONGTEXT | No | all | No |
+| activity\_status | 活动状态| VARCHAR(255) | Yes | NULL | No |
+| begin\_time | 活动开始时间| BIGINT | Yes | NULL | No |
+| end\_time | 活动结束时间| BIGINT | No | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | activity\_id | Yes |
+| idx\_company\_id | company\_id | No |
+
+
+## promotions\_items\_tag
+
+> **商品的促销标签表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | 自增id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| promotion\_id | 关联营销id| BIGINT | Yes | NULL | No |
+| item\_id | 关联对象id(商品ID,标签ID,品牌ID等)| BIGINT | Yes | 0 | No |
+| goods\_id | 关联商品id| BIGINT | No | 0 | No |
+| tag\_type | 标签类型: full\_discount:满折,full\_minus:满减,full\_gift:满赠, seckill: 秒杀,| VARCHAR(255) | Yes | NULL | No |
+| activity\_price | 商品活动价| BIGINT | Yes | 0 | No |
+| item\_type | 活动对象类型: normal:实体类商品,service:服务类商品,tag:标签,category:商品主类目,brand:品牌| VARCHAR(255) | Yes | normal | No |
+| start\_time | 活动开始时间| INT | Yes | NULL | No |
+| end\_time | 活动结束时间| INT | Yes | NULL | No |
+| company\_id | 公司ID| BIGINT | Yes | NULL | No |
+| is\_all\_items | 是否全部商品,1:全部商品,2:非全部商品| BIGINT | Yes | 2 | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| ix\_tag\_type | tag\_type | No |
+| ix\_company\_id | company\_id | No |
+
+
+## promotions\_limit
+
+> **限购活动规则表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| limit\_id | 限购活动id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司ID| BIGINT | Yes | NULL | No |
+| limit\_name | 限购活动名称| VARCHAR(50) | Yes | NULL | No |
+| limit\_type | 限购类型, 全局限购:global, 店铺限购:shop| VARCHAR(50) | No | NULL | No |
+| valid\_grade | 会员级别集合| VARCHAR(255) | Yes | NULL | No |
+| rule | 限购规则| VARCHAR(255) | Yes | NULL | No |
+| start\_time | 起始时间| INT | Yes | NULL | No |
+| end\_time | 截止时间| INT | Yes | NULL | No |
+| use\_bound | 适用范围: 1:指定商品可用,2:指定分类可用,3:指定商品标签可用,4:指定商品品牌可用| INT | Yes | 1 | No |
+| tag\_ids | 标签id集合| LONGTEXT | No | NULL | No |
+| brand\_ids | 品牌id集合| LONGTEXT | No | NULL | No |
+| total\_item\_num | 限购商品总数| INT | Yes | 0 | No |
+| valid\_item\_num | 已导入的限购商品数| INT | Yes | 0 | No |
+| error\_desc | 导入错误描述| LONGTEXT | No | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+| source\_type | 添加者类型:distributor| VARCHAR(20) | No | NULL | No |
+| source\_id | 添加者ID: 如店铺ID| BIGINT | No | 0 | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | limit\_id | Yes |
+| idx\_company\_id | company\_id | No |
+
+
+## promotions\_limit\_category
+
+> **限购活动分类表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| limit\_id | 限购活动规则id| BIGINT | Yes | NULL | No |
+| category\_id | 分类id| BIGINT | Yes | NULL | No |
+| company\_id | 公司id| BIGINT | No | NULL | No |
+| category\_level | 分类等级| INT | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | limit\_id, category\_id | Yes |
+| idx\_company\_id | company\_id | No |
+
+
+## promotions\_limit\_item
+
+> **限购活动商品表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| limit\_id | 限购活动规则id| BIGINT | Yes | NULL | No |
+| distributor\_id | 店铺id| BIGINT UNSIGNED | Yes | 0 | No |
+| item\_id | 商品| BIGINT | Yes | NULL | No |
+| limit\_num | 限购数量| BIGINT | Yes | NULL | No |
+| item\_type | 活动商品类型: normal:实体类商品,service:服务类商品,tag:标签,category:商品主类目,brand:品牌| VARCHAR(255) | Yes | normal | No |
+| company\_id | 公司ID| BIGINT | Yes | NULL | No |
+| item\_name | 商品名称| VARCHAR(255) | Yes | NULL | No |
+| pics | 商品图片| LONGTEXT | Yes | NULL | No |
+| price | 商品原价| INT | Yes | NULL | No |
+| item\_spec\_desc | 产品规格描述| VARCHAR(255) | No | | No |
+| start\_time | 起始时间| INT | Yes | NULL | No |
+| end\_time | 截止时间| INT | Yes | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | limit\_id, distributor\_id, item\_id | Yes |
+| idx\_company\_id | company\_id | No |
+| idx\_distributor\_id | distributor\_id | No |
+| idx\_item\_id | item\_id | No |
+| idx\_unique\_item | company\_id, distributor\_id, item\_id | No |
+
+
+## promotions\_limit\_person
+
+> **限购活动用户表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | 限购活动用户记录表id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| limit\_id | 限购活动规则id| BIGINT | Yes | NULL | No |
+| user\_id | 限购活动用户id| BIGINT | Yes | NULL | No |
+| item\_id | 限购活动商品id| BIGINT | Yes | NULL | No |
+| company\_id | 公司ID| BIGINT | Yes | NULL | No |
+| distributor\_id | 店铺id| BIGINT UNSIGNED | Yes | 0 | No |
+| number | 数量| BIGINT | Yes | NULL | No |
+| start\_time | 起始时间| INT | Yes | NULL | No |
+| end\_time | 截止时间| INT | Yes | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_company\_id | company\_id | No |
+| idx\_distributor\_user | distributor\_id, user\_id | No |
+
+
+## promotions\_marketing\_activity
+
+> **各种促销活动表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| marketing\_id | 营销id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| marketing\_type | 营销类型: full\_discount:满折,full\_minus:满减,full\_gift:满赠,self\_select:任选优惠,plus\_price\_buy:加价购,member\_preference:会员优先购| VARCHAR(255) | Yes | NULL | No |
+| rel\_marketing\_id | 关联其他营销id| BIGINT | No | 0 | No |
+| marketing\_name | 营销活动名称| VARCHAR(255) | Yes | NULL | No |
+| ad\_pic | 活动广告图| VARCHAR(255) | No | NULL | No |
+| marketing\_desc | 营销活动描述| VARCHAR(255) | Yes | NULL | No |
+| start\_time | 活动开始时间| INT | Yes | NULL | No |
+| end\_time | 活动结束时间| INT | Yes | NULL | No |
+| release\_time | 活动发布时间| INT | No | NULL | No |
+| used\_platform | 适用平台: 0:全场可用,1:只用于pc端,2:小程序端,3:h5端| INT | Yes | 0 | No |
+| use\_bound | 适用范围: 0:全场可用,1:指定商品可用,2:指定分类可用,3:指定商品标签可用,4:指定商品品牌可用| INT | Yes | 0 | No |
+| tag\_ids | 标签id集合| LONGTEXT | No | NULL | No |
+| brand\_ids | 品牌id集合| LONGTEXT | No | NULL | No |
+| use\_shop | 适用店铺: 0:全场可用,1:指定店铺可用| INT | Yes | 0 | No |
+| shop\_ids | 店铺id集合| LONGTEXT | No | all | No |
+| valid\_grade | 会员级别集合| LONGTEXT | No | NULL | No |
+| condition\_type | 营销条件标准 quantity:按总件数, totalfee:按总金额| LONGTEXT | Yes | totalfee | No |
+| condition\_value | 营销规则值| LONGTEXT | Yes | NULL | No |
+| in\_proportion | 是否按比例多次赠送| TINYINT(1) | No | | No |
+| activity\_background | 加价购活动页面背景| VARCHAR(255) | No | NULL | No |
+| navbar\_color | 加价购活动页面导航栏颜色| VARCHAR(255) | No | NULL | No |
+| timeBackgroundColor | 加价购活动页面时间背景颜色| VARCHAR(255) | No | NULL | No |
+| canjoin\_repeat | 是否上不封顶| TINYINT(1) | No | | No |
+| join\_limit | 可参与次数| INT | Yes | 0 | No |
+| free\_postage | 是否免邮| TINYINT(1) | Yes | | No |
+| promotion\_tag | 促销标签| VARCHAR(15) | Yes | NULL | No |
+| check\_status | 促销状态: non-reviewed:未审核,pending:待审核,agree:审核通过,refuse:已拒绝,cancel:已取消,overdue:已过期| VARCHAR(255) | Yes | agree | No |
+| reason | 审核不通过原因| VARCHAR(500) | No | NULL | No |
+| item\_type | 活动商品类型: normal:实体类商品,service:服务类商品| VARCHAR(255) | Yes | normal | No |
+| is\_increase\_purchase | 开启加价购,满赠时启用| TINYINT(1) | No | NULL | No |
+| company\_id | 公司ID| BIGINT | Yes | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+| source\_type | 添加者类型:distributor| VARCHAR(20) | No | NULL | No |
+| source\_id | 添加者ID: 如店铺ID| BIGINT | No | 0 | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | marketing\_id | Yes |
+| ix\_marketing\_type | marketing\_type | No |
+| ix\_start\_time | start\_time | No |
+| ix\_source\_id | source\_id | No |
+| idx\_companyid\_starttime\_endtime | company\_id, start\_time, end\_time | No |
+
+
+## promotions\_marketing\_activity\_category
+
+> **各种促销活动分类表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | 自增id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| marketing\_id | 关联营销id| BIGINT | Yes | NULL | No |
+| category\_id | 关联分类id| BIGINT | Yes | NULL | No |
+| marketing\_type | 营销类型: full\_discount:满折,full\_minus:满减,full\_gift:满赠| VARCHAR(255) | Yes | NULL | No |
+| company\_id | 公司ID| BIGINT | Yes | NULL | No |
+| category\_level | 分类等级| INT | Yes | 0 | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| ix\_marketing\_type | marketing\_type | No |
+| ix\_marketing\_category | category\_id, marketing\_id | No |
+| ix\_company\_id | company\_id | No |
+
+
+## promotions\_marketing\_activity\_items
+
+> **各种促销活动商品表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | 自增id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| marketing\_id | 关联营销id| BIGINT | Yes | NULL | No |
+| item\_id | 关联id(商品ID,标签ID,品牌ID等)| BIGINT | Yes | NULL | No |
+| goods\_id | 关联商品id| BIGINT | No | NULL | No |
+| is\_show | 列表页是否显示| TINYINT(1) | Yes | 1 | No |
+| item\_spec\_desc | 商品规格描述| VARCHAR(255) | No | NULL | No |
+| marketing\_type | 营销类型: full\_discount:满折,full\_minus:满减,full\_gift:满赠,self\_select:任选优惠,plus\_price\_buy:加价购,member\_preference:会员优先购| VARCHAR(255) | Yes | NULL | No |
+| item\_type | 活动商品类型: normal:实体类商品,service:服务类商品,tag:标签,category:商品主类目,brand:品牌| VARCHAR(255) | Yes | normal | No |
+| item\_name | 商品标题| VARCHAR(150) | Yes | NULL | No |
+| price | 商品价格| INT | Yes | 0 | No |
+| item\_brief | 商品简介| VARCHAR(250) | No | NULL | No |
+| pics | 商品图片| LONGTEXT | No | NULL | No |
+| promotion\_tag | 促销标签| VARCHAR(15) | Yes | NULL | No |
+| start\_time | 活动开始时间| INT | Yes | NULL | No |
+| end\_time | 活动结束时间| INT | Yes | NULL | No |
+| status | 是否生效中| TINYINT(1) | Yes | 1 | No |
+| company\_id | 公司ID| BIGINT | Yes | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| ix\_marketing\_type | marketing\_type | No |
+| ix\_marketing\_item | item\_id, marketing\_id | No |
+| ix\_company\_id | company\_id | No |
+
+
+## promotions\_marketing\_gift\_items
+
+> **活动赠品列表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | 自增id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| marketing\_id | 关联营销id| BIGINT | Yes | NULL | No |
+| item\_id | 关联商品id| BIGINT | Yes | NULL | No |
+| item\_type | 活动商品类型: normal:实体类商品,service:服务类商品| VARCHAR(255) | Yes | normal | No |
+| item\_name | 商品标题| VARCHAR(255) | Yes | NULL | No |
+| price | 赠品价格| INT | Yes | 0 | No |
+| store | 赠品库存| INT | Yes | 0 | No |
+| gift\_num | 赠品数量| INT | Yes | 0 | No |
+| pics | 商品图片| LONGTEXT | No | NULL | No |
+| without\_return | 退货无需退回赠品| TINYINT(1) | Yes | | No |
+| condition\_type | 营销条件标准 quantity:按总件数, totalfee:按总金额| LONGTEXT | Yes | totalfee | No |
+| filter\_full | 赠品满足所需条件| INT | No | NULL | No |
+| item\_spec\_desc | 商品规格描述| VARCHAR(255) | No | NULL | No |
+| company\_id | 公司ID| BIGINT | Yes | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| ix\_company\_id | company\_id | No |
+| ix\_item\_id | item\_id | No |
+| ix\_marketing\_id | marketing\_id | No |
+
+
+## promotions\_member\_price
+
+> **商品会员价表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| price\_id | 会员价ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司ID| BIGINT | Yes | NULL | No |
+| item\_id | 商品id| BIGINT | Yes | NULL | No |
+| price | 商品价格| JSON | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | price\_id | Yes |
+| ix\_item\_id | item\_id | No |
+
+
+## promotions\_notice\_template
+
+> **小程序通知消息模版**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| template\_name | 小程序模板名称 yykweishop 微商城等| VARCHAR(255) | Yes | NULL | No |
+| wxa\_template\_id | 微信小程序通知模版库id| VARCHAR(255) | Yes | NULL | No |
+| company\_id | company\_id| BIGINT | Yes | NULL | No |
+| notice\_type | 通知类型| VARCHAR(255) | Yes | wxa 小程序 | No |
+| tmpl\_type | 模板分类| VARCHAR(255) | Yes | NULL | No |
+| template\_id | 模板id,发送小程序通知使用| VARCHAR(255) | Yes | NULL | No |
+| title | 标题| VARCHAR(255) | Yes | NULL | No |
+| scenes\_name | 发送场景| VARCHAR(255) | Yes | NULL | No |
+| content | 模板内容| LONGTEXT | Yes | NULL | No |
+| is\_open | 是否开启| TINYINT(1) | Yes | NULL | No |
+| send\_time\_desc | 短信发送触发时间描述,配置| VARCHAR(255) | Yes | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+
+
+## promotions\_package
+
+> **组合促销促销规则表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| package\_id | 组合促销规则id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司ID| BIGINT | Yes | NULL | No |
+| goods\_id | 商品id| BIGINT | Yes | NULL | No |
+| main\_item\_id | 主商品id| BIGINT | Yes | NULL | No |
+| main\_item\_price | 主商品价格| BIGINT | Yes | NULL | No |
+| package\_name | 组合促销名称| VARCHAR(50) | Yes | NULL | No |
+| valid\_grade | 会员级别集合| VARCHAR(255) | Yes | NULL | No |
+| used\_platform | 0 商家全场可用|1 只能用于pc|2 只能用于wap|3 只能用于app, 使用平台| INT | No | 0 | No |
+| free\_postage | 0 包邮|1 商品| TINYINT(1) | No | 0 | No |
+| package\_total\_price | 组合促销各商品总价| INT | No | 0 | No |
+| start\_time | 起始时间| INT | Yes | NULL | No |
+| end\_time | 截止时间| INT | Yes | NULL | No |
+| package\_status | NO\_REVIEWED 未审核|PENDING 待审核|AGREE 审核通过|REFUSE 审核拒绝|CANCEL 已取消| VARCHAR(255) | No | NO_REVIEWED | No |
+| reason | 审核不通过原因| VARCHAR(255) | No | | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+| source\_type | 添加者类型:distributor| VARCHAR(20) | No | NULL | No |
+| source\_id | 添加者ID: 如店铺ID| BIGINT | No | 0 | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | package\_id | Yes |
+| idx\_company\_id | company\_id | No |
+| idx\_created | created | No |
+| idx\_package\_status | package\_status | No |
+
+
+## promotions\_package\_item
+
+> **组合促销商品表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| package\_id | 组合促销规则id| BIGINT | Yes | NULL | No |
+| item\_id | 商品| BIGINT | Yes | NULL | No |
+| default\_item\_id | 默认商品id| BIGINT | Yes | NULL | No |
+| company\_id | 公司ID| BIGINT | Yes | NULL | No |
+| item\_spec\_desc | 产品规格描述| VARCHAR(255) | No | | No |
+| title | 商品名称| VARCHAR(255) | Yes | NULL | No |
+| image\_default\_id | 商品图片| LONGTEXT | No | NULL | No |
+| package\_price | 组合促销商品单价| INT | Yes | NULL | No |
+| price | 商品原价| INT | Yes | NULL | No |
+| status | 是否生效中 0 失效 | 1 生效| TINYINT(1) | Yes | NULL | No |
+| start\_time | 起始时间| INT | Yes | NULL | No |
+| end\_time | 截止时间| INT | Yes | NULL | No |
+| is\_show | 列表页是否显示| TINYINT(1) | No | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | package\_id, item\_id | Yes |
+| idx\_company\_id | company\_id | No |
+| idx\_item\_id | item\_id | No |
+
+
+## promotions\_package\_main\_item
+
+> **组合促销主商品表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| package\_id | 组合促销规则id| BIGINT | Yes | NULL | No |
+| main\_item\_id | 主商品id| BIGINT | Yes | NULL | No |
+| company\_id | 公司ID| BIGINT | Yes | NULL | No |
+| goods\_id | 商品id| BIGINT | Yes | NULL | No |
+| main\_item\_price | 主商品价格| BIGINT | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | package\_id, main\_item\_id | Yes |
+| idx\_company\_id | company\_id | No |
+| idx\_goods\_id | goods\_id | No |
+| idx\_main\_item\_id | main\_item\_id | No |
+
+
+## promotions\_point\_upvaluation
+
+> **积分升值活动表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| activity\_id | 活动ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司ID| BIGINT | Yes | NULL | No |
+| title | 活动名称| VARCHAR(255) | Yes | NULL | No |
+| begin\_time | 活动开始时间| BIGINT | Yes | NULL | No |
+| end\_time | 活动结束时间| BIGINT | No | NULL | No |
+| trigger\_condition | 触发条件| LONGTEXT | Yes | NULL | No |
+| upvaluation | 升值倍数| INT | Yes | NULL | No |
+| max\_up\_point | 每日升值积分上限| INT | Yes | NULL | No |
+| valid\_grade | 会员级别集合| LONGTEXT | No | NULL | No |
+| used\_scene | 适用场景: 1:订单抵扣| VARCHAR(255) | Yes | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | activity\_id | Yes |
+| idx\_company\_id | company\_id | No |
+
+
+## promotions\_recommend\_like\_items
+
+> **推荐喜欢商品(猜你喜欢)**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | 自增id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 企业id| BIGINT | Yes | NULL | No |
+| distributor\_id | 店铺id| BIGINT | No | NULL | No |
+| item\_id | 商品id| BIGINT | Yes | NULL | No |
+| sort | 商品排序| INT | Yes | 0 | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| ix\_company\_id | company\_id | No |
+
+
+## promotions\_scd\_rel\_user
+
+> **定向促销会员日志**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | 营销id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 企业id| BIGINT | Yes | NULL | No |
+| user\_id | 企业id| BIGINT | Yes | NULL | No |
+| order\_id | 订单号id| VARCHAR(255) | Yes | NULL | No |
+| discount\_fee | 优惠金额| BIGINT | Yes | NULL | No |
+| activity\_id | 定向促销id| BIGINT | Yes | NULL | No |
+| specific\_id | 定向条件id| BIGINT | No | NULL | No |
+| specific\_name | 定向条件名称| VARCHAR(255) | No | NULL | No |
+| activity\_month | 促销月份| VARCHAR(255) | No | NULL | No |
+| action\_type | 操作方式,plus:加,less:减| VARCHAR(255) | Yes | plus | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| ix\_company\_id | company\_id | No |
+| ix\_user\_id | user\_id | No |
+
+
+## promotions\_seckill\_activity
+
+> **秒杀活动表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| seckill\_id | 秒杀活动id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司ID| BIGINT | Yes | NULL | No |
+| distributor\_id | 店铺ID, 多个逗号隔开| VARCHAR(255) | No | NULL | No |
+| activity\_name | 秒杀活动名称| VARCHAR(255) | No | NULL | No |
+| ad\_pic | 秒杀活动广告图| VARCHAR(255) | No | NULL | No |
+| activity\_start\_time | 秒杀开始时间| INT | Yes | NULL | No |
+| activity\_end\_time | 秒杀结束时间| INT | Yes | NULL | No |
+| activity\_release\_time | 秒杀活动发布时间| INT | Yes | NULL | No |
+| is\_activity\_rebate | 秒杀活动是否返佣| TINYINT(1) | Yes | | No |
+| is\_free\_shipping | 秒杀活动是否包邮| TINYINT(1) | Yes | | No |
+| limit\_total\_money | 每人累计限额| BIGINT | No | NULL | No |
+| limit\_money | 每人单笔限额| BIGINT | No | NULL | No |
+| validity\_period | 未付款订单保留时长(分钟)| INT | No | NULL | No |
+| otherext | 其他扩展字段| LONGTEXT | No | NULL | No |
+| description | 秒杀活动描述| VARCHAR(255) | No | NULL | No |
+| seckill\_type | 秒杀类型 normal正常的秒杀活动, limited\_time\_sale限时特惠| VARCHAR(255) | Yes | normal | No |
+| item\_type | 秒杀活动商品类型| VARCHAR(255) | Yes | normal | No |
+| use\_bound | 适用范围: 1:指定商品可用| INT | Yes | 1 | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+| source\_type | 添加者类型:distributor| VARCHAR(20) | No | NULL | No |
+| source\_id | 添加者ID: 如店铺ID| BIGINT | No | 0 | No |
+| disabled | 是否失效| TINYINT(1) | Yes | 0 | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | seckill\_id | Yes |
+| ix\_item\_type | item\_type | No |
+| ix\_company\_id | company\_id | No |
+
+
+## promotions\_seckill\_rel\_goods
+
+> **秒杀关联商品表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | 关联id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| seckill\_id | 秒杀活动id| BIGINT | Yes | NULL | No |
+| seckill\_type | 秒杀类型 normal正常的秒杀活动, limited\_time\_sale限时特惠| VARCHAR(255) | Yes | normal | No |
+| item\_id | 秒杀活动商品id| BIGINT | Yes | NULL | No |
+| item\_type | 秒杀活动商品类型。可选值有 normal-实体类;services-服务类| VARCHAR(255) | Yes | normal | No |
+| is\_show | 查询列表是否显示| TINYINT(1) | Yes | 1 | No |
+| item\_spec\_desc | 商品规格描述| VARCHAR(255) | No | NULL | No |
+| company\_id | 公司ID| BIGINT | Yes | NULL | No |
+| activity\_start\_time | 秒杀开始时间| INT | Yes | NULL | No |
+| activity\_end\_time | 秒杀结束时间| INT | Yes | NULL | No |
+| activity\_release\_time | 秒杀活动发布时间| INT | Yes | NULL | No |
+| item\_title | 秒杀活动商品名称| VARCHAR(255) | Yes | NULL | No |
+| item\_pic | 秒杀活动商品图片| LONGTEXT | No | NULL | No |
+| activity\_price | 秒杀活动价格| INT | Yes | 0 | No |
+| activity\_store | 秒杀活动库存| INT | Yes | 0 | No |
+| limit\_num | 秒杀活动限购| INT | Yes | 0 | No |
+| sales\_store | 已购买库存| INT | Yes | 0 | No |
+| sort | 商品排序| INT | Yes | 0 | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+| disabled | 是否失效| TINYINT(1) | Yes | 0 | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| ix\_company\_id | company\_id | No |
+| ix\_seckill\_item\_id | seckill\_id, item\_id | No |
+| ix\_item\_type | item\_type | No |
+| ix\_release\_time | activity\_release\_time | No |
+| ix\_end\_time | activity\_end\_time | No |
+| ix\_itemid\_activityreleasetime\_activityendtime | item\_id, activity\_release\_time, activity\_end\_time | No |
+
+
+## promotions\_specific\_crowd\_discount
+
+> **特定人群促销**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | 营销id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 企业id| BIGINT | Yes | NULL | No |
+| specific\_type | 特定人群类型| VARCHAR(255) | Yes | member_tag | No |
+| specific\_id | 营销id| BIGINT | No | NULL | No |
+| cycle\_type | 周期类型,1:自然月;2:指定时段| INT | Yes | 1 | No |
+| start\_time | 开始时间| BIGINT | No | NULL | No |
+| end\_time | 结束时间| BIGINT | No | NULL | No |
+| discount | 折扣值| BIGINT | No | NULL | No |
+| limit\_total\_money | 每人累计限额| INT | No | NULL | No |
+| status | 状态,1:暂存,2:已发布, 3:停用, 4:已过期| BIGINT | Yes | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| ix\_company\_id | company\_id | No |
+| ix\_status | status | No |
+| ix\_specific\_id | specific\_id | No |
+
+
+## promotions\_turntable\_log
+
+> **用户大转盘中奖纪录表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司ID| BIGINT | Yes | NULL | No |
+| user\_id | 用户id| BIGINT | Yes | NULL | No |
+| prize\_title | 奖品名称| VARCHAR(255) | Yes | NULL | No |
+| prize\_type | 奖品类型,points:积分,coupon:优惠券,coupons:优惠券包| VARCHAR(255) | Yes | NULL | No |
+| act\_id | 抽奖活动的活动id| BIGINT | Yes | NULL | No |
+| prize\_value | 奖品值| LONGTEXT | No | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+
+
+## promotions\_user\_bargains
+
+> **用户砍价表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| bargain\_id | 砍价ID| BIGINT | Yes | NULL | No |
+| user\_id | 用户id| BIGINT | Yes | NULL | No |
+| company\_id | 公司ID| BIGINT | Yes | NULL | No |
+| authorizer\_appid | 公众号的appid| VARCHAR(64) | No | NULL | No |
+| wxa\_appid | 公众号的appid| VARCHAR(64) | No | NULL | No |
+| item\_name | 订单标题| VARCHAR(255) | No | NULL | No |
+| mkt\_price | 市场金额,单位为‘分’| INT | Yes | NULL | No |
+| price | 购买金额,单位为‘分’| INT | Yes | NULL | No |
+| cutprice\_num | 砍价次数| INT | Yes | NULL | No |
+| cutprice\_range | 预先生成的砍价详情| JSON | Yes | NULL | No |
+| cutdown\_amount | 已砍金额,单位为‘分’| INT | Yes | 0 | No |
+| is\_ordered | 是否已下单| TINYINT(1) | Yes | | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | bargain\_id, user\_id | Yes |
+
+
+## refund\_error\_logs
+
+> **退款错误日志**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| order\_id | 订单号| BIGINT | Yes | NULL | No |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| supplier\_id | 供应商id| BIGINT | Yes | 0 | No |
+| wxa\_appid | 小程序appid| VARCHAR(255) | No | NULL | No |
+| data\_json | data数据json格式| LONGTEXT | No | NULL | No |
+| status | 错误状态| VARCHAR(20) | No | NULL | No |
+| error\_code | 错误码| VARCHAR(500) | No | NULL | No |
+| error\_desc | 错误描述| LONGTEXT | No | NULL | No |
+| is\_resubmit | 是否重新提交| TINYINT(1) | No | | No |
+| create\_time | 订单创建时间| INT | Yes | NULL | No |
+| update\_time | 订单更新时间| INT | No | NULL | No |
+| merchant\_id | 商户id| BIGINT | Yes | 0 | No |
+| distributor\_id | 分销商id| BIGINT UNSIGNED | Yes | 0 | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_company | company\_id | No |
+| idx\_merchant\_id | merchant\_id | No |
+| idx\_supplier\_id | supplier\_id | No |
+
+
+## register\_promotions
+
+> **注册营销表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | 注册促销活动ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司ID| BIGINT | Yes | NULL | No |
+| is\_open | 是否开启| VARCHAR(255) | Yes | NULL | No |
+| register\_type | 促销类型。可选值有 general-普通;distributor-分销商| VARCHAR(255) | Yes | general | No |
+| ad\_title | 注册引导广告标题| VARCHAR(255) | No | NULL | No |
+| ad\_pic | 注册引导图片| VARCHAR(255) | Yes | NULL | No |
+| register\_jump\_path | 注册引导跳转路径| VARCHAR(500) | No | NULL | No |
+| promotions\_value | 赠送的参数| LONGTEXT | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+
+
+## reservation\_default\_work\_shift
+
+> **商户配置默认排班**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| company\_id | 公司company id| BIGINT | Yes | NULL | No |
+| shop\_id | 公司门店 id| BIGINT | Yes | NULL | No |
+| work\_shift\_data | 周一至周日每天的排班| LONGTEXT | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | company\_id, shop\_id | Yes |
+
+
+## reservation\_level\_rel\_service
+
+> **资源位服务项目关联表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| resource\_level\_id | 资源位id| BIGINT | Yes | NULL | No |
+| company\_id | 公司 company id| BIGINT | Yes | NULL | No |
+| shop\_id | 门店id| BIGINT | Yes | NULL | No |
+| material\_id | 服务项目id| BIGINT | Yes | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | resource\_level\_id, company\_id, shop\_id, material\_id | Yes |
+
+
+## reservation\_record
+
+> **预约记录表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| record\_id | id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司company id| BIGINT | Yes | NULL | No |
+| shop\_id | 门店id| BIGINT | Yes | NULL | No |
+| shop\_name | 门店名称| VARCHAR(100) | No | NULL | No |
+| agreement\_date | 约定日期| INT | Yes | NULL | No |
+| to\_shop\_time | 到店时间(时间戳)| INT | No | NULL | No |
+| begin\_time | 到店时间(时刻字符串)| VARCHAR(5) | Yes | NULL | No |
+| end\_time | 约定结束时刻| VARCHAR(5) | No | NULL | No |
+| status | 预约状态。可选值有 cancel-取消;-to\_the\_shop-已到店;-not\_to\_shop-未到店;-success-预约成功;-system-系统占位;| VARCHAR(255) | Yes | NULL | No |
+| num | 预约数量| INT | Yes | 1 | No |
+| user\_id | 用户user id| BIGINT | No | NULL | No |
+| user\_name | 用户名称| VARCHAR(100) | No | NULL | No |
+| sex | 用户性别| INT | No | NULL | No |
+| mobile | 预约人手机号| VARCHAR(255) | No | NULL | No |
+| resource\_level\_id | 资源位id| BIGINT | No | NULL | No |
+| resource\_level\_name | 资源位名称| VARCHAR(100) | No | NULL | No |
+| rights\_id | 服务商品id| BIGINT | No | NULL | No |
+| rights\_name | 服务商品名称| VARCHAR(100) | No | NULL | No |
+| label\_id | 服务商品id| BIGINT | No | NULL | No |
+| label\_name | 服务商品名称| VARCHAR(100) | No | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | record\_id | Yes |
+
+
+## reservation\_resource\_level
+
+> **资源位表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| resource\_level\_id | 自增id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 企业company id| VARCHAR(255) | Yes | NULL | No |
+| shop\_id | 门店id| VARCHAR(255) | Yes | NULL | No |
+| shop\_name | 门店名称| VARCHAR(255) | No | NULL | No |
+| name | 资源位昵称| VARCHAR(255) | Yes | NULL | No |
+| description | 简单介绍| VARCHAR(500) | No | NULL | No |
+| status | 状态,active:有效,invalid: 失效| VARCHAR(255) | No | active | No |
+| image\_url | 图片| VARCHAR(255) | No | NULL | No |
+| quantity | 数量| VARCHAR(255) | Yes | 1 | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | resource\_level\_id | Yes |
+
+
+## reservation\_setting
+
+> **预约配置表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司company id| BIGINT | Yes | NULL | No |
+| time\_interval | 预约时间间隔| INT | Yes | NULL | No |
+| resource\_name | 资源位名称| VARCHAR(255) | Yes | NULL | No |
+| max\_limit\_day | 可提前预约天数| INT | Yes | NULL | No |
+| min\_limit\_hour | 可提前预约分钟数| INT | Yes | NULL | No |
+| reservation\_condition | 预约条件| INT | Yes | NULL | No |
+| reservation\_mode | 预约模式| INT | Yes | NULL | No |
+| cancel\_minute | 取消预约最少提前分钟数| INT | Yes | NULL | No |
+| reservation\_num\_limit | 预约限制| LONGTEXT | No | NULL | No |
+| sms\_delay | 预约提醒通知| VARCHAR(255) | No | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+
+
+## reservation\_shift\_type
+
+> **班次类型表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| type\_id | type\_id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司company id| BIGINT | Yes | NULL | No |
+| type\_name | 排班类型名称| VARCHAR(30) | Yes | NULL | No |
+| begin\_time | 排班类型名称| VARCHAR(5) | Yes | NULL | No |
+| end\_time | 排班类型名称| VARCHAR(5) | Yes | NULL | No |
+| status | 类型状态invalid/valid| VARCHAR(10) | Yes | valid | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | type\_id | Yes |
+
+
+## reservation\_work\_shift
+
+> **班次类型表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司company id| BIGINT | Yes | NULL | No |
+| shop\_id | 公司门店 id| BIGINT | Yes | NULL | No |
+| resource\_level\_id | 资源位id| BIGINT | Yes | NULL | No |
+| work\_date | 工作日期| BIGINT | Yes | NULL | No |
+| shift\_type\_id | 工作班次类型id| BIGINT | Yes | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+
+
+## resources
+
+> **资源包表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| resource\_id | 资源包id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| resource\_name | 资源包名称| VARCHAR(255) | Yes | NULL | No |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| eid | 企业id| VARCHAR(255) | Yes | NULL | No |
+| passport\_uid | | VARCHAR(255) | Yes | NULL | No |
+| shop\_num | 资源门店数| INT | Yes | NULL | No |
+| left\_shop\_num | 可用门店数| INT | Yes | NULL | No |
+| source | 资源来源。demo:开通试用,purchased:购买,gift:赠品| VARCHAR(255) | Yes | NULL | No |
+| available\_days | 可用天数| INT | Yes | NULL | No |
+| active\_at | 激活时间| BIGINT | Yes | NULL | No |
+| expired\_at | 过期时间| BIGINT | Yes | NULL | No |
+| active\_code | 激活码| VARCHAR(255) | No | NULL | No |
+| issue\_id | 在线开通工单号| VARCHAR(50) | No | NULL | No |
+| goods\_code | 商品code| VARCHAR(50) | No | NULL | No |
+| product\_code | 基础系统code| VARCHAR(50) | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | resource\_id | Yes |
+
+
+## resources\_op\_log
+
+> **资源操作记录表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | 记录id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| resource\_id | 资源包id| BIGINT | Yes | NULL | No |
+| shop\_id | 门店id| BIGINT | Yes | 0 | No |
+| store\_name | 门店名称| VARCHAR(100) | Yes | NULL | No |
+| op\_time | 操作时间| INT | Yes | NULL | No |
+| op\_type | 操作类型。occupy:占用资源, release:释放资源| VARCHAR(100) | Yes | NULL | No |
+| op\_num | 操作数量| INT | Yes | NULL | No |
+| operator\_id | 操作员id| BIGINT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+
+
+## salesperson\_active\_article\_share\_log
+
+> **活动文章表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司ID| BIGINT | Yes | NULL | No |
+| salesperson\_id | 导购员ID| BIGINT | Yes | NULL | No |
+| article\_id | 活动文章ID| BIGINT | Yes | NULL | No |
+| article\_title | 活动文章标题| VARCHAR(255) | Yes | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+
+
+## salesperson\_active\_article\_statistics
+
+> **导购员活动转发数据统计表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | 激活id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| salesperson\_id | 导购员id| BIGINT | Yes | NULL | No |
+| add\_date | 统计日期 Ymd| INT | Yes | NULL | No |
+| data\_value | 统计数据| INT | Yes | 0 | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| ix\_company\_id | company\_id | No |
+| ix\_salesperson\_id | salesperson\_id | No |
+| ix\_add\_date | add\_date | No |
+
+
+## salesperson\_coupon\_statistics
+
+> **导购员优惠券数据统计表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| distributor\_id | 店铺id| BIGINT | Yes | NULL | No |
+| salesperson\_id | 导购员id| BIGINT | Yes | NULL | No |
+| coupon\_id | 优惠券id| BIGINT | Yes | NULL | No |
+| date | 统计日期 Ymd| BIGINT | Yes | NULL | No |
+| send\_num | 赠送张数| BIGINT | Yes | NULL | No |
+| pay\_num | 支付使用| BIGINT | Yes | NULL | No |
+| receive\_num | 领取张数| BIGINT | Yes | NULL | No |
+| reg\_num | 分享注册数| BIGINT | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| ix\_salesperson\_date | salesperson\_id, date | No |
+
+
+## salesperson\_items\_shelves
+
+> ****
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | 活动ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司ID| BIGINT | Yes | NULL | No |
+| activity\_id | 活动id| BIGINT | Yes | NULL | No |
+| activity\_type | 活动类型 full\_discount:满折,full\_minus:满减,full\_gift:满赠,self\_select:任选优惠,plus\_price\_buy:加价购,group拼团,seckill秒杀,package打包,limited\_time\_sale限时特惠| VARCHAR(255) | Yes | NULL | No |
+| distributor\_id | 门店id, 0是所有门店| BIGINT | No | 0 | No |
+| item\_id | 商品id| BIGINT | Yes | NULL | No |
+| start\_time | 活动开始时间| BIGINT | Yes | NULL | No |
+| end\_time | 活动结束时间| BIGINT | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| ix\_company\_id | company\_id | No |
+| ix\_activity\_type | activity\_type | No |
+| ix\_item\_id | item\_id | No |
+
+
+## salesperson\_leaderboard
+
+> **导购排名**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| distributor\_id | 店铺id| BIGINT | Yes | NULL | No |
+| salesperson\_id | 导购id| BIGINT | Yes | NULL | No |
+| date | 日期| INT | Yes | NULL | No |
+| sales | 销售额| BIGINT | Yes | NULL | No |
+| number | 销售订单数量| BIGINT | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_company\_distributor | company\_id, distributor\_id | No |
+
+
+## salesperson\_leaderboard\_distributor
+
+> **导购店铺排名**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| distributor\_id | 店铺id| BIGINT | Yes | NULL | No |
+| date | 日期| INT | Yes | NULL | No |
+| sales | 销售额| BIGINT | Yes | NULL | No |
+| number | 销售订单数量| BIGINT | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_company\_distributor | company\_id, distributor\_id | No |
+
+
+## salesperson\_notice
+
+> **导购通知**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| notice\_id | 通知id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| title | 通知标题| VARCHAR(255) | Yes | NULL | No |
+| content | 通知内容| LONGTEXT | Yes | NULL | No |
+| distributor\_id | 店铺id| LONGTEXT | No | NULL | No |
+| all\_distributor | 店铺id| LONGTEXT | No | 0 | No |
+| notice\_type | 通知类型,1系统通知,2总部通知,3其他通知| INT | Yes | 1 | No |
+| sent\_times | 发送次数| INT | No | 0 | No |
+| is\_delete | 是否已删除| INT | No | 0 | No |
+| withdraw | 是否撤回| INT | No | 0 | No |
+| last\_sent\_time | 最后发送时间| INT | No | 0 | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | Yes | NULL | No |
+| status | 状态,1未发送,2已发送,3已撤回| INT | No | 1 | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | notice\_id | Yes |
+| ix\_company\_id | company\_id | No |
+| ix\_title | title | No |
+
+
+## salesperson\_notice\_log
+
+> **导购通知**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| log\_id | 主键id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| notice\_id | 通知id| BIGINT | Yes | NULL | No |
+| distributor\_id | 店铺id| INT | Yes | NULL | No |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | log\_id | Yes |
+| ix\_company\_id | company\_id | No |
+| ix\_distributor\_id | distributor\_id | No |
+| ix\_notice\_id | notice\_id | No |
+
+
+## salesperson\_operator\_log
+
+> **商家操作日志表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| log\_id | | BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | 0 | No |
+| distributor\_id | 店铺id| BIGINT | Yes | 0 | No |
+| operator\_id | 操作者id| INT | Yes | 0 | No |
+| request\_uri | 请求资源信息| VARCHAR(255) | No | NULL | No |
+| ip | ip地址| VARCHAR(255) | No | NULL | No |
+| params | 请求参数| JSON | No | NULL | No |
+| operator\_name | 操作内容| VARCHAR(255) | No | NULL | No |
+| created | | INT | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | log\_id | Yes |
+
+
+## salesperson\_profit\_statistics
+
+> **导购员销售提成数据统计表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| distributor\_id | 店铺id| BIGINT | Yes | NULL | No |
+| salesperson\_id | 导购员id| BIGINT | Yes | NULL | No |
+| date | 统计日期 Ymd| BIGINT | Yes | NULL | No |
+| unconfirmed\_seller\_fee | 未确认绑定会员提成| BIGINT | Yes | NULL | No |
+| confirm\_seller\_fee | 已确认绑定会员提成| BIGINT | Yes | NULL | No |
+| unconfirmed\_offline\_seller\_fee | 未确认门店开单提成| BIGINT | Yes | NULL | No |
+| confirm\_offline\_seller\_fee | 已确认门店开单提成| BIGINT | Yes | NULL | No |
+| unconfirmed\_popularize\_seller\_fee | 未确认客户推广提成| BIGINT | Yes | NULL | No |
+| confirm\_popularize\_seller\_fee | 已确认客户推广提成| BIGINT | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| ix\_salesperson\_date | salesperson\_id, date | No |
+
+
+## salesperson\_rel\_coupon
+
+> **导购员优惠券数据统计表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| coupon\_id | 优惠券id| BIGINT | Yes | NULL | No |
+| send\_num | 赠送张数| BIGINT | Yes | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| ix\_company\_id | company\_id | No |
+
+
+## salesperson\_rel\_notice
+
+> **导购通知关联表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| notice\_id | 通知id| BIGINT | Yes | NULL | No |
+| salesperson\_id | 导购员id| BIGINT | Yes | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| ix\_company\_id | company\_id | No |
+| ix\_notice\_id | notice\_id | No |
+| ix\_salesperson\_id | salesperson\_id | No |
+
+
+## salesperson\_sales\_statistics
+
+> **导购员销售额数据统计表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| distributor\_id | 店铺id| BIGINT | Yes | NULL | No |
+| salesperson\_id | 导购员id| BIGINT | Yes | NULL | No |
+| date | 统计日期 Ymd| BIGINT | Yes | NULL | No |
+| popularize\_order\_fee | 推广销售额| BIGINT | Yes | NULL | No |
+| popularize\_order\_count | 推广订单数| BIGINT | Yes | NULL | No |
+| offline\_order\_fee | 门店开单金额| BIGINT | Yes | NULL | No |
+| offline\_order\_count | 门店开单数| BIGINT | Yes | NULL | No |
+| total\_refund\_fee | 退款金额| BIGINT | Yes | NULL | No |
+| total\_refund\_count | 退款单数| BIGINT | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| ix\_salesperson\_date | salesperson\_id, date | No |
+
+
+## salesperson\_signup\_log
+
+> **导购到/签退记录**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| salesperson\_id | 导购员id| BIGINT | Yes | NULL | No |
+| distributor\_id | 店铺id| BIGINT | Yes | 0 | No |
+| sign\_type | signin 签到, signout 主动签退, forceout 被动签退| VARCHAR(255) | Yes | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| ix\_company\_id | company\_id | No |
+| ix\_salesperson\_id | salesperson\_id | No |
+
+
+## salesperson\_task
+
+> **导购任务表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| task\_id | ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| start\_time | 开始时间| BIGINT | Yes | NULL | No |
+| end\_time | 结束时间| BIGINT | Yes | NULL | No |
+| task\_name | 任务名称| VARCHAR(255) | Yes | NULL | No |
+| task\_type | 任务类型 1 转发分享 2 获取新客 3 客户下单 4 会员福利| SMALLINT | Yes | NULL | No |
+| task\_quota | 任务指标| SMALLINT | Yes | NULL | No |
+| pics | 任务指标| JSON | No | NULL | No |
+| task\_content | 任务内容| LONGTEXT | Yes | NULL | No |
+| use\_all\_distributor | 是否是全部店铺| TINYINT(1) | No | | No |
+| disabled | 任务指标| VARCHAR(30) | Yes | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | task\_id | Yes |
+| idx\_company\_id | company\_id | No |
+
+
+## salesperson\_task\_record
+
+> **导购任务表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| task\_id | 任务id| BIGINT | Yes | NULL | No |
+| distributor\_id | 店铺id| BIGINT | Yes | NULL | No |
+| salesperson\_id | 导购id| BIGINT | Yes | NULL | No |
+| times | 次数| SMALLINT | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_company\_task | company\_id, task\_id | No |
+
+
+## salesperson\_task\_record\_logs
+
+> **导购任务表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| task\_id | 任务id| BIGINT | Yes | NULL | No |
+| distributor\_id | 店铺id| BIGINT | Yes | NULL | No |
+| salesperson\_id | 导购id| BIGINT | Yes | NULL | No |
+| remark | 任务记录备注| JSON | No | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+
+
+## salesperson\_task\_rel\_distributor
+
+> **导购任务表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| task\_id | ID| BIGINT | Yes | NULL | No |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| distributor\_id | 门店id| BIGINT | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | task\_id, company\_id, distributor\_id | Yes |
+
+
+## self\_delivery\_staff
+
+> **自配送员工信息表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | | BIGINT | Yes | NULL | No |
+| operator\_id | | BIGINT | Yes | NULL | No |
+| distributor\_id | 配送员所属店铺id| INT | No | 0 | No |
+| shop\_id | 配送员所属门店id| INT | No | 0 | No |
+| staff\_attribute | 配送员属性。full\_time:全职;part\_time:兼职;| VARCHAR(255) | Yes | full_time | No |
+| staff\_no | 配送员编号。| VARCHAR(255) | No | NULL | No |
+| staff\_type | 配送员类型。platform:平台;distributor:店铺;shop:商家;| VARCHAR(255) | Yes | distributor | No |
+| payment\_method | 结算方式。order:订单;amount:订单金额;| VARCHAR(255) | Yes | order | No |
+| payment\_fee | 结合payment\_method计算使用,结算费用 分 或 百分比| INT | Yes | 0 | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_company\_id | company\_id | No |
+| idx\_operator\_id | operator\_id | No |
+
+
+## selfservice\_form\_setting
+
+> **自助表单配置**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| distributor\_id | 店铺id| BIGINT | Yes | 0 | No |
+| field\_title | 表单项标题(中文描述)| VARCHAR(255) | Yes | NULL | No |
+| pic\_name | 图片描述| VARCHAR(50) | No | NULL | No |
+| field\_name | 表单项英文名称(英文或拼音描述),唯一标示| VARCHAR(255) | Yes | NULL | No |
+| form\_element | 表单元素,text:文本,textarea:文本域,select:选择框,radio:单选,checkbox:多选框,date:日期选择,time:时间选择,area:地区地址选择, image:图片上传,number:纯数字| VARCHAR(255) | No | NULL | No |
+| image\_url | 元素配图| VARCHAR(255) | No | NULL | No |
+| status | 状态;1:有效,2:弃用| INT | Yes | 1 | No |
+| sort | 排序,数字越大越靠前| INT | Yes | 1 | No |
+| is\_required | 是否必填| TINYINT(1) | Yes | | No |
+| options | 表单元素为选择类时选择项(json)当form\_element in (select, radio, checkbox)时,此项必填| LONGTEXT | No | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+
+
+## selfservice\_form\_template
+
+> **自助表单模板**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | | BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | | BIGINT | Yes | NULL | No |
+| distributor\_id | 店铺id| BIGINT | Yes | 0 | No |
+| tem\_name | 表单模板名称| VARCHAR(255) | Yes | NULL | No |
+| tem\_type | 表单模板类型;ask\_answer\_paper:问答考卷,basic\_entry:基础录入| VARCHAR(255) | Yes | NULL | No |
+| content | 表单模板内容| LONGTEXT | Yes | NULL | No |
+| status | 状态; 1:有效,2:弃用| INT | Yes | 1 | No |
+| key\_index | 表单关键指数| LONGTEXT | No | NULL | No |
+| form\_style | 表单关键指数, single:单页问卷, multiple:多页问卷| VARCHAR(255) | No | NULL | No |
+| header\_link\_title | 头部文字| VARCHAR(500) | No | NULL | No |
+| header\_bg\_pic | 头部背景图片| VARCHAR(300) | No | NULL | No |
+| header\_height | 头部留白高度(px)| VARCHAR(20) | No | NULL | No |
+| header\_title | 头部文字内容| VARCHAR(500) | No | NULL | No |
+| bottom\_title | 表单关键指数| VARCHAR(500) | No | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_company\_id | company\_id | No |
+
+
+## selfservice\_registration\_activity
+
+> **报名问卷活动**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| activity\_id | | BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| distributor\_id | 店铺id| BIGINT | Yes | 0 | No |
+| temp\_id | 表单模板id| BIGINT | Yes | NULL | No |
+| activity\_name | 活动名称| VARCHAR(200) | Yes | NULL | No |
+| area | 活动城市(省市)| VARCHAR(100) | No | NULL | No |
+| place | 活动地点| VARCHAR(100) | No | NULL | No |
+| address | 详情地址| VARCHAR(200) | No | NULL | No |
+| intro | 活动简介| VARCHAR(500) | No | NULL | No |
+| show\_fields | 前端展示字段| VARCHAR(100) | No | NULL | No |
+| pics | 活动轮播图| LONGTEXT | Yes | NULL | No |
+| gift\_points | 奖励积分| INT | Yes | NULL | No |
+| is\_allow\_duplicate | 是否允许重复报名(1或0)| INT | Yes | NULL | No |
+| is\_allow\_cancel | 是否允许取消报名(1或0)| INT | Yes | NULL | No |
+| is\_offline\_verify | 是否线下核销(1或0)| INT | Yes | NULL | No |
+| is\_need\_check | 是否需要审核(1或0)| INT | Yes | NULL | No |
+| is\_white\_list | 是否自动加入内购白名单(1或0)| INT | Yes | NULL | No |
+| enterprise\_ids | 内购白名单企业ID| LONGTEXT | No | | No |
+| group\_no | 活动分组编码| VARCHAR(15) | No | | No |
+| member\_level | 适用会员等级| VARCHAR(50) | No | NULL | No |
+| distributor\_ids | 适用店铺| VARCHAR(100) | No | | No |
+| join\_tips | 活动参与提示信息| VARCHAR(200) | No | NULL | No |
+| submit\_form\_tips | 表单填写提示信息| LONGTEXT | No | NULL | No |
+| content | 图文详情| LONGTEXT | No | NULL | No |
+| start\_time | 活动开始时间| INT | Yes | NULL | No |
+| end\_time | 活动结束时间| INT | Yes | NULL | No |
+| join\_limit | 可参与次数| INT | Yes | 0 | No |
+| is\_sms\_notice | 是否短信通知| TINYINT(1) | Yes | 1 | No |
+| is\_wxapp\_notice | 是否小程序模板通知| TINYINT(1) | Yes | 1 | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+| company\_id | | BIGINT | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | activity\_id | Yes |
+| idx\_temp\_id | temp\_id | No |
+| idx\_start\_time | start\_time | No |
+| idx\_group\_no | group\_no | No |
+
+
+## selfservice\_registration\_activity\_rel\_shop
+
+> **报名活动关联店铺**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | | BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| activity\_id | 报名活动ID| BIGINT | Yes | NULL | No |
+| distributor\_id | 店铺ID| BIGINT | Yes | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_activity\_id | activity\_id | No |
+| idx\_distributor\_id | distributor\_id | No |
+
+
+## selfservice\_registration\_record
+
+> **报名记录**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| record\_id | | BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| activity\_id | 活动id| BIGINT | Yes | NULL | No |
+| distributor\_id | 店铺id| BIGINT | Yes | 0 | No |
+| record\_no | 报名编号| BIGINT | Yes | 0 | No |
+| group\_no | 活动分组编码| VARCHAR(15) | No | | No |
+| form\_id | 表单id| BIGINT | Yes | NULL | No |
+| get\_points | 获取到积分| BIGINT | Yes | NULL | No |
+| verify\_code | 核销码| BIGINT | Yes | NULL | No |
+| verify\_time | 核销时间| BIGINT | Yes | 0 | No |
+| verify\_operator | 核销员| VARCHAR(50) | No | | No |
+| true\_name | 真实姓名| VARCHAR(30) | No | | No |
+| is\_white\_list | 是否加入白名单| BIGINT | Yes | NULL | No |
+| user\_id | 会员id| BIGINT | Yes | NULL | No |
+| mobile | 手机号| VARCHAR(255) | Yes | NULL | No |
+| form\_mobile | 表单填写手机号| VARCHAR(255) | Yes | | No |
+| wxapp\_appid | 会员小程序appid| VARCHAR(32) | No | NULL | No |
+| open\_id | 会员小程序openid| VARCHAR(32) | No | NULL | No |
+| status | 状态: pending 待审核,passed 已通过,rejected 已拒绝, canceled 已取消, verified 已核销| VARCHAR(32) | Yes | pending | No |
+| content | 报名内容| LONGTEXT | Yes | NULL | No |
+| reason | 拒绝原因| LONGTEXT | No | NULL | No |
+| remark | 备注| LONGTEXT | No | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+| company\_id | 公司\_ID| BIGINT | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | record\_id | Yes |
+| idx\_activity\_id | activity\_id | No |
+| idx\_user\_id | user\_id | No |
+| idx\_true\_name | true\_name | No |
+| idx\_created | created | No |
+| idx\_status | status | No |
+| idx\_company\_id | company\_id | No |
+
+
+## selfservice\_user\_daily\_record
+
+> **用户日常数据记录表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | | BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| operator\_id | 操作员id| BIGINT | No | NULL | No |
+| operator | 操作员名称或手机| VARCHAR(255) | No | NULL | No |
+| user\_id | 用户id| BIGINT | Yes | NULL | No |
+| record\_date | 记录提交日期| INT | Yes | NULL | No |
+| shop\_id | 门店id| BIGINT | No | NULL | No |
+| temp\_id | 模板id| BIGINT | No | NULL | No |
+| form\_data | 记录表单内容| LONGTEXT | Yes | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_company\_id | company\_id | No |
+
+
+## service\_orders
+
+> **服务订单表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| order\_id | 订单号| BIGINT | Yes | NULL | No |
+| title | 订单标题| VARCHAR(255) | No | NULL | No |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| shop\_id | 店铺id| BIGINT | Yes | 0 | No |
+| store\_name | 店铺名称| VARCHAR(255) | No | NULL | No |
+| user\_id | 用户id| BIGINT | No | NULL | No |
+| consume\_type | 核销类型,every:每个物料都要核销(例如3个物料要核销3次),all:所有物料作为一个整体核销一次(例如3个物料只需要核销1次)| VARCHAR(15) | Yes | NULL | No |
+| item\_id | 商品id| BIGINT | Yes | NULL | No |
+| item\_brief | 商品描述| VARCHAR(255) | No | NULL | No |
+| item\_pics | 商品图片| VARCHAR(255) | No | NULL | No |
+| source\_id | 订单来源id| BIGINT | No | NULL | No |
+| bargain\_id | 活动id| BIGINT | No | NULL | No |
+| monitor\_id | 订单监控页面id| BIGINT | No | NULL | No |
+| salesman\_id | 导购员ID| BIGINT | No | 0 | No |
+| item\_num | 购买商品数量| VARCHAR(255) | Yes | NULL | No |
+| mobile | 手机号| VARCHAR(255) | No | NULL | No |
+| total\_fee | 订单金额,以分为单位| VARCHAR(255) | Yes | NULL | No |
+| step\_paid\_fee | 分阶段付款已支付金额,以分为单位| INT UNSIGNED | No | 0 | No |
+| order\_class | 订单种类。可选值有 normal 普通订单;groups 拼团订单| VARCHAR(255) | Yes | normal | No |
+| order\_status | 订单状态。可选值有 DONE—订单完成;NOTPAY—未支付;PART\_PAYMENT-部分付款;WAIT\_GROUPS\_SUCCESS-等待拼团成功;PAYED-已支付;CANCEL—已取消| VARCHAR(255) | Yes | NULL | No |
+| order\_source | 订单来源。可选值有 member 用户自主下单;shop 商家代客下单| VARCHAR(255) | No | member | No |
+| operator\_desc | 操作员信息| VARCHAR(100) | No | NULL | No |
+| order\_type | 订单类型| VARCHAR(255) | No | NULL | No |
+| create\_time | 订单创建时间| INT | Yes | NULL | No |
+| update\_time | 订单更新时间| INT | No | NULL | No |
+| auto\_cancel\_time | 订单自动取消时间| VARCHAR(255) | Yes | NULL | No |
+| date\_type | 有效期的类型, DATE\_TYPE\_FIX\_TIME\_RANGE: 指定日期范围内,DATE\_TYPE\_FIX\_TERM:固定天数后| VARCHAR(255) | No | NULL | No |
+| begin\_date | 有效期开始时间| INT | No | NULL | No |
+| end\_date | 有效期结束时间| INT | No | NULL | No |
+| fixed\_term | 有效期的有效天数| INT | No | NULL | No |
+| cost\_fee | 商品成本价,以分为单位| INT UNSIGNED | Yes | NULL | No |
+| item\_fee | 商品总金额,以分为单位| INT UNSIGNED | Yes | NULL | No |
+| member\_discount | 会员折扣金额,以分为单位| INT UNSIGNED | Yes | NULL | No |
+| coupon\_discount | 优惠券抵扣金额,以分为单位| INT UNSIGNED | Yes | NULL | No |
+| coupon\_discount\_desc | 优惠券使用详情| LONGTEXT | No | NULL | No |
+| member\_discount\_desc | 会员折扣使用详情| LONGTEXT | No | NULL | No |
+| fee\_type | 货币类型| VARCHAR(5) | Yes | CNY | No |
+| fee\_rate | 货币汇率| DOUBLE PRECISION | Yes | 1 | No |
+| fee\_symbol | 货币符号| VARCHAR(255) | Yes | ¥ | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | order\_id | Yes |
+
+
+## servicelabels
+
+> **数值属性表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| label\_id | 数值属性ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| label\_name | 数值属性名称| VARCHAR(255) | Yes | NULL | No |
+| label\_price | 价格,单位为‘分’| INT | Yes | NULL | No |
+| service\_type | 会员数值属性类型,point:积分类型,deposit:预存类型,timescard:次卡类型| VARCHAR(30) | Yes | NULL | No |
+| label\_desc | 数值属性描述| VARCHAR(255) | Yes | NULL | No |
+| company\_id | 公司ID| BIGINT | Yes | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | label\_id | Yes |
+
+
+## shipping\_templates
+
+> **运费模板表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| template\_id | 运费模板id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 商家id| BIGINT | Yes | NULL | No |
+| name | 运费模板名称| VARCHAR(50) | Yes | | No |
+| is\_free | 是否包邮| VARCHAR(255) | Yes | 0 | No |
+| distributor\_id | 分销商id| BIGINT UNSIGNED | Yes | 0 | No |
+| supplier\_id | 供应商id| BIGINT UNSIGNED | Yes | 0 | No |
+| valuation | 运费计算参数来源| VARCHAR(1) | Yes | 1 | No |
+| protect | 物流保价| TINYINT(1) | No | | No |
+| protect\_rate | 保价费率| NUMERIC(6, 3) | No | 0.000 | No |
+| minprice | 保价费最低值| NUMERIC(10, 2) | No | 0.00 | No |
+| status | 是否开启| TINYINT(1) | Yes | 1 | No |
+| fee\_conf | 运费模板中运费信息对象,包含默认运费和指定地区运费| LONGTEXT | No | NULL | No |
+| nopost\_conf | 不包邮地区| LONGTEXT | No | [] | No |
+| free\_conf | 指定包邮的条件| LONGTEXT | No | NULL | No |
+| create\_time | 创建时间| INT | Yes | NULL | No |
+| update\_time | 最后修改时间| INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | template\_id | Yes |
+
+
+## shop\_comments
+
+> **店铺评论表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| item\_id | 评论id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| VARCHAR(255) | Yes | NULL | No |
+| user\_id | 用户id| VARCHAR(255) | Yes | NULL | No |
+| shop\_id | 店铺id| VARCHAR(255) | Yes | 0 | No |
+| content | 评论内容| VARCHAR(2000) | Yes | NULL | No |
+| pics | 评论图片| JSON | No | NULL | No |
+| is\_reply | 评论是否回复| TINYINT(1) | No | | No |
+| reply\_content | 评论回复内容| VARCHAR(2000) | No | NULL | No |
+| stuck | 是否置顶| TINYINT(1) | Yes | | No |
+| hid | 是否隐藏| TINYINT(1) | Yes | | No |
+| reply\_time | 回复时间| BIGINT | No | NULL | No |
+| source | 评论来源| VARCHAR(255) | No | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | item\_id | Yes |
+
+
+## shop\_menu
+
+> **商家和平台端菜单管理**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| shopmenu\_id | 菜单id| BIGINT | Yes | NULL | No |
+| company\_id | 公司id,company\_id为0的时候表示通用| INT | Yes | NULL | No |
+| alias\_name | 菜单别名,唯一值| VARCHAR(255) | No | NULL | No |
+| name | 菜单名称| VARCHAR(255) | Yes | NULL | No |
+| url | 菜单对应路由| VARCHAR(255) | Yes | NULL | No |
+| sort | 排序| INT | No | NULL | No |
+| is\_menu | 是否为菜单| TINYINT(1) | No | NULL | No |
+| pid | 上级菜单id| BIGINT | Yes | 0 | No |
+| apis | API权限集| LONGTEXT | No | NULL | No |
+| icon | 菜单图标| VARCHAR(255) | No | NULL | No |
+| is\_show | 是否显示| TINYINT(1) | Yes | NULL | No |
+| version | 菜单版本,1:平台菜单;2:IT端菜单,3:店铺菜单,4:供应商菜单,5:经销商菜单,6:商户菜单| SMALLINT | Yes | 1 | No |
+| disabled | 是否有效| TINYINT(1) | Yes | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | shopmenu\_id, company\_id | Yes |
+| ix\_company\_id | company\_id | No |
+
+
+## shop\_menu\_rel\_type
+
+> **菜单类型关联**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| rel\_id | 关联ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| shopmenu\_id | 菜单id| BIGINT | Yes | NULL | No |
+| menu\_type | 菜单类型| INT | Yes | 1 | No |
+| company\_id | 公司ID| INT | Yes | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | 更新时间| INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | rel\_id | Yes |
+| ix\_shopmenu\_id | shopmenu\_id | No |
+
+
+## shop\_notice
+
+> **店铺公告表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| notice\_id | | BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| type | 公告类型。可选值有 notice-公告;helper-店主助手| VARCHAR(255) | Yes | NULL | No |
+| title | 公告标题| VARCHAR(255) | Yes | NULL | No |
+| web\_link | 网页链接| VARCHAR(255) | Yes | NULL | No |
+| is\_publish | 是否发布 0:不发布 1:发布| TINYINT(1) | Yes | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | notice\_id | Yes |
+
+
+## shop\_rel\_salesperson
+
+> **店铺管理员关联店铺表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| shop\_id | 店铺id| BIGINT | Yes | NULL | No |
+| salesperson\_id | 店铺管理员id| BIGINT | Yes | NULL | No |
+| company\_id | 公司company id| BIGINT | Yes | NULL | No |
+| store\_type | 店铺类型,shop:门店, distributor:店铺| VARCHAR(255) | Yes | shop | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | shop\_id, salesperson\_id | Yes |
+| ix\_company\_id | company\_id | No |
+
+
+## shop\_salesperson
+
+> **门店人员**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| salesperson\_id | 门店人员ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| name | 姓名| VARCHAR(500) | Yes | NULL | No |
+| mobile | 手机号| VARCHAR(255) | Yes | NULL | No |
+| created\_time | 创建时间| VARCHAR(255) | Yes | NULL | No |
+| salesperson\_type | 人员类型 admin: 管理员; verification\_clerk:核销员; shopping\_guide:导购员| VARCHAR(255) | Yes | admin | No |
+| company\_id | 公司company id| BIGINT | Yes | NULL | No |
+| user\_id | 关联会员id| INT | Yes | 0 | No |
+| child\_count | 导购员引入的会员数| INT | Yes | 0 | No |
+| is\_valid | 是否有效| VARCHAR(255) | Yes | true | No |
+| shop\_id | 门店id| VARCHAR(255) | No | NULL | No |
+| shop\_name | 门店名称| VARCHAR(255) | No | NULL | No |
+| number | 导购员编号| VARCHAR(50) | No | NULL | No |
+| friend\_count | 导购员会员好友数| INT | Yes | 0 | No |
+| work\_userid | 企业微信userid[如果是内部应用则是明文,如果是第三方应用则是密文]| VARCHAR(255) | No | NULL | No |
+| work\_clear\_userid | 企业微信userid[用于对接导购存储明文userid]| VARCHAR(255) | No | NULL | No |
+| avatar | 企业微信头像| VARCHAR(255) | No | NULL | No |
+| work\_configid | 企业微信userid| VARCHAR(255) | No | NULL | No |
+| work\_qrcode\_configid | 企业微信userid| VARCHAR(255) | No | NULL | No |
+| role | 导购权限集合| VARCHAR(255) | No | NULL | No |
+| salesperson\_job | 职务| VARCHAR(50) | No | | No |
+| employee\_status | 员工类型 [1 员工] [2 编外]| INT | Yes | 1 | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | salesperson\_id | Yes |
+
+
+## sms\_idiograph
+
+> **短信签名表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | company\_id| BIGINT | Yes | NULL | No |
+| shopex\_uid | shopex账号id| BIGINT | Yes | NULL | No |
+| idiograph | 签名内容| VARCHAR(20) | Yes | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+
+
+## sms\_template
+
+> **短信模板表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | company\_id| BIGINT | Yes | NULL | No |
+| sms\_type | 短信类型| VARCHAR(255) | Yes | notice | No |
+| tmpl\_type | 模板分类| VARCHAR(255) | Yes | NULL | No |
+| content | 模板内容| LONGTEXT | Yes | NULL | No |
+| is\_open | 是否开启| VARCHAR(255) | Yes | NULL | No |
+| tmpl\_name | 模板名称| VARCHAR(255) | Yes | NULL | No |
+| send\_time\_desc | 短信发送触发时间描述| VARCHAR(255) | Yes | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+
+
+## sources
+
+> **小程序来源列表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| source\_id | 来源id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| source\_name | 来源名称| VARCHAR(255) | Yes | NULL | No |
+| tags\_id | 会员标签| LONGTEXT | No | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | source\_id | Yes |
+
+
+## statement\_details
+
+> **结算单明细**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| merchant\_id | 商户id| BIGINT | Yes | NULL | No |
+| supplier\_id | 供应商ID| BIGINT | Yes | 0 | No |
+| distributor\_id | 店铺id| BIGINT | Yes | NULL | No |
+| statement\_id | 结算单ID| BIGINT | Yes | NULL | No |
+| statement\_no | 结算单号| VARCHAR(20) | Yes | NULL | No |
+| order\_id | 订单号| BIGINT | Yes | NULL | No |
+| total\_fee | 实付金额,以分为单位| INT | Yes | NULL | No |
+| freight\_fee | 运费金额,以分为单位| INT | Yes | NULL | No |
+| intra\_city\_freight\_fee | 同城配金额,以分为单位| INT | Yes | NULL | No |
+| rebate\_fee | 分销佣金,以分为单位| INT | Yes | NULL | No |
+| refund\_fee | 退款金额,以分为单位| INT | Yes | NULL | No |
+| statement\_fee | 结算金额,以分为单位| INT | Yes | NULL | No |
+| pay\_type | 支付方式| VARCHAR(255) | Yes | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+| num | 购买数量| INT | No | NULL | No |
+| item\_fee | 销售总金额,以分为单位| INT | No | NULL | No |
+| commission\_fee | 佣金金额,以分为单位| INT | No | NULL | No |
+| cost\_fee | 结算金额,以分为单位| INT | No | NULL | No |
+| point\_fee | 积分抵扣 按分计算| INT | No | NULL | No |
+| refund\_num | 退货数量| INT | No | NULL | No |
+| refund\_point | 退款积分| INT | No | NULL | No |
+| refund\_cost\_fee | 退货成本| INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_statement\_id | statement\_id | No |
+| idx\_supplier\_id | supplier\_id | No |
+| idx\_created | created | No |
+
+
+## statement\_period\_setting
+
+> **结算周期设置**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| merchant\_id | 商户id| BIGINT | Yes | NULL | No |
+| distributor\_id | 店铺id| BIGINT | Yes | NULL | No |
+| supplier\_id | 供应商ID| BIGINT | Yes | NULL | No |
+| period | 结算周期 day:天 week:周 month:月| VARCHAR(255) | Yes | NULL | No |
+| merchant\_type | 商户类型:distributor 经销商,supplier 供应商| VARCHAR(30) | No | distributor | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_supplier\_id | supplier\_id | No |
+| idx\_distributor\_id | distributor\_id | No |
+
+
+## statements
+
+> **结算单**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| merchant\_id | 商户id| BIGINT | Yes | NULL | No |
+| supplier\_id | 供应商ID| BIGINT | Yes | 0 | No |
+| distributor\_id | 店铺id| BIGINT | Yes | NULL | No |
+| merchant\_type | 商户类型:distributor 经销商,supplier 供应商| VARCHAR(30) | No | distributor | No |
+| statement\_no | 结算单号| VARCHAR(20) | Yes | NULL | No |
+| order\_num | 订单数量| INT UNSIGNED | Yes | NULL | No |
+| total\_fee | 实付金额,以分为单位| INT | Yes | NULL | No |
+| freight\_fee | 运费金额,以分为单位| INT | Yes | NULL | No |
+| intra\_city\_freight\_fee | 同城配金额,以分为单位| INT | Yes | NULL | No |
+| rebate\_fee | 分销佣金,以分为单位| INT | Yes | NULL | No |
+| refund\_fee | 退款金额,以分为单位| INT | Yes | NULL | No |
+| statement\_fee | 结算金额,以分为单位| INT | Yes | NULL | No |
+| start\_time | 结算周期开始时间| INT | Yes | NULL | No |
+| end\_time | 结算周期结束时间| INT | Yes | NULL | No |
+| confirm\_time | 确认时间| INT | No | NULL | No |
+| statement\_time | 结算时间| INT | No | NULL | No |
+| statement\_status | 结算状态 ready:待商家确认 confirmed待平台结算 done:已结算| VARCHAR(255) | Yes | ready | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+| point\_fee | 积分抵扣 按分计算| INT | No | NULL | No |
+| refund\_num | 退货数量| INT | No | NULL | No |
+| refund\_point | 退款积分| INT | No | NULL | No |
+| refund\_cost\_fee | 退货成本| INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_merchant\_type | merchant\_type | No |
+| idx\_supplier\_id | supplier\_id | No |
+| idx\_distributor\_id | distributor\_id | No |
+| idx\_start\_time | start\_time | No |
+
+
+## sub\_orders
+
+> **服务类子订单表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| order\_id | 订单号| BIGINT | Yes | NULL | No |
+| item\_id | 商品id| BIGINT | Yes | NULL | No |
+| label\_id | 数值属性ID| BIGINT | Yes | NULL | No |
+| company\_id | 公司ID| BIGINT | Yes | NULL | No |
+| item\_name | 商品名称| VARCHAR(255) | Yes | NULL | No |
+| label\_name | 数值属性名称| VARCHAR(255) | Yes | NULL | No |
+| label\_price | 价格,单位为‘分’| INT | Yes | NULL | No |
+| num | 数值属性值,例如买了50个次卡,就是填50;赠送了10个经验,就是填10| BIGINT | Yes | NULL | No |
+| limit\_time | 有效期,例如30天| BIGINT | Yes | NULL | No |
+| is\_not\_limit\_num | 限制核销次数,1:不限制;2:限制| INT | Yes | 2 | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | order\_id, item\_id, label\_id | Yes |
+
+
+## super\_admin\_accounts
+
+> **平台账号表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| account\_id | 账号id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| login\_name | 登录账号名| VARCHAR(255) | Yes | NULL | No |
+| password | 密码| VARCHAR(255) | Yes | NULL | No |
+| name | 姓名| VARCHAR(255) | Yes | NULL | No |
+| super | 是否超级管理员| TINYINT(1) | Yes | | No |
+| status | 是否启用| TINYINT(1) | Yes | | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | account\_id | Yes |
+
+
+## superadmin\_wxapp\_template
+
+> **小程序模板表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | | BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| key\_name | 小程序英文描述| VARCHAR(255) | Yes | NULL | No |
+| name | 小程序模板名称| VARCHAR(255) | No | NULL | No |
+| tag | 小程序标签| VARCHAR(255) | No | NULL | No |
+| template\_id | 模板id| INT | No | NULL | No |
+| template\_id\_2 | 模板id(直播版)| INT | No | NULL | No |
+| version | 版本号| VARCHAR(255) | No | NULL | No |
+| is\_only | 是否为唯一属性,如果为唯一属性那么当前模版只能绑定一个小程序| TINYINT(1) | Yes | | No |
+| description | 模板详细描述| VARCHAR(255) | No | NULL | No |
+| domain | 合法域名配置| LONGTEXT | No | NULL | No |
+| is\_disabled | 是否禁用| TINYINT(1) | Yes | | No |
+| platform | 使用平台。可选值有 development-开发环境;preissue-预发布环境;production-正式环境;| VARCHAR(255) | Yes | development | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| uniq\_857ebfc6d824a5cf | key\_name | Yes |
+| primary | id | Yes |
+
+
+## supplier
+
+> **供应商**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 商户id| BIGINT | Yes | NULL | No |
+| supplier\_name | 供应商名称| VARCHAR(100) | No | NULL | No |
+| contact | 联系人| VARCHAR(30) | No | | No |
+| mobile | 手机号| VARCHAR(30) | No | | No |
+| business\_license | 营业执照| VARCHAR(200) | No | NULL | No |
+| wechat\_qrcode | 企业微信二维码| VARCHAR(200) | No | NULL | No |
+| service\_tel | 客服电话| VARCHAR(30) | No | NULL | No |
+| bank\_name | 收款银行| VARCHAR(50) | No | NULL | No |
+| bank\_account | 收款账号| VARCHAR(50) | No | NULL | No |
+| is\_check | 是否审核| BIGINT | Yes | NULL | No |
+| audit\_remark | 审核备注| VARCHAR(500) | No | NULL | No |
+| adapay\_mch\_id | 汇付商户ID| VARCHAR(50) | No | NULL | No |
+| wx\_openid | 微信公众号openid| VARCHAR(100) | No | NULL | No |
+| operator\_id | 管理员id| BIGINT | Yes | NULL | No |
+| add\_time | 创建时间| DATETIME | No | NULL | No |
+| modify\_time | 更新时间| DATETIME | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_supplier\_name | supplier\_name | No |
+| idx\_mobile | mobile | No |
+| idx\_is\_check | is\_check | No |
+
+
+## supplier\_items
+
+> **商品表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| item\_id | 商品ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| item\_type | 商品类型,services:服务商品,normal: 普通商品| VARCHAR(15) | Yes | services | No |
+| item\_category | 商品主类目| VARCHAR(15) | No | null | No |
+| consume\_type | 核销类型,every:每个物料都要核销(例如3个物料要核销3次),all:所有物料作为一个整体核销一次(例如3个物料只需要核销1次)| VARCHAR(15) | Yes | every | No |
+| item\_name | 商品名称| VARCHAR(255) | Yes | NULL | No |
+| item\_bn | 商品编号| VARCHAR(255) | Yes | NULL | No |
+| barcode | 商品条形码| LONGTEXT | Yes | NULL | No |
+| brief | 简洁的描述| VARCHAR(255) | Yes | NULL | No |
+| company\_id | 公司ID| BIGINT | Yes | NULL | No |
+| price | 销售价,单位为‘分’| INT | Yes | NULL | No |
+| cost\_price | 成本价,单位为‘分’| INT | No | 0 | No |
+| item\_unit | 商品计量单位| VARCHAR(255) | No | NULL | No |
+| special\_type | 商品特殊类型 drug 处方药 normal 普通商品| VARCHAR(255) | No | normal | No |
+| item\_address\_province | 产地省| VARCHAR(255) | No | NULL | No |
+| item\_address\_city | 产地市| VARCHAR(255) | No | NULL | No |
+| regions\_id | 产地地区id| VARCHAR(255) | No | NULL | No |
+| regions | 产地地区| LONGTEXT | No | NULL | No |
+| store | 库存| INT | No | NULL | No |
+| sales | 销量| INT | No | 0 | No |
+| rebate\_conf | 分销配置| JSON | No | NULL | No |
+| rebate | 推广商品 1已选择 0未选择 2申请加入 3拒绝| INT | No | NULL | No |
+| rebate\_type | 分佣计算方式| VARCHAR(255) | No | default | No |
+| approve\_status | 商品状态 onsale 前台可销售,offline\_sale前端不展示,instock 不可销售, only\_show 前台仅展示| VARCHAR(255) | Yes | NULL | No |
+| audit\_status | 审核状态 submiting待提交 approved成功 processing审核中 rejected审核拒绝| VARCHAR(255) | No | approved | No |
+| audit\_reason | 审核拒绝原因| LONGTEXT | No | NULL | No |
+| market\_price | 原价,单位为‘分’| INT | Yes | NULL | No |
+| goods\_function | 商品功能| VARCHAR(255) | No | NULL | No |
+| goods\_series | 商品系列| VARCHAR(255) | No | NULL | No |
+| goods\_color | 商品颜色| VARCHAR(255) | No | NULL | No |
+| goods\_brand | 商品品牌| VARCHAR(255) | No | NULL | No |
+| is\_default | 商品是否为默认商品| TINYINT(1) | No | 1 | No |
+| default\_item\_id | 默认商品ID| BIGINT | No | 0 | No |
+| goods\_id | 产品ID| BIGINT | No | 0 | No |
+| nospec | 商品是否为单规格| VARCHAR(255) | No | true | No |
+| weight | 商品重量| DOUBLE PRECISION | No | 0 | No |
+| sort | 商品排序| INT | Yes | 0 | No |
+| is\_epidemic | 是否为疫情需要登记的商品 1:是 0:否| INT | No | 0 | No |
+| templates\_id | 运费模板id| INT | No | NULL | No |
+| pics | 图片| JSON | Yes | NULL | No |
+| pics\_create\_qrcode | 图片是否生成小程序码| JSON | No | NULL | No |
+| video\_type | 视频类型 local:本地视频 tencent:腾讯视频| VARCHAR(255) | Yes | local | No |
+| videos | 视频| LONGTEXT | No | NULL | No |
+| video\_pic\_url | 视频封面图| LONGTEXT | No | NULL | No |
+| intro | 图文详情| LONGTEXT | No | NULL | No |
+| purchase\_agreement | 购买协议| LONGTEXT | No | NULL | No |
+| is\_show\_specimg | 详情页是否显示规格图片| TINYINT(1) | Yes | | No |
+| enable\_agreement | 开启购买协议| TINYINT(1) | Yes | | No |
+| date\_type | 有效期的类型, DATE\_TYPE\_FIX\_TIME\_RANGE:指定日期范围内, DATE\_TYPE\_FIX\_TERM:固定天数后| VARCHAR(255) | No | NULL | No |
+| begin\_date | 有效期开始时间| INT | No | NULL | No |
+| end\_date | 有效期结束时间| INT | No | NULL | No |
+| fixed\_term | 有效期的有效天数| INT | No | NULL | No |
+| brand\_logo | 品牌图片| VARCHAR(1024) | No | NULL | No |
+| is\_point | 是否积分兑换 true可以 false不可以| TINYINT(1) | No | | No |
+| point | 积分个数| INT | No | 0 | No |
+| distributor\_id | 店铺id,为0时表示该商品为商城商品,否则为店铺自有商品| INT | Yes | 0 | No |
+| volume | 商品体积| DOUBLE PRECISION | No | NULL | No |
+| item\_source | 商品来源:mall:主商城;distributor:店铺自有;openapi:开放接口;| VARCHAR(255) | Yes | mall | No |
+| brand\_id | 品牌id| INT | No | 0 | No |
+| tax\_rate | 税率, 百分之~/100| INT | Yes | NULL | No |
+| crossborder\_tax\_rate | 跨境税率,百分比,小数点2位| VARCHAR(10) | Yes | NULL | No |
+| profit\_type | 分润类型, 默认为0配置分润,1主类目分润,2商品指定分润(比例),3商品指定分润(金额)| INT | No | 0 | No |
+| origincountry\_id | 产地国id| BIGINT | Yes | 0 | No |
+| taxstrategy\_id | 税费策略id| BIGINT | Yes | 0 | No |
+| taxation\_num | 计税单位份数| INT | Yes | 0 | No |
+| profit\_fee | 分润金额,单位为分 冗余字段| INT | No | 0 | No |
+| type | 商品类型,0普通,1跨境商品,可扩展| INT | Yes | 0 | No |
+| is\_profit | 是否支持分润| TINYINT(1) | No | | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+| is\_gift | 是否为赠品| TINYINT(1) | No | | No |
+| is\_package | 是否为打包产品| TINYINT(1) | No | | No |
+| tdk\_content | tdk详情| LONGTEXT | No | NULL | No |
+| supplier\_id | 供应商id| INT | Yes | 0 | No |
+| is\_market | 供应商控制商品是否可售,0不可售,1可售| INT | Yes | 1 | No |
+| goods\_bn | SPU编码| VARCHAR(255) | No | NULL | No |
+| supplier\_goods\_bn | 供应商货号| VARCHAR(255) | No | NULL | No |
+| audit\_date | 商品审核时间| INT | No | NULL | No |
+| is\_medicine | 是否为药品,0否 1是| SMALLINT | Yes | 0 | No |
+| is\_prescription | 是否为处方药,0否 1是| SMALLINT | Yes | 0 | No |
+| start\_num | 起订量| INT | No | 0 | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | item\_id | Yes |
+| ix\_company\_id | company\_id | No |
+| ix\_default\_item\_id | default\_item\_id | No |
+| ix\_item\_category | item\_category | No |
+| ix\_item\_bn | item\_bn | No |
+| ix\_goods\_id | goods\_id | No |
+| ix\_supplier\_id | supplier\_id | No |
+| ix\_is\_default | is\_default | No |
+| ix\_is\_medicine | is\_medicine | No |
+| ix\_is\_prescription | is\_prescription | No |
+| ix\_default\_item\_list | company\_id, default\_item\_id, approve\_status, item\_type, item\_category | No |
+
+
+## supplier\_items\_attr
+
+> **新供应商商品属性表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司ID| BIGINT | Yes | NULL | No |
+| item\_id | 商品ID| BIGINT | Yes | NULL | No |
+| attribute\_id | 商品属性id| BIGINT | Yes | 0 | No |
+| is\_del | 是否需要删除| BIGINT | Yes | 0 | No |
+| attribute\_type | 商品属性类型 unit 单位,brand 品牌,item\_params 商品参数, item\_spec 规格, category 商品销售分类| VARCHAR(15) | Yes | NULL | No |
+| attr\_data | 属性值| LONGTEXT | No | | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| ix\_item\_id | item\_id | No |
+
+
+## supplier\_items\_commission
+
+> **商品佣金费率**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 商户id| BIGINT | Yes | NULL | No |
+| item\_id | 商品| BIGINT | Yes | NULL | No |
+| goods\_id | 产品ID| BIGINT | No | 0 | No |
+| supplier\_id | 供应商id| INT | Yes | 0 | No |
+| commission\_ratio | 佣金比例| INT | Yes | 0 | No |
+| add\_time | 创建时间| DATETIME | No | NULL | No |
+| modify\_time | 更新时间| DATETIME | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_goods\_id | goods\_id | No |
+
+
+## supplier\_order
+
+> **供应商订单**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| order\_id | 订单号| BIGINT | Yes | NULL | No |
+| title | 订单标题| VARCHAR(255) | No | NULL | No |
+| shop\_id | 门店id| BIGINT | No | 0 | No |
+| cost\_fee | 商品成本价,以分为单位| INT UNSIGNED | Yes | NULL | No |
+| commission\_fee | 佣金(分)| INT | Yes | 0 | No |
+| user\_id | 用户id| BIGINT | No | NULL | No |
+| act\_id | 营销活动ID,团购ID,社区拼团ID,秒杀活动ID等| BIGINT | No | NULL | No |
+| mobile | 手机号| VARCHAR(255) | No | NULL | No |
+| order\_class | 订单种类。可选值有 normal:普通订单;groups:拼团订单;;community 社区活动订单;bargain:助力订单;seckill:秒杀订单;shopguide:导购订单;pointsmall:积分商城;excard:兑换券| VARCHAR(255) | Yes | normal | No |
+| freight\_fee | 运费价格,以分为单位| INT | No | 0 | No |
+| freight\_type | 运费类型-用于积分商城 cash:现金 point:积分| VARCHAR(255) | Yes | cash | No |
+| item\_fee | 商品金额,以分为单位| VARCHAR(255) | Yes | NULL | No |
+| total\_fee | 订单金额,以分为单位| VARCHAR(255) | Yes | NULL | No |
+| market\_fee | 销售价总金额,以分为单位| VARCHAR(255) | No | NULL | No |
+| step\_paid\_fee | 分阶段付款已支付金额,以分为单位| INT UNSIGNED | No | 0 | No |
+| total\_rebate | 订单总分销金额,以分为单位| INT UNSIGNED | Yes | 0 | No |
+| distributor\_id | 分销商id| BIGINT UNSIGNED | Yes | 0 | No |
+| receipt\_type | 收货方式。可选值有 【logistics 物流】【ziti 店铺自提】【dada 达达同城配】【merchant 商家自配】| VARCHAR(255) | Yes | logistics | No |
+| ziti\_code | 店铺自提码| BIGINT | Yes | 0 | No |
+| ziti\_status | 店铺自提状态。可选值有 PENDING:等待自提;DONE:自提完成;NOTZITI:自提完成; APPROVE:审核通过,药品自提需要审核| VARCHAR(255) | No | NOTZITI | No |
+| order\_status | 订单状态。可选值有 DONE—订单完成;NOTPAY—未支付;PART\_PAYMENT-部分付款;WAIT\_GROUPS\_SUCCESS-等待拼团成功;PAYED-已支付;CANCEL—已取消;WAIT\_BUYER\_CONFIRM-待用户收货| VARCHAR(255) | Yes | NULL | No |
+| pay\_status | 支付状态。可选值有 NOTPAY—未支付;PAYED-已支付;ADVANCE\_PAY-预付款完成;TAIL\_PAY-支付尾款中| VARCHAR(255) | Yes | NOTPAY | No |
+| order\_source | 订单来源。可选值有 member-用户自主下单;shop-商家代客下单| VARCHAR(255) | No | member | No |
+| order\_type | 订单类型。可选值有 normal:普通实体订单| VARCHAR(255) | Yes | normal | No |
+| is\_distribution | 是否分销订单| TINYINT(1) | Yes | | No |
+| source\_id | 订单来源id| BIGINT | No | NULL | No |
+| delivery\_corp | 快递公司| VARCHAR(255) | No | NULL | No |
+| delivery\_corp\_source | 快递代码来源| VARCHAR(255) | No | NULL | No |
+| delivery\_code | 快递单号| VARCHAR(255) | No | NULL | No |
+| delivery\_img | 快递发货凭证| VARCHAR(255) | No | NULL | No |
+| delivery\_time | 发货时间| INT | No | NULL | No |
+| end\_time | 订单完成时间| BIGINT | No | NULL | No |
+| delivery\_status | 发货状态。可选值有 DONE—已发货;PENDING—待发货;PARTAIL-部分发货| VARCHAR(255) | Yes | PENDING | No |
+| cancel\_status | 取消订单状态。可选值有 NO\_APPLY\_CANCEL 未申请;WAIT\_PROCESS 等待审核;REFUND\_PROCESS 退款处理;SUCCESS 取消成功;FAILS 取消失败| VARCHAR(255) | Yes | NO_APPLY_CANCEL | No |
+| receiver\_name | 收货人姓名| VARCHAR(500) | No | NULL | No |
+| receiver\_mobile | 收货人手机号| VARCHAR(255) | No | NULL | No |
+| receiver\_zip | 收货人邮编| VARCHAR(255) | No | NULL | No |
+| receiver\_state | 收货人所在省份| VARCHAR(255) | No | NULL | No |
+| receiver\_city | 收货人所在城市| VARCHAR(255) | No | NULL | No |
+| receiver\_district | 收货人所在地区| VARCHAR(255) | No | NULL | No |
+| receiver\_address | 收货人详细地址| LONGTEXT | No | NULL | No |
+| member\_discount | 会员折扣金额,以分为单位| INT UNSIGNED | Yes | NULL | No |
+| coupon\_discount | 优惠券抵扣金额,以分为单位| INT UNSIGNED | Yes | NULL | No |
+| discount\_fee | 订单优惠金额,以分为单位| INT | Yes | 0 | No |
+| discount\_info | 订单优惠详情| LONGTEXT | No | NULL | No |
+| coupon\_discount\_desc | 优惠券使用详情| LONGTEXT | No | NULL | No |
+| member\_discount\_desc | 会员折扣使用详情| LONGTEXT | No | NULL | No |
+| fee\_type | 货币类型| VARCHAR(5) | Yes | CNY | No |
+| fee\_rate | 货币汇率| DOUBLE PRECISION | Yes | 1 | No |
+| fee\_symbol | 货币符号| VARCHAR(255) | Yes | ¥ | No |
+| item\_point | 商品消费总积分| INT UNSIGNED | No | 0 | No |
+| point | 消费积分| INT UNSIGNED | No | 0 | No |
+| pay\_type | 支付方式| VARCHAR(255) | No | | No |
+| pay\_channel | adapay支付渠道| VARCHAR(255) | No | | No |
+| remark | 订单备注| VARCHAR(255) | No | NULL | No |
+| invoice | 发票信息| JSON | No | NULL | No |
+| invoice\_number | 发票号| VARCHAR(255) | No | | No |
+| is\_invoiced | 是否已开发票| TINYINT(1) | No | 0 | No |
+| send\_point | 是否分发积分0否 1是| INT | Yes | 0 | No |
+| type | 订单类型,0普通订单,1跨境订单,....其他| INT | Yes | 0 | No |
+| point\_fee | 积分抵扣金额,以分为单位| INT | No | 0 | No |
+| point\_use | 积分抵扣使用的积分数| INT | No | 0 | No |
+| pack | 包装| VARCHAR(255) | No | NULL | No |
+| operator\_id | 操作者id| INT | No | 0 | No |
+| source\_from | 订单来源 pc,h5,wxapp,aliapp,unknow,dianwu| VARCHAR(10) | No | NULL | No |
+| supplier\_id | 供应商id| INT | Yes | 0 | No |
+| is\_settled | 是否分账(斗拱)| TINYINT(1) | Yes | | No |
+| create\_time | 订单创建时间| INT | Yes | NULL | No |
+| update\_time | 订单更新时间| INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_order\_id | order\_id | No |
+| idx\_order\_status | order\_status | No |
+| idx\_receiver\_mobile | receiver\_mobile | No |
+| idx\_supplier\_id | supplier\_id | No |
+| idx\_create\_time | create\_time | No |
+
+
+## systemlink\_oms\_queuelog
+
+> **联通oms通信日志**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| api\_type | 日志同步类型, response:响应,request:请求| VARCHAR(255) | Yes | NULL | No |
+| worker | api| VARCHAR(255) | Yes | NULL | No |
+| params | 任务参数| JSON | No | NULL | No |
+| result | 返回数据| JSON | No | NULL | No |
+| status | 运行状态:running,success,fail| VARCHAR(255) | Yes | running | No |
+| runtime | 运行时间(秒)| VARCHAR(255) | No | NULL | No |
+| msg\_id | msg\_id| VARCHAR(255) | No | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+
+
+## template\_orders
+
+> **小程序开通表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| template\_orders\_id | 小程序模版开通ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| operator\_id | operator\_id| BIGINT | Yes | NULL | No |
+| template\_name | 模版名称| VARCHAR(255) | Yes | NULL | No |
+| total\_fee | 购买模版金额,以分为单位| VARCHAR(255) | Yes | NULL | No |
+| order\_status | 订单状态。可选值有 DONE—订单完成;NOTPAY—未支付;CANCEL—已取消| VARCHAR(255) | Yes | NULL | No |
+| create\_time | 订单创建时间| INT | Yes | NULL | No |
+| update\_time | 订单更新时间| INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | template\_orders\_id | Yes |
+
+
+## theme\_member\_center\_share
+
+> **会员中心分享信息表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| theme\_member\_center\_share\_id | | BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | | BIGINT | Yes | NULL | No |
+| share\_title | 页面名称| VARCHAR(50) | Yes | NULL | No |
+| share\_description | 页面描述| VARCHAR(150) | Yes | NULL | No |
+| share\_pic\_wechatapp | 分享图片小程序| VARCHAR(150) | No | | No |
+| share\_pic\_h5 | 分享图片h5| VARCHAR(150) | No | | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | theme\_member\_center\_share\_id | Yes |
+| idx\_company\_id | company\_id | No |
+
+
+## theme\_pc\_template
+
+> **pc页面装修**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| theme\_pc\_template\_id | | BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | | BIGINT | Yes | NULL | No |
+| template\_title | 页面名称| VARCHAR(50) | Yes | NULL | No |
+| template\_description | 页面描述| VARCHAR(150) | Yes | NULL | No |
+| page\_type | 页面类型 index 首页 custom | VARCHAR(15) | No | index | No |
+| status | 启用状态 1启用 2未启用| INT | No | 2 | No |
+| version | 版本号| VARCHAR(10) | No | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+| deleted\_at | | DATETIME | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | theme\_pc\_template\_id | Yes |
+| idx\_company\_id | company\_id | No |
+
+
+## theme\_pc\_template\_content
+
+> **pc页面装修组件内容**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| theme\_pc\_template\_content\_id | | BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | | BIGINT | Yes | NULL | No |
+| theme\_pc\_template\_id | | BIGINT | Yes | NULL | No |
+| name | 配置名称| VARCHAR(20) | Yes | NULL | No |
+| params | 配置参数| LONGTEXT | Yes | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | theme\_pc\_template\_content\_id | Yes |
+| idx\_company\_id | company\_id | No |
+
+
+## thirdparty\_saaserp\_log
+
+> **联通saasErp通信日志**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| api\_type | 日志同步类型, response:响应,request:请求| VARCHAR(255) | Yes | NULL | No |
+| worker | api| VARCHAR(255) | Yes | NULL | No |
+| params | 任务参数| JSON | No | NULL | No |
+| result | 返回数据| JSON | No | NULL | No |
+| status | 运行状态:running,success,fail| VARCHAR(255) | Yes | running | No |
+| runtime | 运行时间(秒)| VARCHAR(255) | No | NULL | No |
+| msg\_id | msg\_id| VARCHAR(255) | No | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+
+
+## thirdparty\_shop\_bind
+
+> **矩阵节点绑定**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| name | 名称| VARCHAR(255) | Yes | NULL | No |
+| node\_id | 节点| VARCHAR(255) | Yes | NULL | No |
+| node\_type | 节点类型| VARCHAR(255) | Yes | NULL | No |
+| status | 绑定状态 1:已绑定 0:未绑定| SMALLINT | Yes | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_company\_id | company\_id | No |
+| idx\_node\_type | node\_type | No |
+| idx\_status | status | No |
+| idx\_node | company\_id, node\_type, status | No |
+
+
+## trade
+
+> **交易单表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| trade\_id | 交易单号| VARCHAR(64) | Yes | NULL | No |
+| order\_id | 订单号| VARCHAR(64) | No | NULL | No |
+| company\_id | 企业ID| VARCHAR(255) | Yes | NULL | No |
+| shop\_id | 门店ID| VARCHAR(255) | No | NULL | No |
+| distributor\_id | 店铺ID| VARCHAR(255) | No | NULL | No |
+| dealer\_id | 经销商ID| VARCHAR(255) | No | 0 | No |
+| trade\_source\_type | 交易单来源类型。可选值有 membercard-会员卡购买;normal-实体订单购买;servers-服务订单购买;normal\_community-社区订单购买;diposit-预存款购买;order\_pay-买单购买;| VARCHAR(255) | No | NULL | No |
+| user\_id | 购买用户| VARCHAR(255) | Yes | NULL | No |
+| mobile | 购买用户手机号| VARCHAR(255) | No | NULL | No |
+| open\_id | 用户open\_id| VARCHAR(255) | No | NULL | No |
+| discount\_info | 优惠金额,优惠金额,优惠原因json结构| LONGTEXT | No | NULL | No |
+| mch\_id | 商户号,微信支付| VARCHAR(255) | No | NULL | No |
+| total\_fee | 应付总金额,以分为单位| INT UNSIGNED | Yes | 0 | No |
+| discount\_fee | 订单优惠金额| INT | Yes | 0 | No |
+| fee\_type | 货币类型| VARCHAR(16) | Yes | NULL | No |
+| pay\_fee | 支付金额| INT UNSIGNED | Yes | 0 | No |
+| trade\_no | 每日交易序号| VARCHAR(255) | Yes | 0 | No |
+| trade\_state | 交易状态。可选值有 SUCCESS—支付成功;REFUND—转入退款;NOTPAY—未支付;CLOSED—已关闭;REVOKED—已撤销;PAYERROR--支付失败(其他原因,如银行返回失败)| VARCHAR(255) | Yes | NULL | No |
+| pay\_type | 支付方式。wxpay-微信支付;deposit-预存款支付;pos-刷卡;point-积分| VARCHAR(255) | Yes | NULL | No |
+| pay\_channel | adapay支付渠道| VARCHAR(255) | No | | No |
+| transaction\_id | 支付订单号| VARCHAR(255) | No | NULL | No |
+| authorizer\_appid | 公众号的appid| VARCHAR(64) | No | NULL | No |
+| wxa\_appid | 支付小程序的appid| VARCHAR(64) | No | NULL | No |
+| bank\_type | 付款银行| VARCHAR(255) | No | NULL | No |
+| body | 交易商品简单描述| VARCHAR(255) | Yes | NULL | No |
+| detail | 交易商品详情| VARCHAR(255) | Yes | NULL | No |
+| time\_start | 交易起始时间| VARCHAR(255) | Yes | NULL | No |
+| time\_expire | 交易结束时间| VARCHAR(255) | No | NULL | No |
+| div\_members | 分账对象信息列表,最多仅支持7个分账方,json 数组形式| VARCHAR(500) | No | | No |
+| refunded\_fee | 实际退款金额,以分为单位| INT UNSIGNED | No | 0 | No |
+| adapay\_fee\_mode | adapay手续费收取模式| VARCHAR(255) | No | | No |
+| adapay\_fee | 分账手续费,以分为单位| INT UNSIGNED | No | 0 | No |
+| adapay\_div\_status | 分账状态。可选值有NOTDIV—未分账;DIVED-已分账;| VARCHAR(255) | No | NULL | No |
+| cur\_fee\_type | 系统配置货币类型| VARCHAR(5) | Yes | CNY | No |
+| cur\_fee\_rate | 系统配置货币汇率| DOUBLE PRECISION | Yes | 1 | No |
+| cur\_fee\_symbol | 系统配置货币符号| VARCHAR(255) | Yes | ¥ | No |
+| cur\_pay\_fee | 系统货币支付金额| INT UNSIGNED | Yes | 0 | No |
+| coupon\_fee | 优惠券抵扣金额,以分为单位| INT UNSIGNED | Yes | 0 | No |
+| coupon\_info | 优惠券信息json结构| LONGTEXT | No | NULL | No |
+| inital\_request | 统一下单原始请求json结构| LONGTEXT | No | NULL | No |
+| inital\_response | 支付结果通知json结构| LONGTEXT | No | NULL | No |
+| merchant\_id | 商户id| BIGINT | Yes | 0 | No |
+| is\_settled | 是否分账| TINYINT(1) | Yes | | No |
+| payment\_params | 支付参数| LONGTEXT | No | NULL | No |
+| supplier\_id | 供应商id| INT | Yes | 0 | No |
+| bspay\_req\_date | 斗拱支付的请求日期| VARCHAR(255) | No | NULL | No |
+| bspay\_div\_members | 斗拱分账对象信息列表,最多仅支持7个分账方,json 数组形式| VARCHAR(500) | No | | No |
+| bspay\_div\_status | 斗拱分账状态。可选值有NOTDIV—未分账;DIVED-已分账;| VARCHAR(255) | No | NULL | No |
+| bspay\_fee\_mode | 斗拱手续费收取模式 1:外扣 2:内扣| VARCHAR(255) | No | | No |
+| bspay\_fee | 斗拱分账手续费,以分为单位| INT UNSIGNED | No | 0 | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | trade\_id | Yes |
+| ix\_company\_id | company\_id | No |
+| ix\_distributor\_id | distributor\_id | No |
+| ix\_order\_id | order\_id | No |
+| idx\_supplier\_id | supplier\_id | No |
+| ix\_user\_id | user\_id | No |
+| ix\_list | company\_id, order\_id | No |
+| idx\_merchant\_id | merchant\_id | No |
+
+
+## trade\_rate
+
+> **订单评价表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| rate\_id | 评价id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司ID| BIGINT | Yes | NULL | No |
+| item\_id | 商品ID| BIGINT | No | NULL | No |
+| goods\_id | 产品ID| BIGINT | No | 0 | No |
+| order\_id | 订单号| VARCHAR(64) | No | NULL | No |
+| user\_id | 用户id| BIGINT | No | NULL | No |
+| rate\_pic | 评价图片| LONGTEXT | No | NULL | No |
+| rate\_pic\_num | 评价图片数量| INT | No | 0 | No |
+| content | 评价内容| LONGTEXT | No | NULL | No |
+| content\_len | 评价内容长度| INT | No | 0 | No |
+| is\_reply | 评价是否回复。0:否;1:是| TINYINT(1) | Yes | 0 | No |
+| disabled | 是否删除。0:否;1:是| TINYINT(1) | Yes | 0 | No |
+| anonymous | 是否匿名。0:否;1:是| TINYINT(1) | Yes | 0 | No |
+| star | 评价星级| INT | Yes | 0 | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+| unionid | 微信unionid| VARCHAR(60) | No | NULL | No |
+| item\_spec\_desc | 商品规格描述| LONGTEXT | No | | No |
+| order\_type | 订单类型。可选值有 normal:普通实体订单, pointsmall:积分商城订单| VARCHAR(255) | Yes | normal | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | rate\_id | Yes |
+| idx\_company\_id | company\_id | No |
+| idx\_user\_id | user\_id | No |
+| idx\_goods\_id | goods\_id | No |
+| idx\_order\_id | order\_id | No |
+
+
+## trade\_rate\_reply
+
+> **订单评价回复/评论表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| reply\_id | 回复id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| rate\_id | 评价id| BIGINT | Yes | NULL | No |
+| company\_id | 公司ID| BIGINT | Yes | NULL | No |
+| user\_id | 用户id| BIGINT | No | NULL | No |
+| operator\_id | 操作员的id| BIGINT | No | NULL | No |
+| content | 评价内容| VARCHAR(255) | No | NULL | No |
+| content\_len | 评价内容长度| INT | No | 0 | No |
+| role | 回复角色.seller:卖家;buyer:买家| VARCHAR(25) | No | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | 更新时间| INT | No | NULL | No |
+| unionid | 微信unionid| VARCHAR(60) | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | reply\_id | Yes |
+| idx\_rate\_id | rate\_id | No |
+| idx\_company\_id | company\_id | No |
+| idx\_user\_id | user\_id | No |
+
+
+## transcript\_properties
+
+> **成绩单考评项目表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| prop\_id | 属性ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| transcript\_id | 成绩单模板id| BIGINT | Yes | NULL | No |
+| company\_id | 公司company id| BIGINT | Yes | NULL | No |
+| prop\_name | 属性名称| VARCHAR(255) | Yes | NULL | No |
+| prop\_unit | 属性单位| VARCHAR(255) | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | prop\_id | Yes |
+
+
+## transcripts
+
+> **成绩单配置表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| transcript\_id | 成绩单模板id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| transcript\_name | 门店名称| VARCHAR(100) | No | NULL | No |
+| company\_id | 公司company id| BIGINT | Yes | NULL | No |
+| template\_name | 小程序模板name| VARCHAR(255) | Yes | NULL | No |
+| transcript\_status | 状态| VARCHAR(255) | Yes | | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | transcript\_id | Yes |
+
+
+## user\_deposit
+
+> **用户储值金额表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| deposit\_id | 用户储值ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| user\_id | 用户id| BIGINT | Yes | NULL | No |
+| money | 充值金额/消费金额。 单位是分| BIGINT | Yes | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | deposit\_id | Yes |
+| idx\_company\_id | company\_id | No |
+| idx\_user\_id | user\_id | No |
+
+
+## user\_signin
+
+> **用户签到表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | 记录id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司ID| BIGINT | Yes | NULL | No |
+| user\_id | 用户id| BIGINT | Yes | NULL | No |
+| sign\_date | 签到日期| DATE | Yes | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| ix\_company\_id | company\_id | No |
+| ix\_user\_id | user\_id | No |
+| ix\_sign\_date | sign\_date | No |
+
+
+## user\_signin\_logs
+
+> **用户签到奖励记录表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | 记录id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司ID| BIGINT | Yes | NULL | No |
+| user\_id | 用户id| BIGINT | Yes | NULL | No |
+| type | 1日常签到,2,规则打标,3活动规则达标| INT | Yes | NULL | No |
+| reward\_title | 获奖标题| VARCHAR(255) | Yes | NULL | No |
+| activity\_id | 活动id| BIGINT | Yes | NULL | No |
+| reward\_text | 奖项记录多条| LONGTEXT | Yes | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+
+
+## user\_signin\_rules
+
+> **用户签到规则表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | 记录id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司ID| BIGINT | Yes | NULL | No |
+| rule\_name | 规则名称| VARCHAR(255) | Yes | NULL | No |
+| type | 1连续2累计| BIGINT | Yes | NULL | No |
+| days\_required | 需要的天数| BIGINT | Yes | NULL | No |
+| reward\_text | 奖励类型 points积分,coupon券,coupons券包| LONGTEXT | Yes | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+
+
+## user\_task\_activity
+
+> **签到日志**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司ID| BIGINT | Yes | NULL | No |
+| area\_id | 区域id| BIGINT | Yes | 0 | No |
+| title | 活动标题| VARCHAR(255) | Yes | NULL | No |
+| begin\_time | 开始时间| BIGINT | Yes | 0 | No |
+| end\_time | 结束时间| BIGINT | Yes | 0 | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+
+
+## user\_task\_activity\_rule
+
+> **签到活动规则**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司ID| BIGINT | Yes | NULL | No |
+| activity\_id | 活动id| BIGINT | Yes | 0 | No |
+| rule\_type | 活动类型| VARCHAR(255) | Yes | NULL | No |
+| rule\_detail\_type | 活动详细类型,理解为二级类型| VARCHAR(255) | Yes | NULL | No |
+| rule\_name | 规则名称| VARCHAR(255) | Yes | NULL | No |
+| sign\_type | 1连续2累计| BIGINT | Yes | NULL | No |
+| rule\_desc | 规则名称| VARCHAR(255) | Yes | NULL | No |
+| hidde\_tag | 用户标签| VARCHAR(255) | Yes | NULL | No |
+| finish\_tag | 完成标签| VARCHAR(255) | Yes | NULL | No |
+| binding\_distributors | 指定店铺| VARCHAR(255) | Yes | NULL | No |
+| binding\_category | 指定管理分类| VARCHAR(255) | Yes | NULL | No |
+| share\_pic | 分享图| VARCHAR(255) | Yes | NULL | No |
+| qr\_code | 企微二维码| VARCHAR(255) | Yes | NULL | No |
+| frequency | 频次,1每天2每周3每月0为活动周期内| BIGINT | Yes | NULL | No |
+| common\_condition | 常规的门槛,比如限制金额,限制页面,等等| VARCHAR(255) | Yes | NULL | No |
+| prize\_text | 奖励信息| LONGTEXT | Yes | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+
+
+## user\_task\_finish\_rule
+
+> **活动规则完成任务**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | ID| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司ID| BIGINT | Yes | NULL | No |
+| activity\_id | 活动id| BIGINT | Yes | 0 | No |
+| user\_id | 用户id| BIGINT | Yes | 0 | No |
+| rule\_id | 规则| VARCHAR(255) | Yes | NULL | No |
+| finish\_status | 1完成,2未完成| INT | Yes | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+
+
+## user\_transcripts
+
+> **用户成绩单记录表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| record\_id | 记录id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| user\_id | 用户id| BIGINT | Yes | NULL | No |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| shop\_id | 公司id| BIGINT | No | NULL | No |
+| transcript\_id | 成绩单id| BIGINT | Yes | NULL | No |
+| transcript\_name | 成绩单名称| VARCHAR(255) | Yes | NULL | No |
+| indicator\_details | 指标详情| JSON | Yes | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | record\_id | Yes |
+
+
+## wechat\_authorization
+
+> **微信授权表(公众号,小程序)**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| authorizer\_appid | (公众号,小程序)微信appid| VARCHAR(64) | Yes | NULL | No |
+| authorizer\_appsecret | (公众号,小程序)微信appsecret| VARCHAR(255) | No | NULL | No |
+| operator\_id | 授权操作者id| BIGINT | Yes | NULL | No |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| authorizer\_refresh\_token | (公众号,小程序)微信refresh\_token| VARCHAR(255) | No | NULL | No |
+| nick\_name | (公众号,小程序)昵称| VARCHAR(50) | Yes | NULL | No |
+| head\_img | (公众号,小程序)头像| VARCHAR(255) | No | NULL | No |
+| service\_type\_info | (公众号,小程序)类型。可选值有 0代表订阅号;1代表由历史老帐号升级后的订阅号;2代表服务号;3代表小程序(自定义)| INT | No | NULL | No |
+| verify\_type\_info | (公众号,小程序)认证类型。-1代表未认证;0代表微信认证;1代表新浪微博认证;2代表腾讯微博认证;3代表已资质认证通过但还未通过名称认证;4代表已资质认证通过、还未通过名称认证,但通过了新浪微博认证;5代表已资质认证通过、还未通过名称认证,但通过了腾讯微博认证| INT | No | NULL | No |
+| user\_name | (公众号,小程序)原始 ID| VARCHAR(32) | No | NULL | No |
+| signature | (小程序)账号介绍| LONGTEXT | No | NULL | No |
+| principal\_name | (公众号,小程序)主体名称| VARCHAR(255) | No | NULL | No |
+| alias | (公众号)授权方公众号所设置的微信号,可能为空| VARCHAR(50) | No | NULL | No |
+| business\_info | (公众号,小程序)用以了解以下功能的开通状况(0代表未开通,1代表已开通)。open\_store:是否开通微信门店功能;open\_scan:是否开通微信扫商品功能;open\_pay:是否开通微信支付功能;open\_card:是否开通微信卡券功能;open\_shake:是否开通微信摇一摇功能| JSON | No | NULL | No |
+| qrcode\_url | (公众号,小程序)二维码图片的URL| VARCHAR(255) | No | NULL | No |
+| miniprograminfo | (小程序)小程序配置,根据这个字段判断是否为小程序类型授权| JSON | No | NULL | No |
+| func\_info | (公众号,小程序)授权给开发者的权限集列表,逗号隔开| VARCHAR(255) | No | NULL | No |
+| bind\_status | 绑定状态 bind绑定 unbind绑定解除| VARCHAR(255) | Yes | NULL | No |
+| auto\_publish | (小程序)自动发布,第三方授权模式才有用,直连用不到此配置。1:自动发布,0:不自动发布| SMALLINT | Yes | 0 | No |
+| is\_direct | 是否直连。1:直连模式,0:第三方授权模式| SMALLINT | Yes | 0 | No |
+| created\_at | | DATETIME | Yes | NULL | No |
+| updated\_at | | DATETIME | Yes | NULL | No |
+| deleted\_at | | DATETIME | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | authorizer\_appid | Yes |
+
+
+## wechat\_tags
+
+> **微信粉丝标签表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| tag\_id | 标签id| BIGINT | Yes | NULL | No |
+| authorizer\_appid | 公众号appid| VARCHAR(64) | Yes | NULL | No |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| tag\_name | 标签名称| VARCHAR(50) | Yes | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | tag\_id, authorizer\_appid, company\_id | Yes |
+
+
+## wechat\_weapp
+
+> **微信小程序提交审核表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| authorizer\_appid | 微信appid| VARCHAR(64) | Yes | NULL | No |
+| operator\_id | 绑定操作者id| BIGINT | Yes | NULL | No |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| reason | 审核失败原因| LONGTEXT | No | NULL | No |
+| audit\_status | 审核状态,其中0为审核成功,1为审核失败,2为审核中, 3为待提交审核| INT | Yes | NULL | No |
+| release\_status | 发布状态,其中0为未发布,1为已发布| INT | Yes | NULL | No |
+| audit\_time | 审核时间| VARCHAR(255) | No | NULL | No |
+| template\_id | 小程序模板ID| VARCHAR(255) | Yes | NULL | No |
+| template\_name | 小程序模板名称| VARCHAR(255) | Yes | NULL | No |
+| release\_ver | 小程序已发布的版本| VARCHAR(255) | No | NULL | No |
+| template\_ver | 小程序模板版本| VARCHAR(255) | No | NULL | No |
+| visitstatus | 小程序线上代码的可见状态 0不可见 1可见| INT | Yes | NULL | No |
+| created\_at | | DATETIME | Yes | NULL | No |
+| updated\_at | | DATETIME | Yes | NULL | No |
+| deleted\_at | | DATETIME | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | authorizer\_appid | Yes |
+
+
+## wechat\_weapp\_customize\_page
+
+> **小程序自定义页面**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | | BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| template\_name | 小程序模板名称| VARCHAR(255) | No | NULL | No |
+| company\_id | | BIGINT | Yes | NULL | No |
+| page\_name | 页面名称| VARCHAR(255) | Yes | NULL | No |
+| page\_description | 页面描述| VARCHAR(255) | Yes | NULL | No |
+| page\_share\_title | 分享标题| VARCHAR(255) | No | NULL | No |
+| page\_share\_desc | 分享描述| VARCHAR(255) | No | NULL | No |
+| page\_share\_imageUrl | 分享图片| VARCHAR(255) | No | NULL | No |
+| is\_open | 是否开启0否1是| INT | Yes | 0 | No |
+| page\_type | 页面类型 salesperson:导购首页| VARCHAR(255) | Yes | normal | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+
+
+## wechat\_weapp\_setting
+
+> **小程序模板装修表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | | BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| template\_name | 小程序模板名称| VARCHAR(50) | Yes | NULL | No |
+| company\_id | 公司ID| BIGINT | Yes | NULL | No |
+| page\_name | 页面名称| VARCHAR(50) | Yes | NULL | No |
+| name | 配置名称| VARCHAR(50) | Yes | NULL | No |
+| version | 配置版本| VARCHAR(10) | Yes | v1.0.0 | No |
+| params | 配置参数| LONGTEXT | Yes | NULL | No |
+| pages\_template\_id | 页面模板id| INT | No | 0 | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| ix\_page\_nme | page\_name | No |
+| idx\_company\_id | company\_id | No |
+| ix\_pages\_template\_id | pages\_template\_id | No |
+| idx\_pagename\_version\_name\_companyid\_templatename | page\_name, version, name, company\_id, template\_name | No |
+
+
+## wechat\_weapp\_template
+
+> **小程序模板表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | | BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| template\_name | 小程序模板名称| VARCHAR(50) | Yes | NULL | No |
+| template\_open\_status | 小程序模板开通状态| VARCHAR(10) | Yes | NULL | No |
+| template\_money | 小程序模板开通金额,默认免费| VARCHAR(255) | Yes | NULL | No |
+| created | | INT | Yes | NULL | No |
+| created\_at | | DATETIME | Yes | NULL | No |
+| updated\_at | | DATETIME | Yes | NULL | No |
+| deleted\_at | | DATETIME | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+
+
+## wechatfans\_bind\_wechattag
+
+> **粉丝关联标微信签表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| tag\_id | 标签id| BIGINT | Yes | NULL | No |
+| open\_id | open\_id| VARCHAR(40) | Yes | NULL | No |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| authorizer\_appid | 公众号appid| VARCHAR(64) | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | tag\_id, open\_id, company\_id | Yes |
+
+
+## work\_wechat\_message
+
+> **企业微信通知**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | 主键| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| distributor\_id | 店铺id| BIGINT | Yes | NULL | No |
+| operator\_id | 接受消息用户id| BIGINT | Yes | NULL | No |
+| msg\_type | 消息类型:1售后订单,2待发货订单,3未妥投订单| SMALLINT | No | NULL | No |
+| content | 内容| LONGTEXT | No | NULL | No |
+| add\_time | 添加时间| INT | No | NULL | No |
+| up\_time | 修改时间| INT | No | NULL | No |
+| is\_read | 是否已读:0,未读;1,已读| SMALLINT | No | 0 | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_company\_id | company\_id | No |
+| idx\_distributor\_id | distributor\_id | No |
+| idx\_operator\_id | operator\_id | No |
+
+
+## work\_wechat\_message\_manager\_template
+
+> **企业微信管理员通知模板**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | 主键id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| template\_id | 企业微信通知模板id| VARCHAR(255) | Yes | NULL | No |
+| disabled | 模版是否禁用| TINYINT(1) | Yes | | No |
+| title | 企业微信通知模板标题| VARCHAR(255) | No | | No |
+| description | 企业微信通知模板内容| VARCHAR(255) | No | | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_template\_id | template\_id | No |
+
+
+## work\_wechat\_message\_template
+
+> **企业微信通知模板**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | 企业微信通知模板| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| template\_id | 企业微信通知模板id| VARCHAR(255) | Yes | NULL | No |
+| disabled | 模版是否开启| TINYINT(1) | Yes | | No |
+| emphasis\_first\_item | 是否放大第一个| TINYINT(1) | Yes | | No |
+| title | 企业微信通知模板标题| VARCHAR(255) | No | | No |
+| description | 企业微信通知模板内容| VARCHAR(255) | No | | No |
+| content | 通知主体消息| JSON | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+
+
+## work\_wechat\_rel
+
+> **企业微信用户关联表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | 企业微信用户关联表id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| work\_userid | 通讯录成员id| VARCHAR(255) | No | | No |
+| salesperson\_id | 导购员id| BIGINT | No | 0 | No |
+| external\_userid | 企业微信外部成员id| VARCHAR(255) | No | | No |
+| unionid | 企业微信外部成员unionid| VARCHAR(255) | No | | No |
+| user\_id | 会员id| BIGINT | No | 0 | No |
+| is\_friend | 是否好友 0 否 1 是| TINYINT(1) | No | 0 | No |
+| is\_bind | 是否绑定 0 否 1 是| TINYINT(1) | No | 0 | No |
+| bound\_time | 绑定时间| BIGINT | No | 0 | No |
+| add\_friend\_time | 添加好友时间| BIGINT | No | 0 | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_company\_id\_user\_id | company\_id, user\_id | No |
+
+
+## work\_wechat\_rel\_logs
+
+> **企业微信用户关联关系日志**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | 企业微信用户关联表id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| work\_userid | 通讯录成员id| VARCHAR(255) | Yes | | No |
+| salesperson\_id | 导购员id| BIGINT | Yes | 0 | No |
+| external\_userid | 企业微信外部成员id| VARCHAR(255) | Yes | | No |
+| unionid | 企业微信外部成员unionid| VARCHAR(255) | Yes | | No |
+| user\_id | 会员id| BIGINT | Yes | 0 | No |
+| is\_friend | 是否好友 0 否 1 是| TINYINT(1) | Yes | 0 | No |
+| remarks | 企业微信用户关联关系日志| VARCHAR(60) | Yes | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | 更新时间| INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+
+
+## work\_wechat\_verify\_domain\_file
+
+> **企业微信可信域名校验文件**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| operator\_id | 授权操作者id| BIGINT | Yes | NULL | No |
+| name | 验证文件名| VARCHAR(255) | Yes | | No |
+| contents | 验证文件内容| LONGTEXT | Yes | | No |
+| created | | INT | Yes | NULL | No |
+| updated | 更新时间| INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| ix\_name | name | Yes |
+
+
+## wsugc\_badge
+
+> **角标**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| badge\_id | | BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| badge\_name | 角标名称| VARCHAR(250) | Yes | NULL | No |
+| badge\_memo | 角标备注| VARCHAR(250) | No | NULL | No |
+| mobile | 手机号| VARCHAR(50) | No | NULL | No |
+| p\_order | 排序| INT | Yes | 0 | No |
+| created | 添加时间| INT UNSIGNED | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+| ai\_verify\_time | 机器审核时间| BIGINT | No | 0 | No |
+| manual\_verify\_time | 人工审核时间| BIGINT | No | 0 | No |
+| company\_id | | BIGINT | Yes | NULL | No |
+| enabled | 是否启用.| INT | Yes | 1 | No |
+| status | 审核状态(0待审核,1审核通过,2机器拒绝,3待人工审核,4人工拒绝)| INT | Yes | 0 | No |
+| ai\_refuse\_reason | 机器拒绝理由| VARCHAR(255) | No | NULL | No |
+| manual\_refuse\_reason | 人工拒绝理由| VARCHAR(255) | No | NULL | No |
+| is\_top | 是否置顶.| INT | Yes | 0 | No |
+| user\_id | 创建的用户| BIGINT | Yes | 0 | No |
+| source | 来源 1用户,2官方| INT | No | 1 | No |
+| operator\_id | 管理员id| BIGINT | No | 0 | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | badge\_id | Yes |
+| idx\_user\_id | user\_id | No |
+| idx\_company\_id | company\_id | No |
+| idx\_mobile | mobile | No |
+
+
+## wsugc\_comment
+
+> **笔记评论**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| comment\_id | | BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| post\_id | 笔记id| BIGINT | Yes | NULL | No |
+| user\_id | 用户id| BIGINT | Yes | NULL | No |
+| parent\_comment\_id | 父级评论id| BIGINT | Yes | NULL | No |
+| reply\_comment\_id | 回复评论id| BIGINT | Yes | NULL | No |
+| reply\_user\_id | 回复会员id| BIGINT | Yes | NULL | No |
+| content | 内容| LONGTEXT | No | | No |
+| likes | 点赞数| VARCHAR(255) | Yes | NULL | No |
+| ip | ip| VARCHAR(255) | No | NULL | No |
+| province | 省份| VARCHAR(255) | No | NULL | No |
+| city | 城市| VARCHAR(255) | No | NULL | No |
+| district | 区县| VARCHAR(255) | No | NULL | No |
+| p\_order | 排序| INT | No | 0 | No |
+| status | 审核状态(0待审核,1审核通过,2机器拒绝,3待人工审核,4人工拒绝)| INT | Yes | 0 | No |
+| enable | 上架状态(0下架,1上架)| INT | Yes | 1 | No |
+| disabled | 是否无效| TINYINT(1) | Yes | | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+| ai\_verify\_time | 机器审核时间| BIGINT | No | 0 | No |
+| manual\_verify\_time | 人工审核时间| BIGINT | No | 0 | No |
+| ai\_refuse\_reason | 机器拒绝理由| VARCHAR(255) | No | NULL | No |
+| manual\_refuse\_reason | 人工拒绝理由| VARCHAR(255) | No | NULL | No |
+| company\_id | | BIGINT | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | comment\_id | Yes |
+
+
+## wsugc\_comment\_like
+
+> **评论点赞**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| comment\_like\_id | | BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| post\_id | 笔记id| BIGINT | Yes | NULL | No |
+| comment\_id | 评论id| BIGINT | Yes | NULL | No |
+| user\_id | 会员id| BIGINT | Yes | NULL | No |
+| disabled | 是否无效| TINYINT(1) | Yes | | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | comment\_like\_id | Yes |
+| idx\_post\_id | post\_id | No |
+| idx\_comment\_id | comment\_id | No |
+| idx\_disabled | disabled | No |
+
+
+## wsugc\_follower
+
+> ****
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| follower\_id | id| INT UNSIGNED AUTO_INCREMENT | Yes | NULL | Yes |
+| user\_id | 会员id| BIGINT | Yes | NULL | No |
+| follower\_user\_id | 粉丝会员id| BIGINT | Yes | NULL | No |
+| disabled | 是否无效| TINYINT(1) | Yes | | No |
+| company\_id | | BIGINT | Yes | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | follower\_id | Yes |
+
+
+## wsugc\_image\_tag
+
+> **图片tag关联表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| image\_tag\_id | | BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| image\_id | 图片id| BIGINT | Yes | NULL | No |
+| tag\_id | 标签id| BIGINT | Yes | NULL | No |
+| enabled | 是否启用| INT | Yes | 1 | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+| company\_id | | BIGINT | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | image\_tag\_id | Yes |
+| idx\_image\_id | image\_id | No |
+| idx\_tag\_id | tag\_id | No |
+
+
+## wsugc\_message
+
+> **消息**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| message\_id | | BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| type | 消息类型.system系统消息;replyPost回复消息likePost笔记点赞 favoritePost收藏笔记 followerUser关注了您| VARCHAR(255) | Yes | NULL | No |
+| sub\_type | 消息类型及子类型.系统消息(system):approve通过,reject拒绝,unenable下架; 回复消息(reply):replyPost评论了您的笔记,replyComment回复了您的评论; 收藏笔记(favoritePost):favorite收藏,unfavorite取消收藏; 关注(followerUser):follow关注,unfollow取关; 点赞(like):likePost点赞笔记,likeComment点赞评论| VARCHAR(255) | Yes | NULL | No |
+| source | 来源 1用户,2官方(系统通知)| INT | No | 1 | No |
+| from\_user\_id | 来自用户| BIGINT | Yes | 0 | No |
+| from\_nickname | 来自昵称| VARCHAR(255) | No | | No |
+| to\_user\_id | 发给用户| BIGINT | Yes | 0 | No |
+| to\_nickname | 发给昵称| VARCHAR(255) | No | | No |
+| post\_id | 笔记id| BIGINT | Yes | 0 | No |
+| comment\_id | 评论id| BIGINT | No | 0 | No |
+| title | 通知标题| VARCHAR(255) | No | NULL | No |
+| content | 通知内容| VARCHAR(255) | No | NULL | No |
+| created | 添加时间| INT UNSIGNED | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+| company\_id | | BIGINT | Yes | NULL | No |
+| hasread | 是否已读.| TINYINT(1) | Yes | | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | message\_id | Yes |
+| idx\_to\_user\_id | to\_user\_id | No |
+| idx\_type | type | No |
+| idx\_post\_id | post\_id | No |
+| idx\_comment\_id | comment\_id | No |
+| idx\_hasread | hasread | No |
+| idx\_company\_id | company\_id | No |
+
+
+## wsugc\_post
+
+> **笔记**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| post\_id | | BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| user\_id | 用户id| BIGINT | Yes | NULL | No |
+| operator\_id | 管理员id| BIGINT | No | 0 | No |
+| source | 来源 1用户,2官方| INT | No | 1 | No |
+| title | 标题| VARCHAR(255) | Yes | NULL | No |
+| likes | 点赞数| INT | Yes | NULL | No |
+| ip | ip地址| VARCHAR(255) | No | NULL | No |
+| mobile | 手机号| VARCHAR(255) | No | NULL | No |
+| cover | 封面图| VARCHAR(255) | No | NULL | No |
+| video | 视频| VARCHAR(255) | No | NULL | No |
+| video\_ratio | 视频比例| VARCHAR(255) | No | NULL | No |
+| video\_place | 视频位置| VARCHAR(255) | No | NULL | No |
+| video\_thumb | 视频缩略图| VARCHAR(255) | No | NULL | No |
+| position | 坐标| VARCHAR(255) | No | NULL | No |
+| is\_top | 是否置顶.| INT | Yes | 0 | No |
+| address | 地址| VARCHAR(255) | No | NULL | No |
+| topics | 话题| LONGTEXT | No | NULL | No |
+| badges | 角标| LONGTEXT | No | NULL | No |
+| goods | 商品| LONGTEXT | No | NULL | No |
+| images | 多图| LONGTEXT | No | | No |
+| image\_path | 多图相对路径| LONGTEXT | No | | No |
+| image\_tag | 图片的tag信息| LONGTEXT | No | | No |
+| content | 内容| LONGTEXT | No | | No |
+| p\_order | 排序| INT | No | 0 | No |
+| share\_nums | 分享次数| INT | No | 0 | No |
+| view\_auth | 可见状态0所有,1仅自己| INT | Yes | 0 | No |
+| is\_draft | 是否草稿0否,1是| INT | Yes | 0 | No |
+| enabled | 发布状态| INT | Yes | 0 | No |
+| disabled | 是否无效(删除)| INT | Yes | 0 | No |
+| status | 审核状态(0待审核,1审核通过,2机器拒绝,3待人工审核,4人工拒绝)| INT | Yes | 0 | No |
+| title\_status | 标题审核状态(0待审核,1审核通过,2机器拒绝,3待人工审核,4人工拒绝)| INT | Yes | 0 | No |
+| content\_status | 内容审核状态(0待审核,1审核通过,2机器拒绝,3待人工审核,4人工拒绝)| INT | Yes | 0 | No |
+| image\_status | 图片审核状态(0待审核,1审核通过,2机器拒绝,3待人工审核,4人工拒绝)| INT | Yes | 0 | No |
+| trace\_ids | 微信内容审查-图片内容追踪id集合,仅ID ,111:false,2222:false,| LONGTEXT | Yes | NULL | No |
+| mediacheck\_traceid | 微信内容审查-图片内容追踪id集合| LONGTEXT | Yes | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+| ai\_verify\_time | 机器审核时间| BIGINT | No | 0 | No |
+| manual\_verify\_time | 人工审核时间| BIGINT | No | 0 | No |
+| ai\_refuse\_reason | 机器拒绝理由| VARCHAR(255) | No | NULL | No |
+| manual\_refuse\_reason | 人工拒绝理由| VARCHAR(255) | No | NULL | No |
+| company\_id | | BIGINT | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | post\_id | Yes |
+| idx\_user\_id | user\_id | No |
+| idx\_company\_id | company\_id | No |
+
+
+## wsugc\_post\_badge
+
+> **笔记角标**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| post\_badge\_id | | BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| post\_id | 笔记id| BIGINT | Yes | NULL | No |
+| badge\_id | 角标id| BIGINT | Yes | NULL | No |
+| created | 添加时间| INT UNSIGNED | Yes | NULL | No |
+| company\_id | | BIGINT | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | post\_badge\_id | Yes |
+| idx\_post\_id | post\_id | No |
+| idx\_badge\_id | badge\_id | No |
+
+
+## wsugc\_post\_favorite
+
+> **笔记收藏**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| post\_favorite\_id | | BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| post\_id | 笔记id| BIGINT | Yes | NULL | No |
+| user\_id | 会员id| BIGINT | Yes | NULL | No |
+| disabled | 是否无效| TINYINT(1) | Yes | | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | post\_favorite\_id | Yes |
+| idx\_post\_id | post\_id | No |
+| idx\_user\_id | user\_id | No |
+| idx\_disabled | disabled | No |
+
+
+## wsugc\_post\_goods
+
+> **笔记**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| post\_goods\_id | | BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| post\_id | 笔记id| BIGINT | Yes | NULL | No |
+| goods\_id | 视频id| BIGINT | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | post\_goods\_id | Yes |
+| idx\_post\_id | post\_id | No |
+
+
+## wsugc\_post\_image
+
+> **笔记的图片**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| post\_image\_id | | BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| post\_id | 笔记id| BIGINT | No | 0 | No |
+| user\_id | user\_id| BIGINT | No | 0 | No |
+| image\_id | image\_id| BIGINT | No | 0 | No |
+| image\_url | 图片地址相对| VARCHAR(255) | Yes | NULL | No |
+| p\_order | 排序| INT | No | 50 | No |
+| activity\_joiner\_condition | 学员要求| LONGTEXT | No | NULL | No |
+| activity\_brief | 活动简介| LONGTEXT | No | NULL | No |
+| yuyue\_begin\_time | 活动报名开始时间| INT | No | NULL | No |
+| yuyue\_end\_time | 活动报名结束时间| INT | No | NULL | No |
+| cat\_id | 活动类型| LONGTEXT | No | NULL | No |
+| start\_time | 活动开始时间| INT | Yes | NULL | No |
+| end\_time | 活动结束时间| INT | Yes | NULL | No |
+| join\_limit | 可参与次数| INT | Yes | 0 | No |
+| limit\_number | 限制人数| INT | Yes | 0 | No |
+| teacher\_title | 老师头衔| VARCHAR(255) | Yes | | No |
+| teacher\_name | 可参与次数| VARCHAR(255) | Yes | | No |
+| teacher\_brief | 可参与次数| LONGTEXT | Yes | | No |
+| teacher\_avatar | 可参与次数| VARCHAR(255) | Yes | | No |
+| is\_sms\_notice | 是否短信通知| TINYINT(1) | Yes | 1 | No |
+| is\_wxapp\_notice | 是否小程序模板通知| TINYINT(1) | Yes | 1 | No |
+| enabled | 是否启用| INT | Yes | 1 | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+| company\_id | | BIGINT | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | post\_image\_id | Yes |
+| idx\_post\_id | post\_id | No |
+
+
+## wsugc\_post\_like
+
+> **笔记点赞**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| post\_like\_id | | BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| post\_id | 笔记id| BIGINT | Yes | NULL | No |
+| user\_id | 会员id| BIGINT | Yes | NULL | No |
+| disabled | 是否无效| TINYINT(1) | Yes | | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | post\_like\_id | Yes |
+| idx\_post\_id | post\_id | No |
+| idx\_disabled | disabled | No |
+
+
+## wsugc\_post\_reviewlog
+
+> **笔记审核日志**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| log\_id | | BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| post\_id | 笔记id| BIGINT | No | NULL | No |
+| operator\_id | 操作员id| BIGINT | No | NULL | No |
+| operator | 操作员名称或手机| VARCHAR(255) | No | NULL | No |
+| user\_id | 用户id| BIGINT | Yes | NULL | No |
+| record\_date | 记录提交日期| INT | Yes | NULL | No |
+| shop\_id | 门店id| BIGINT | No | NULL | No |
+| temp\_id | 模板id| BIGINT | No | NULL | No |
+| form\_data | 记录表单内容| LONGTEXT | Yes | NULL | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | log\_id | Yes |
+| idx\_post\_id | post\_id | No |
+| idx\_company\_id | company\_id | No |
+
+
+## wsugc\_post\_topic
+
+> ****
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| post\_topic\_id | | BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| post\_id | 笔记id| BIGINT | Yes | NULL | No |
+| topic\_id | 话题id| VARCHAR(50) | Yes | NULL | No |
+| created | 添加时间| INT UNSIGNED | Yes | NULL | No |
+| company\_id | | BIGINT | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | post\_topic\_id | Yes |
+| idx\_post\_id | post\_id | No |
+| idx\_topic\_id | topic\_id | No |
+
+
+## wsugc\_setting
+
+> **ugc通用设置**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| keyname | 键名| VARCHAR(255) | No | NULL | No |
+| value | 值| LONGTEXT | No | NULL | No |
+| type | 类型| VARCHAR(255) | No | NULL | No |
+| company\_id | | BIGINT | Yes | NULL | No |
+| created | 添加时间| INT UNSIGNED | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_type | type | No |
+| idx\_keyname | keyname | No |
+| idx\_company\_id | company\_id | No |
+
+
+## wsugc\_tag
+
+> **图片tag**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| tag\_id | | BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| tag\_name | 标签名称| VARCHAR(250) | Yes | NULL | No |
+| mobile | 手机号| VARCHAR(50) | No | NULL | No |
+| user\_id | 创建的用户| BIGINT | Yes | 0 | No |
+| enabled | 是否启用| INT | Yes | 1 | No |
+| status | 审核状态(0待审核,1审核通过,2机器拒绝,3待人工审核,4人工拒绝)| INT | Yes | 0 | No |
+| ai\_verify\_time | 机器审核时间| BIGINT | No | 0 | No |
+| manual\_verify\_time | 人工审核时间| BIGINT | No | 0 | No |
+| ai\_refuse\_reason | 机器拒绝理由| VARCHAR(255) | No | NULL | No |
+| manual\_refuse\_reason | 人工拒绝理由| VARCHAR(255) | No | NULL | No |
+| created | | INT | Yes | NULL | No |
+| p\_order | 排序| INT UNSIGNED | Yes | 0 | No |
+| updated | | INT | No | NULL | No |
+| company\_id | | BIGINT | Yes | NULL | No |
+| source | 来源 1用户,2官方| INT | No | 1 | No |
+| operator\_id | 管理员id| BIGINT | No | 0 | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | tag\_id | Yes |
+| idx\_user\_id | user\_id | No |
+| idx\_company\_id | company\_id | No |
+| idx\_mobile | mobile | No |
+
+
+## wsugc\_topic
+
+> **话题**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| topic\_id | | BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| topic\_name | 话题名称| VARCHAR(250) | Yes | NULL | No |
+| mobile | 手机号| VARCHAR(50) | No | NULL | No |
+| p\_order | 排序| INT | Yes | 0 | No |
+| created | 添加时间| INT UNSIGNED | Yes | NULL | No |
+| updated | | INT | No | NULL | No |
+| ai\_verify\_time | 机器审核时间| BIGINT | No | 0 | No |
+| manual\_verify\_time | 人工审核时间| BIGINT | No | 0 | No |
+| company\_id | | BIGINT | Yes | NULL | No |
+| enabled | 是否启用.| INT | Yes | 1 | No |
+| status | 审核状态(0待审核,1审核通过,2机器拒绝,3待人工审核,4人工拒绝)| INT | Yes | 0 | No |
+| ai\_refuse\_reason | 机器拒绝理由| VARCHAR(255) | No | NULL | No |
+| manual\_refuse\_reason | 人工拒绝理由| VARCHAR(255) | No | NULL | No |
+| is\_top | 是否置顶.| INT | Yes | 0 | No |
+| user\_id | 创建的用户| BIGINT | Yes | 0 | No |
+| source | 来源 1用户,2官方| INT | No | 1 | No |
+| operator\_id | 管理员id| BIGINT | No | 0 | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | topic\_id | Yes |
+| idx\_user\_id | user\_id | No |
+| idx\_company\_id | company\_id | No |
+| idx\_mobile | mobile | No |
+
+
+## wx\_external\_config
+
+> **外部小程序配置表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| wx\_external\_config\_id | 外部小程序配置表id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司company id| BIGINT | Yes | NULL | No |
+| app\_id | 小程序APPID| VARCHAR(255) | Yes | NULL | No |
+| app\_name | 小程序名称| VARCHAR(255) | No | NULL | No |
+| app\_desc | 描述| VARCHAR(255) | No | NULL | No |
+| created\_at | | DATETIME | Yes | NULL | No |
+| updated\_at | | DATETIME | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | wx\_external\_config\_id | Yes |
+| idx\_company\_id | company\_id | No |
+
+
+## wx\_external\_routes
+
+> **外部小程序路径表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| wx\_external\_routes\_id | 外部小程序路径表id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | 公司company id| BIGINT | Yes | NULL | No |
+| wx\_external\_config\_id | 外部小程序配置表id| BIGINT | Yes | NULL | No |
+| route\_name | 页面名称| VARCHAR(255) | Yes | NULL | No |
+| route\_info | 页面路径| VARCHAR(255) | Yes | NULL | No |
+| route\_desc | 描述| VARCHAR(255) | No | NULL | No |
+| created\_at | | DATETIME | Yes | NULL | No |
+| updated\_at | | DATETIME | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | wx\_external\_routes\_id | Yes |
+| idx\_company\_id | company\_id | No |
+
+
+## wxshops
+
+> **微信门店表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| wx\_shop\_id | 自增id| BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| map\_poi\_id | 从腾讯地图换取的位置点id,即search\_map\_poi接口返回的sosomap\_poi\_uid字段| VARCHAR(255) | No | NULL | No |
+| store\_name | 腾讯地图的门店名称| VARCHAR(100) | No | NULL | No |
+| poi\_id | 门店id| VARCHAR(255) | No | NULL | No |
+| lng | 腾讯地图纬度| VARCHAR(255) | No | NULL | No |
+| lat | 腾讯地图经度| VARCHAR(255) | No | NULL | No |
+| address | 腾讯地图门店地址| VARCHAR(500) | Yes | NULL | No |
+| category | 腾讯地图门店类目| VARCHAR(255) | No | NULL | No |
+| distributor\_id | 门店所属店铺ID| BIGINT | Yes | 0 | No |
+| pic\_list | 门店图片,可传多张图片pic\_list字段是一个json| LONGTEXT | No | NULL | No |
+| contract\_phone | 联系电话| VARCHAR(20) | Yes | NULL | No |
+| add\_type | 1,公众号主体;2,相关主体; 3,无主体| SMALLINT | Yes | NULL | No |
+| hour | 营业时间,格式11:11-12:12| VARCHAR(20) | Yes | NULL | No |
+| credential | 经营资质证件号| VARCHAR(30) | No | NULL | No |
+| company\_name | 主体名字 临时素材mediaid,如果复用公众号主体,则company\_name为空,如果不复用公众号主体,则company\_name为具体的主体名字| VARCHAR(30) | No | NULL | No |
+| qualification\_list | 相关证明材料,临时素材mediaid,不复用公众号主体时,才需要填| VARCHAR(255) | No | NULL | No |
+| card\_id | 卡券id,如果不需要添加卡券,该参数可为空,目前仅开放支持会员卡、买单和刷卡支付券,不支持自定义code,需要先去公众平台卡券后台创建cardid| VARCHAR(20) | No | NULL | No |
+| status | 审核状态,1:审核成功,2:审核中,3:审核失败,4:管理员拒绝, 5: 无需审核| SMALLINT | Yes | NULL | No |
+| errmsg | 审核失败原因| VARCHAR(255) | No | NULL | No |
+| company\_id | 公司id| BIGINT | Yes | NULL | No |
+| audit\_id | 微信返回的审核id| VARCHAR(20) | No | NULL | No |
+| resource\_id | 资源包id| BIGINT | No | NULL | No |
+| expired\_at | 过期时间| BIGINT | No | NULL | No |
+| is\_default | 是否是默认门店| TINYINT(1) | Yes | | No |
+| country | 非中国国家名称| VARCHAR(100) | No | NULL | No |
+| city | 非中国门店所在城市| VARCHAR(100) | No | NULL | No |
+| is\_domestic | 是否是中国国内门店 1:国内(包含港澳台),2:非国内| SMALLINT | No | 1 | No |
+| is\_direct\_store | 是否为直营店 1:直营店,2:非直营店| SMALLINT | No | 1 | No |
+| is\_open | 是否开启 1:开启,0:关闭| TINYINT(1) | No | 1 | No |
+| created | | INT | Yes | NULL | No |
+| updated | | INT | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | wx\_shop\_id | Yes |
+
+
+## youshu\_setting
+
+> **有数参数设置表**
+
+- 表结构
+
+| ColumnName | Comment | Type | Not null | Default | Autoincrement |
+| ------------- |-------------|-------------|-------------|-------------|-------------|
+| id | | BIGINT AUTO_INCREMENT | Yes | NULL | Yes |
+| company\_id | | BIGINT | Yes | NULL | No |
+| merchant\_id | merchant\_id| VARCHAR(255) | No | NULL | No |
+| app\_id | 有数app\_id,正式| VARCHAR(255) | No | NULL | No |
+| app\_secret | 有数app\_secret,正式| VARCHAR(255) | No | NULL | No |
+| api\_url | 有数后端api url,正式| VARCHAR(255) | No | NULL | No |
+| sandbox\_app\_id | 有数app\_id,沙箱| VARCHAR(255) | No | NULL | No |
+| sandbox\_app\_secret | 有数app\_secret,沙箱| VARCHAR(255) | No | NULL | No |
+| sandbox\_api\_url | 有数后端api url,沙箱| VARCHAR(255) | No | NULL | No |
+| weapp\_name | 小程序名称| VARCHAR(255) | No | NULL | No |
+| weapp\_app\_id | 小程序app\_id| VARCHAR(255) | No | NULL | No |
+| created\_at | | DATETIME | Yes | NULL | No |
+| updated\_at | | DATETIME | Yes | NULL | No |
+
+- 索引
+
+| Key name | Column names | Unique |
+| ------------- |-------------|-------------|
+| primary | id | Yes |
+| idx\_company\_id | company\_id | No |
diff --git a/docs/docs/ddzswy.md b/docs/docs/ddzswy.md
new file mode 100644
index 0000000..2019871
--- /dev/null
+++ b/docs/docs/ddzswy.md
@@ -0,0 +1,59 @@
+---
+url: ddzswy
+---
+
+# 配置信息与环境变量
+
+
+## 问题说明
+
+---
+
+
+
假如我们有个『CDN 域名』的变量,在 Laravel 中有以下几种方法:
+
+1. 硬代码,直接写死。- ❌ 可维护性低
+1. 写死在 `config/app.php` 文件中。 - ❌ 无法区分环境进行配置
+1. 存储于 `.env` 文件中,使用 `env()` 方法直接读取。 - ❌ 虽然解决了环境变量问题但是不推荐
+1. 存储在 `.env` 和 `config/app.php` 文件中,然后使用 `config()` 函数来读取。- ✅ 最佳实践
+
+
+
第一种方法是最古老的方法,代码可维护性极低,一旦域名变更就只能全局替换。
第二种方法无法区分环境,例如本地使用开发环境域名测试,线上才是正式的 CDN 域名。
第三种方法虽然解决了环境变量的问题,并且也具备一定的灵活性,但是不够灵活,假如你的网站流量巨大,需要配置几个 CDN 域名,使其在加载静态资源时随机支配域名,这种做法就无法满足需求了。
第四种方法既支持环境变量,又具备极高的灵活性,假如遇到同样的 CDN 多域名随机问题,你只需要写一个辅助方法,然后在 `config/app.php` 中调用即可,不需要动到任何一行业务逻辑代码。
+
+
+## 代码示例
+
+---
+
+
+
`.env` 文件中设置:
+
+```
+CDN_DOMAIN=cdndomain.com
+```
+
+
`config/app.php` 文件中设置:
+
+```
+'cdn_domain' => env('CDN_DOMAIN', null),
+```
+
+
程序中两种获取 `相同配置` 的方法:
+
+1. `env('CDN_DOMAIN')`
+1. `config('app.cdn_domain')`
+
+
+
在此统一规定:所有程序配置信息 **必须** 通过 `config()` 来读取,所有的 `.env` 配置信息 **必须** 通过 `config()` 来读取,**绝不** 在配置文件以外的范围使用 `env()`。
+
+
+## 有何优势
+
+---
+
+
+
这样做主要有以下几个优势:
+
+1. 定义分明,`config()` 是配置信息,`env()` 只是用来区分不同环境;
+1. 统一放置于 `config` 中还可以利用框架的 [配置信息缓存功能](http://learnku.com/docs/laravel/5.5/installation#configuration-caching) 来提高运行效率;
+1. 代码健壮性, `config()` 在 `env()` 之上多出来一个抽象层,会使代码更加健壮,更加灵活。
diff --git a/docs/docs/deploy_cluster_install.md b/docs/docs/deploy_cluster_install.md
new file mode 100644
index 0000000..5ac2245
--- /dev/null
+++ b/docs/docs/deploy_cluster_install.md
@@ -0,0 +1,70 @@
+---
+url: deploy_cluster_install
+---
+
+# 集群部署方案
+
+
+
+
+### 服务器说明(2web机情况,其他类似)
+
+
+- 本文档仅供参考,达到集群部署目的即可,不同运维都有自己的方案,生产环境的要求要复杂于以下文档,具体环境具体对待
+- 软件部署安装具体请参考 [linux单机部署方案](http://club.shopex.cn/ecshopx/manual/docs/deploy_install.html),集群部署可能不需按照单机部署那样所有软件都需要安装,根据服务器实际需要安装
+- 集群部署机器分配,根据业务需要进行机器配置,不是所有机器都是要一台或者多台服务器,根据你的实际情况来就可以了
+- 服务器信息列表
+| 机器 | 安装软件 | 说明 |
+| --- | --- | --- |
+| worker | php+supervisor | 队列机器,执行队列相关,默认用的redis队列 |
+| scheduler | php+supervisor | 定时任务机器 |
+| web1 | php+nginx | api,vue前端(后台、pc、h5) |
+| web2 | php+nginx | api,vue前端(后台、pc、h5) |
+| redis | redis | redis单机,或者第三方如阿里云的redis |
+| mysql | mysql | 自己安装mysql5.7单机或者集群,或者第三方如阿里云的rds |
+| 图片存储 | 七牛或者oss | 目前只支持第三方七牛或者阿里OSS云存储 |
+| 负载均衡 | haproxy | 自己搭建负载均衡服务器或者使用第三方如阿里云的负载均衡服务 |
+
+
+
+
+### 集群与单机的一些差异化说明
+
+#### 数据库配置
+> - env中配置数据库的方式有所改变,如果是自己的部署的数据库集群,参考下面的env配置修改配置就行了
+> - 如果用的阿里云的rds集群并且自己控制读写分离,也参照下面配置读写实例和只读实例
+> - 如果用的阿里云的rds的代理模式,则按照原来的数据库配置就行,不用特殊指定读写服务器
+
+```bash
+# 数据库主从配置,根据自己实际情况配置
+DB_DRIVER=master_slave
+DB_MASTER={"user":"root","password":"123455","host":"localhost","dbname":"ecx"}
+DB_SLAVES=[{"user":"root","password":"123455","host":"localhost2","dbname":"ecx"},{"user":"root","password":"123455","host":"localhost3","dbname":"ecx"}]
+```
+
+#### 代码同步
+> - 通过git的形式去更新代码,结合pssh命令或者自己写脚本去批量更新每台服务器
+> - 通过rsync等工具同步代码
+
+
+#### redis集群
+> - 如果要求不是特别高,部署一个单机的redis就可以了。
+> - 如果使用阿里云的集群,云数据库Redis集群版相比标准版在原生Redis命令的支持上有一定的区别,例如eval是不能用的,由于系统使用了lua脚本,所以阿里redis集群用起来是有问题的
+
+
+#### 负载均衡
+> - 自己安装负载均衡,如用nginx,haproxy等
+> - 用第三方如阿里云的负载均衡服务
+
+
+#### scheduler机
+> - 定时任务机器,跑一些系统的定时任务。如果机器资源不够,也可以和队列机部署在一起
+
+
+#### worker机
+> - 队列机,跑系统的一些队列,默认用的redis队列
+
+
+#### 云存储
+> - 系统目前只支持七牛云存储和阿里的oss,所以这里集群单机没有区别
+
diff --git a/docs/docs/deploy_install.md b/docs/docs/deploy_install.md
new file mode 100644
index 0000000..45deb50
--- /dev/null
+++ b/docs/docs/deploy_install.md
@@ -0,0 +1,1298 @@
+---
+url: deploy_install
+---
+
+# 单机部署方案
+
+
+## 约定
+
+
+- 操作系统:Centos 7.x x64
+- 域名: 文档内域名规划参见 [系统部署/准备/域名](deploy_prepare_domain)
+- 操作权限: root
+
+
+
+
+## 服务清单
+
+
+- supervisorctl > 3.0
+- neo4j 3.5.x
+- mysql 5.7
+- nginx + php-fpm
+- redis ~ 4.x
+- Node 16.16.0
+- Node 20.19.0(PC商城必须)
+- php 8.2
+
+
+
+
+## 基础服务部署
+
+
+
+### 调整时间
+
+
+```
+timedatectl set-timezone Asia/Shanghai
+```
+
+
+
+### 安装sudo
+
+
+```
+yum install sudo
+```
+
+
+
+### 安装PHP
+
+
+```bash
+yum -y install epel-release
+yum -y install https://rpms.remirepo.net/enterprise/remi-release-7.rpm
+yum -y install yum-utils
+
+yum -y install php82 \
+ php82-php-cli \
+ php82-php-gd \
+ php82-php-mbstring \
+ php82-php-mysqlnd \
+ php82-php-xml \
+ php82-php-opcache \
+ php82-php-bcmath \
+ php82-php-process \
+ php82-php-pecl-swoole5 \
+ php82-php-pecl-mongodb \
+ php82-php-pecl-zip \
+ php82-php-pecl-redis6 \
+ php82-php-pecl-apcu \
+ php82-syspaths
+```
+
+
验证
+
+```
+php --version
+php --modules
+```
+
+
+
+### 安装composer
+
+
+```
+curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/bin --filename=composer
+/usr/bin/composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/
+```
+
+
+
+### 安装supervisor
+
+
版本基于3.0
+
安装supervisor
+
+```
+yum install -y epel-release
+yum install -y supervisor
+```
+
+
开启supervisorctl
+
+```
+systemctl enable supervisord.service
+```
+
+
+
+### 创建用户和组
+
+
+```
+groupadd www
+useradd --shell /sbin/nologin -g www www
+```
+
+
+
+### 安装php-fpm
+
+
安装php-fpm
+
+```
+yum install php82-php-fpm
+```
+
+
开启php-fpm
+
+```
+systemctl enable php82-php-fpm.service
+```
+
+
修改用户权限, 将用户和组从apache 改为www
+
+```
+/etc/opt/remi/php82/php-fpm.d/www.conf
+```
+
+
+```
+user = www
+group = www
+```
+
+
+
+### 通过 nvm 安装管理 Node
+
+
+1. 安装nvm
+```
+export NVM_NODEJS_ORG_MIRROR=https://npmmirror.com/mirrors/node
+
+curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash
+```
+
+2. 通过nvm安装**Node.js**
+```
+nvm install 16.16.0
+
+nvm install 20.19.0
+```
+
+3. 检查**Node.js**版本```
+nvm ls
+
+ v16.16.0
+-> v20.19.0
+default -> 20.19.0
+```
+
+
+
+
参考: [How To Install Latest Nodejs on CentOS/RHEL 7/6](https://tecadmin.net/install-latest-nodejs-and-npm-on-centos/)
+
+
+### 安装nginx
+
+
安装nginx
+
+```bash
+yum install nginx
+```
+
+
开启nginx
+
+```bash
+systemctl enable nginx.service
+```
+
+
+
+### 安装crontabs
+> 如果已经安装,请忽略
+
+
+
+```bash
+yum install crontabs
+```
+
+
+```bash
+systemctl enable crond.service
+```
+
+
+```bash
+systemctl start crond.service
+```
+
+
+
+### 安装redis
+> 如果使用阿里云的redis,安装请忽略
+
+安装redis
+
+```bash
+yum install -y redis
+```
+
+
开启redis
+
+```bash
+yum enable redis
+```
+
+
修改配置文件**/etc/redis.conf**
+
+```bash
+# requirepass foobared
+requirepass #指定密码为 redis1234
+```
+
+
启动redis
+
+```bash
+systemctl start redis
+```
+
+
测试
+
+```bash
+redis-cli -h 127.0.0.1 -a redis1234
+keys *
+```
+
+
+
+### 安装neo4j
+
+
+1. 导入签名并且添加neo4j的源到本地centos源中
+```bash
+rpm --import https://debian.neo4j.org/neotechnology.gpg.key
+cat <
+ - 用**root**权限安装neo4j社区版
+```bash
+yum install neo4j-3.5.7
+```
+
+
+
+3. 运行以下命令会返回已安装的Neo4j的版本:
+
+```bash
+rpm -qa | grep neo4j
+```
+
+
+
+3. 修改默认**密码
**生产环境使用时需要修改初始密码, 否则会安装使用时报错.**
**
+```bash
+# neo4j-admin set-initial-password
+
+```
+yum install -y https://dev.mysql.com/get/mysql57-community-release-el7-9.noarch.rpm
+```
+
+
安装mysql
+
+```
+yum install -y mysql-server
+```
+
+
修改配置文件**/etc/my.conf**(配置位置取决于安装方式)
+
+**
+> **如果使用阿里云的RDS可以忽略此步骤**
+
+
+
+```
+sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'
+```
+
+
开启mysql
+
+```
+systemctl enable mysqld
+```
+
+
启动mysql
+
+```
+systemctl start mysqld
+```
+
+
在安装过程中,为MySQL**root**用户生成一个临时密码
+
+```
+grep 'temporary password' /var/log/mysqld.log
+```
+
+
输出:
+
+```
+2016-12-01T00:22:31.416107Z 1 [Note] A temporary password is generated for root@localhost: mqRfBU_3Xk>r
+```
+
+
请记录下密码, 在此例里中为**mqRfBU_3Xk>r**
+
+```
+mysql_secure_installation
+```
+
+
会提示你输入默认的**root**密码, 输入好后, 会被要求改掉密码.
+
输出
+
+```
+The existing password for the user account root has expired. Please set a new password.
+
+New password:
+```
+
+
输入一个新的12个字符的密码,该密码至少包含一个大写字母、一个小写字母、一个数字和一个特殊字符。在提示时重新输入.
+
在此例中设置为, **Wka25ijklmng0ada-x**
+
您将收到关于新密码强度的反馈,然后您将立即被提示再次更改密码.
+
输出
+
+```
+Estimated strength of the password: 100
+Change the password for root ? (Press y|Y for Yes, any other key for No) :
+```
+
+
我们将按下**Y**,然后进入所有后续问题,以便删除匿名用户、禁止远程根登录、删除测试数据库并访问它,并重新加载特权表.
+
命令行连接**mysql**
+
+```
+mysql -uroot -p"Wka25ijklmng0ada-x"
+```
+
+
创建应用数据库
+> 请使用编码 utf8mb4
+
+
+
+```
+CREATE DATABASE espier_bloated CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
+```
+
+
参考: [How To Install MySQL on CentOS 7](https://www.digitalocean.com/community/tutorials/how-to-install-mysql-on-centos-7)
+
+
+## 系统应用部署
+
+
部署几部分
+
+> 系统是前后端分离的。所以分为商家端(VUE开发,后台管理页面),API端(PHP开发,提供api服务)
+
+
+### 部署API服务(php)
+
+
+
+#### 配置
+
+
后端代码
+
+```
+mkdir -p /var/www/espier-bloated
+chown -R www:www /var/www/espier-bloated
+```
+
+
放置代码到**/var/www/espier-bloated**目录中
+
修改配置**.env**, 拷贝**.env.production**文件做为模版.
+
+1. 配置数据库```
+DB_HOST=127.0.0.1
+DB_PORT=3306
+DB_DATABASE=espier_bloated
+DB_USERNAME=root
+DB_PASSWORD=Wka25ijklmng0ada-x
+```
+
+
+
+1. 配置REDIS```bash
+# REDIS配置
+REDIS_CLIENT=predis
+REDIS_HOST=
+# 必须要设置密码
+REDIS_PASSWORD=redis1234
+REDIS_PORT=6379
+```
+
+1. 配置队列```bash
+QUEUE_DRIVER=redis
+```
+
+1. 配置neo4j```
+NEO4J_DEFAULT_PROTOCOL=bolt
+NEO4J_DEFAULT_HOST=127.0.0.1
+NEO4J_DEFAULT_PORT=7687
+NEO4J_DEFAULT_USERNAME=neo4j
+NEO4J_DEFAULT_PASSWORD=neo4j1234
+```
+
+1. 配置缓存```bash
+CACHE_DRIVER=redis
+```
+
+1. 配置七牛
[如何获取Access Key和Secret Key](https://developer.qiniu.com/af/kb/1479/how-to-access-or-locate-the-access-key-and-secret-key)
```bash
+# 图片CDN域名
+QINIU_IMAGE_DOMAIN=b-img-cdn.yuanyuanke.cn
+# 图片bucket
+QINIU_IMAGE_NAME=espier-images
+# 导入导出文件CDN域名
+QINIU__FILE_DOMAIN=https://b-import-cdn.yuanyuanke.cn
+导入导出bucket
+QINIU_FILE_NAME=espier-import-files
+# 七牛Access Key
+QINIU_ACCESS_KEY=
+# 七牛Secret Key
+QINIU_SECRET_KEY=
+```
+
+1. 配置阿里OSS选七牛就不用配了
+```bash
+# OSS配置
+## OSS密钥配置
+OSS_ACCESS_KEY=
+OSS_SECRET_KEY=
+## OSS文件配置
+### 不通地区域名不一样,文件类的不需要cdn
+OSS_FILE_ENDPOINT=https://oss-cn-shanghai.aliyuncs.com
+OSS_FILE_BUCKET=oss-cdn
+OSS_FILE_IS_CNAME=false
+## OSS图片配置
+OSS_IMAGE_ENDPOINT=https://oss-cn-shanghai.aliyuncs.com
+OSS_IMAGE_BUCKET=oss-cdn
+### 是否开启cdn
+OSS_IMAGE_IS_CNAME=false
+### 图片cdn,开启cdn则该配置必填
+OSS_IMAGE_DOMAIN=
+## OSS视频配置
+OSS_VIDEO_ENDPOINT=https://oss-cn-shanghai.aliyuncs.com
+OSS_VIDEO_BUCKET=oss-cdn
+OSS_VIDEO_IS_CNAME=flase
+### 视频cdn,开启cdn则该配置必填
+OSS_VIDEO_DOMAIN=
+```
+
+
+8. 配置微信开放平台第三方平台相关配置
+```bash
+# 微信开放平台对应第三方平台APPID
+WECHAT_APPID=
+# 微信开放平台对应第三方平台APPSECRET
+WECHAT_SECRET=
+# 微信开放平台对应第三方平台 消息校验Token
+WECHAT_TOKEN=
+# 微信开放平台对应第三方平台 消息加解密Key
+WECHAT_AES_KEY=
+WECHAT_DEBUG=true
+```
+9.配置商城小程序模版
模版ID, 需要添加到小程序模版库,获得模版ID, 参考:[开发者平台小程序模板](https://developers.weixin.qq.com/community/develop/doc/000c6c3524cff06575466ccd35ec00)
+```bash
+# 微商城小程序配置
+## 微信模板id
+YYKWEISHOP_TEMPLATE_ID=1
+## 微信模板id(小程序支持直播,一般可不填)
+YYKWEISHOP_TEMPLATE_ID_2=1
+## 小程序自定义版本
+YYKWEISHOP_VERSION=v1.0.0
+## request合法域名,逗号分割
+YYKWEISHOP_REQUESTDOMAIN=https://b.test.cn
+## socket合法域名,逗号分割
+YYKWEISHOP_WSREQUESTDOMAIN=wss://b-websocket.test.cn
+## uploadFile合法域名,逗号分割,七牛,根据自己实际情况填
+YYKWEISHOP_UPLOADDOMAIN=https://up.qiniup.com,https://up-as0.qiniup.com,https://up-na0.qiniup.com,https://up-z1.qiniup.com,https://up-z2.qiniup.com
+## uploadFile合法域名,逗号分割,阿里OSS,根据自己实际情况填
+#YYKWEISHOP_UPLOADDOMAIN=https://oss-cn-hangzhou.aliyuncs.com
+## downloadFile合法域名,逗号分割,七牛,根据自己实际情况填
+YYKWEISHOP_DOWNLOADDOMAIN=https://mmbiz.qpic.cn,https://wx.qlogo.cn,https://up.qiniup.com,https://up-as0.qiniup.com,https://up-na0.qiniup.com,https://up-z1.qiniup.com,https://up-z2.qiniup.com
+## downloadFile合法域名,逗号分割,阿里OSS,根据自己实际情况填
+#YYKWEISHOP_DOWNLOADDOMAIN=https://mmbiz.qpic.cn,https://wx.qlogo.cn,https://oss-cn-hangzhou.aliyuncs.com
+## 业务域名,逗号分割
+YYKWEISHOP_WEBVIEWDOMAIN=
+```
+10.配置腾讯位置服务
腾讯位置服务需要申请账号配置KEY, KEY对接口的访问是有配额的, 配额内是免费的.
在[腾讯位置服务Key管理](https://lbs.qq.com/console/mykey.html?console=mykey), 可以查询到Key, 并且可以查询到配额.
为了开发环境方便, 提供只为开发环境公用的免费KEY. 因为是公共的, 无法保证一定可用
+```bash
+QQMAP_KEY=PSPBZ-KQ5CW-CSGRF-ON2S4-K2HQJ-XEBQG
+```
+
+11. 配置支付通知接口
+```bash
+WECHAT_PAYMENT_NOTIFY=https://b.yuanyuanke.cn/wechatAuth/wxpay/notify
+```
+
+12. 生成api密钥
+```bash
+php artisan jwt:secret
+```
+
+13. 修改业务版本
+
+standard:标准连锁版,后台界面有“店铺”菜单
platform:平台版,后台界面有“商家”菜单,并且有独立的店铺后台
+```bash
+# 系统版本,standard|platform
+PRODUCT_MODEL=standard
+```
+
+
完整的例子
+
+```bash
+# 标识应用环境, 本地环境设置为local,生产环境为production
+APP_ENV=production
+# 调试模式, 正式环境可以关闭(true,false)
+APP_DEBUG=true
+# 时区不要修改
+APP_TIMEZONE=PRC
+
+# 数据库相关配置
+## DB_CONNECTION默认不需要改
+DB_CONNECTION=default
+DB_HOST=
+DB_PORT=3306
+DB_DATABASE=
+DB_USERNAME=
+DB_PASSWORD=
+
+# REDIS配置
+REDIS_CLIENT=predis
+REDIS_HOST=
+REDIS_PASSWORD=redis1234
+REDIS_PORT=6379
+
+# 数据库主从配置
+#DB_DRIVER=master_slave
+#DB_MASTER={"user":"root","password":"123455","host":"localhost","dbname":"ecx"}
+#DB_SLAVES=[{"user":"root","password":"123455","host":"localhost2","dbname":"ecx"},{"user":"root","password":"123455","host":"localhost3","dbname":"ecx"}]
+
+# 缓存驱动, 默认使用redis
+CACHE_DRIVER=redis
+# 队列驱动, 默认使用redis
+QUEUE_DRIVER=redis
+
+# 文件存储。oss或者qiniu
+DISK_DRIVER=qiniu
+
+# 七牛相关配置
+## 七牛密钥配置
+QINIU_ACCESS_KEY=
+QINIU_SECRET_KEY=
+## 七牛图片配置
+QINIU_IMAGE_DOMAIN=
+QINIU_IMAGE_NAME=espier-image
+QINIU_IMAGE_REGION=z2
+## 七牛视频配置
+QINIU_VIDEO_DOMAIN=
+QINIU_VIDEO_NAME=espier-videos
+QINIU_VIDEO_REGION=z2
+## 七牛文件配置
+QINIU__FILE_DOMAIN=
+QINIU_FILE_NAME=espier-file
+
+# OSS配置
+## OSS密钥配置
+OSS_ACCESS_KEY=
+OSS_SECRET_KEY=
+## OSS文件配置
+### 不通地区域名不一样,文件类的不需要cdn
+OSS_FILE_ENDPOINT=https://oss-cn-shanghai.aliyuncs.com
+OSS_FILE_BUCKET=oss-cdn
+OSS_FILE_IS_CNAME=false
+## OSS图片配置
+OSS_IMAGE_ENDPOINT=https://oss-cn-shanghai.aliyuncs.com
+OSS_IMAGE_BUCKET=oss-cdn
+### 是否开启cdn
+OSS_IMAGE_IS_CNAME=false
+### 图片cdn,开启cdn则该配置必填
+OSS_IMAGE_DOMAIN=
+## OSS视频配置
+OSS_VIDEO_ENDPOINT=https://oss-cn-shanghai.aliyuncs.com
+OSS_VIDEO_BUCKET=oss-cdn
+OSS_VIDEO_IS_CNAME=flase
+### 视频cdn,开启cdn则该配置必填
+OSS_VIDEO_DOMAIN=
+
+# JWT 相关配置, 通过php artisan jwt:secret生成密钥,线上务必修改
+JWT_SECRET=ker4H1Gp4TsddddWJMaB2SMA8Zsh3drv
+JWT_TTL=7200
+JWT_REFRESH_TTL=20160
+
+# 微信第三方平台配置。本地开发环境不配置, 会影响到调用微信的相关页面, 整体不影响后台开发。
+## 第三方平台APPID
+WECHAT_APPID=
+## 第三方平台SECRET
+WECHAT_SECRET=
+## 消息校验Token
+WECHAT_TOKEN=
+## 消息加解密Key
+WECHAT_AES_KEY=
+## 开启微信接口debug模式
+WECHAT_DEBUG=true
+
+# 微信支付通知回调地址
+WECHAT_PAYMENT_NOTIFY=https://域名/wechatAuth/wxpay/notify
+
+# 支付宝配置
+ALIPAY_PAYMENT_NOTIFY=
+ALIPAY_PAYMENT_RETURN=
+ALIPAY_PAYMENT_RETURN_PC=
+ALIPAY_PAYMENT_RETURN_H5=
+ALIPAY_MODE=normal
+
+# SWOOLE 配置
+SERVER_HOST=0.0.0.0
+SERVER_PORT=9058
+
+# 好像没用
+SERVER_OPTIONS_USER=www-data
+SERVER_OPTIONS_GROUP=www-data
+SERVER_OPTIONS_DAEMONIZE=false
+SERVER_OPTIONS_WORKER_NUM=4
+
+# dingo api标准配置, 根据实际场景进行配置,token需要修改
+API_PREFIX=api
+API_NAME="Espier API"
+API_STANDARDS_TREE=vnd
+API_STRICT=false
+API_DEBUG=false
+API_VERSION=v1
+API_SUBTYPE=espier
+API_CONDITIONAL_REQUEST=false
+API_TOKEN=Os6Bass1oT5vig2Yod0yiT8dU0as5cIn
+
+# RABBITMQ配置
+RABBITMQ_HOST=
+RABBITMQ_PORT=5672
+RABBITMQ_VHOST=/
+RABBITMQ_LOGIN=guest
+RABBITMQ_PASSWORD=
+RABBITMQ_QUEUE=default
+RABBITMQ_EXCHANGE_DECLARE=true
+RABBITMQ_QUEUE_DECLARE_BIND=true
+RABBITMQ_QUEUE_PASSIVE=false
+RABBITMQ_QUEUE_DURABLE=true
+RABBITMQ_QUEUE_EXCLUSIVE=false
+RABBITMQ_QUEUE_AUTODELETE=false
+RABBITMQ_EXCHANGE_NAME=sweetheart
+RABBITMQ_EXCHANGE_TYPE=direct
+RABBITMQ_EXCHANGE_PASSIVE=false
+RABBITMQ_EXCHANGE_DURABLE=true
+RABBITMQ_EXCHANGE_AUTODELETE=false
+RABBITMQ_ERROR_SLEEP=false
+
+# NEO4J配置
+NEO4J_DEFAULT_PROTOCOL=http
+NEO4J_DEFAULT_HOST=127.0.0.1
+NEO4J_DEFAULT_PORT=7474
+NEO4J_DEFAULT_USERNAME=neo4j
+NEO4J_DEFAULT_PASSWORD=
+
+#默认小程序模板名称
+DEFAULT_WEISHOP_TEMP=yykweishop
+
+# 微商城小程序配置
+## 微信模板id
+YYKWEISHOP_TEMPLATE_ID=1
+## 微信模板id(小程序支持直播,一般可不填)
+YYKWEISHOP_TEMPLATE_ID_2=1
+## 小程序自定义版本
+YYKWEISHOP_VERSION=v1.0.0
+## request合法域名,逗号分割
+YYKWEISHOP_REQUESTDOMAIN=https://b.test.cn
+## socket合法域名,逗号分割
+YYKWEISHOP_WSREQUESTDOMAIN=wss://b-websocket.test.cn
+## uploadFile合法域名,逗号分割,七牛,根据自己实际情况填
+YYKWEISHOP_UPLOADDOMAIN=https://up.qiniup.com,https://up-as0.qiniup.com,https://up-na0.qiniup.com,https://up-z1.qiniup.com,https://up-z2.qiniup.com
+## uploadFile合法域名,逗号分割,阿里OSS,根据自己实际情况填
+#YYKWEISHOP_UPLOADDOMAIN=https://oss-cn-hangzhou.aliyuncs.com
+## downloadFile合法域名,逗号分割,七牛,根据自己实际情况填
+YYKWEISHOP_DOWNLOADDOMAIN=https://mmbiz.qpic.cn,https://wx.qlogo.cn,https://up.qiniup.com,https://up-as0.qiniup.com,https://up-na0.qiniup.com,https://up-z1.qiniup.com,https://up-z2.qiniup.com
+## downloadFile合法域名,逗号分割,阿里OSS,根据自己实际情况填
+#YYKWEISHOP_DOWNLOADDOMAIN=https://mmbiz.qpic.cn,https://wx.qlogo.cn,https://oss-cn-hangzhou.aliyuncs.com
+## 业务域名,逗号分割
+YYKWEISHOP_WEBVIEWDOMAIN=
+
+# 核销小程序配置,没有这个业务不需要填
+YYKZS_APPID=
+YYKZS_APP_SECRET=
+
+# websocket配置
+WEBSOCKET_SERVER_PORT=9051
+WEBSOCKET_SERVER_HOST=域名
+TIPS_WS_URI=https://域名/ws:9051
+TIPS_WS_KEY=
+
+# sentry配置,报错收集
+SENTRY_LARAVEL_DSN=
+
+# 分销配置
+BROKERAGE_URI=
+BROKERAGE_URI_ITEM=
+
+# OMS配置
+OMS_TOKEN=
+OMS_API_URL=
+ERP_GY_TOKEN=
+
+# 默认地址模板
+ADDRESS_TEMPLATE_ID=
+
+# 日志删除时间
+DEL_OPERATOR_LOGS_DATE=
+# 是否saas
+SYSTEM_IS_SAAS=false
+# 主company_id,单账户,不是saas的配置
+SYSTEM_COMPANYS_ID=1
+# 设置系统主要的企业id,用于pc和h5
+SYSTEM_MAIN_COMPANYS_ID=1
+
+# 是否使用系统菜单,false则是固定菜单,true则更新storage/static/目录下的菜单
+USE_SYSTEM_MENU=true
+# 系统版本,starndard|platform
+PRODUCT_MODEL=standard
+
+# 对接saas ERP的配置信息
+STORE_KEY=59887c5ceec36fa1a9d9a72c6cdf3741
+CERTI_BASE_URL=https://您的域名/
+# 矩阵关系绑定API
+MATRIX_REALTION_URL=https://iframe.shopex.cn/?
+# 矩阵API
+MATRIX_API_URL=http://matrix.ecos.shopex.cn/sync
+VERIFY_APP_ID=ecos.ecshopx
+
+# 腾讯地图接口KEY, 建议根据项目进行申请
+QQMAP_KEY=PSPBZ-KQ5CW-CSGRF-ON2S4-K2HQJ-XEBQG
+# 腾讯地图配置
+TENCENT_LBS_KEY=
+TENCENT_LBS_SECERT_KEY=
+
+# 是否需要服务号,false则需要自己绑定到开放平台
+WX_OPEN_THIRD=true
+# 是否需要第三方平台
+WXA_NEED_OPEN_PLATFORM=true
+
+# 内部rpc,不用管
+RPCCALL_DRIVER=dingo
+
+# prism配置,默认不用动
+PRISM_URL=http://openapi.shopex.cn/api
+PRISM_KEY=a4dyatls
+PRISM_SECRET=xescyjbdmzox75cfybab
+
+# license配置,不用管
+LICENSE_PRODUCTION_URL=http://service.ec-os.net/api/yyk/register
+LICENSE_PRODUCT=yyk
+
+# 文档生成配置
+SWAGGER_STORAGE_DIR=apidocs
+SWAGGER_DOCS_ROUTER=api-doc
+SWAGGER_API_HOST=
+SWAGGER_API_BASE_PATH=/index.php/api
+
+# 发票链接
+FAPIAO_HANGXIN_API_URL=
+
+# pc端扫码登录
+PC_WXCODE_LOGIN=
+
+# H5地址
+H5_BASE_URL=
+
+```
+
+
+
+#### 安装
+
+
安装composer扩展包
+
+```
+cd /var/www/espier-blaoted
+composer install
+```
+
+
数据库迁移
+
+```
+cd /var/www/espier-blaoted
+./artisan doctrine:migrations:migrate
+```
+
+
+
+### 部署商家端(vue)
+
+
商家端代码
+
代码build好后build目录里的文件直接copy至此目录
+
+1. 创建项目目录```
+mkdir -p /var/www/espier-retail-manage
+```
+
+1. 放置代码
通常会通过git的方式进行部署及更新
+
+根据业务选择版本。standard:标准版,有“店铺”菜单。platform:平台版,有“商家”菜单
修改**app/config/test.env.js**```bash
+module.exports = {
+ IS_SAAS: '"true"',
+ PRODUCT_MODEL: '"standard"',// standard:标准版;platform:平台版
+ NODE_ENV: '"testing"',
+ BASE_API: '"https://b.yuanyuanke.cn/api"',// 请求的api基础地质
+ //WXIMG_URL: '"https://b.yuanyuanke.cn/image/"',
+ WXIMG_URL: '""',
+ WXAUTHCALL_Url: '"https://b.yuanyuanke.cn/"' // 微信授权回调域名,最后的斜杠别忘记了
+}
+```
+
+3. 安装npm包
+```bash
+cd /var/www/espier-retail-manage/app
+
+npm install
+```
+
+3. 代码编译目录
**/var/www/espier-retail-manage/app/config/index.js**```
+assetsRoot: path.resolve(__dirname, '../test'),
+```
+
编译后的文件在**/var/www/espier-retail-manage/app/test**下
+3. 代码编译```
+npm run build-test
+```
+
+7. 更改权限```
+chown -R www:www /var/www/espier-retail-manage
+```
+
+
+
+
+
+### 配置nginx
+
+
修改/etc/nginx/nginx.conf, 将权限nginx 改为www
+
+```
+use www;
+```
+
+
创建项目nginx配置
+> 以下是通过反向代理的形式配置的服务,您也可以自己按照自己需要配置,只要vue能访问到php就ok了
+
+```
+vim /etc/nginx/conf.d/espier.conf
+```
+
+
需要配置ssl证书, 在下边配置的所有**配置ssl**处。
+```bash
+server
+{
+ listen 443;
+ # 配置ssl
+
+ server_name b.yuanyuanke.cn;
+
+ location /api/ {
+ access_log /var/log/nginx/espier-bloated.log;
+ proxy_pass http://localhost:8080;
+ }
+
+ location /wechatAuth/ {
+ access_log /var/log/nginx/espier-wechatauth.log;
+ proxy_pass http://localhost:8080;
+ }
+
+ location / {
+ proxy_pass http://localhost:8081;
+ }
+}
+
+# 配置API服务(espier-bloated)
+server {
+
+ listen 8080;
+ listen [::]:8080;
+
+ server_name localhost;
+ root /var/www/espier-bloated/public;
+ index index.php index.html index.htm;
+
+ location / {
+ try_files $uri $uri/ /index.php$is_args$args;
+ }
+
+ location ~ \.php$ {
+ add_header Access-Control-Allow-Origin '*' always;
+ add_header Access-Control-Allow-Headers "Content-Type, Access-Control-Allow-Headers, Authorization, X-Requested-With";
+ add_header Access-Control-Expose-Headers "Authorization";
+ add_header Access-Control-Allow-Methods "DELETE, GET, HEAD, POST, PUT, OPTIONS, TRACE, PATCH";
+
+ if ($request_method = OPTIONS ) {
+ return 200;
+ }
+
+ fastcgi_pass localhost:9000;
+ fastcgi_read_timeout 150;
+ fastcgi_index index.php;
+ fastcgi_buffers 16 16k;
+ fastcgi_buffer_size 32k;
+ fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
+ include fastcgi_params;
+ }
+
+ location ~ /\.ht {
+ deny all;
+ }
+}
+
+# 配置商家端(espier-retail-manage)
+# pc端配置,h5配置可以参考这个进行修改
+server {
+ listen 8081;
+ listen [::]:8081;
+
+ server_name localhost;
+
+ location / {
+ root /var/www/espier-retail-manage/app/test;
+ index index.html index.htm;
+ try_files $uri $uri/ /index.html =404;
+ }
+
+ location /wximage/ {
+ set $hostx "";
+ set $addrs "";
+ if ( $uri ~ "^/wximage/http./+([^/]+)/(.+)$") {
+ set $hostx $1;
+ set $addrs $2;
+ }
+ resolver 8.8.8.8;
+ proxy_pass http://$hostx/$addrs;
+ proxy_set_header referer "http://read.html5.qq.com/image";
+ }
+}
+
+配置websocket服务
+server
+{
+ listen 443;
+
+ # 配置ssl
+
+ server_name b-websocket.yuanyuanke.cn;
+
+ location / {
+ proxy_pass http://localhost:9051/;
+
+ proxy_set_header X-Real-IP $remote_addr;
+ proxy_set_header Host $host;
+ proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
+
+ proxy_http_version 1.1;
+ proxy_set_header Upgrade $http_upgrade;
+ proxy_set_header Connection "upgrade";
+ }
+}
+```
+
+
+
+### 配置定时任务
+
+
+```
+crontab -e
+```
+
+
+```json
+* * * * * sudo -E -u www php /var/www/espier-bloated/artisan schedule:run >> /var/log/espier-cront.log 2>&1
+```
+
+
+
+### 配置队列服务
+
+
修改队列配置
+
+```
+vim /etc/supervisord.d/super-queue.ini
+```
+
+
+```bash
+[program:bloated-queue-default]
+command=/var/www/espier-bloated/artisan queue:work --queue=default --delay=3 --memory=128 --timeout=30 --sleep=1 --tries=3
+stdout_logfile=/var/www/espier-bloated/storage/logs/supervisor-bloated-queue-default.log
+redirect_stderr=true
+process_name=%(program_name)s_%(process_num)02d
+autostart=true
+autorestart=true
+numprocs=1
+user=www
+startsecs=3
+startretries=100000
+
+[program:bloated-queue-slow]
+command=/var/www/espier-bloated/artisan queue:work --queue=slow --delay=3 --memory=128 --timeout=1800 --sleep=1 --tries=3
+stdout_logfile=/var/www/espier-bloated/storage/logs/supervisor-bloated-queue-slow.log
+redirect_stderr=true
+process_name=%(program_name)s_%(process_num)02d
+redirect_stderr=true
+autostart=true
+autorestart=true
+numprocs=1
+user=www
+startsecs=3
+startretries=100000
+
+[program:bloated-queue-sms]
+command=/var/www/espier-bloated/artisan queue:work --queue=sms --delay=3 --memory=128 --timeout=1800 --sleep=1 --tries=3
+stdout_logfile=/var/www/espier-bloated/storage/logs/supervisor-bloated-queue-sms.log
+redirect_stderr=true
+process_name=%(program_name)s_%(process_num)02d
+redirect_stderr=true
+autostart=true
+autorestart=true
+numprocs=1
+user=www
+startsecs=3
+startretries=100000
+```
+
+
+
+### 配置websocket服务
+
+
配置websocket
+
+```
+vim /etc/supervisord.d/super-websocket.ini
+```
+
+
+```bash
+[program:websocket]
+command=/var/www/espier-bloated/artisan websocket:start
+stdout_logfile=/var/www/espier-bloated/storage/logs/supervisor-websocket.log
+redirect_stderr=true
+autostart=true
+autorestart=true
+numprocs=1
+user=www
+startsecs=3
+startretries=100000
+```
+
+
+
+### 小程序编译打包
+
+- .env文件配置信息
+
+
+
+```json
+ {
+ "APP_BASE_URL": "接口访问地址",
+ "APP_WEBSOCKET": "websocket访问地址",
+ "APP_COMPANY_ID": "企业id",
+ "APP_PLATFORM": "打包平台,standard为标准版, platform为平台版",
+ "APP_CUSTOM_SERVER": "域名地址,H5支付回调使用",
+ "APP_HOME_PAGE": "首页访问路径",
+ "APP_MAP_KEY": "H5 腾讯地图使用key",
+ "APP_MAP_NAME": "H5 使用地图name"
+ }
+```
+
+
+- ext.json文件配置
+
+
+
+```json
+{
+ "extEnable": true,
+ "extAppid": "第三方平台绑定的开发小程序id,一般建议与小程序appid相同",
+ "ext": {
+ "company_id": "企业id",
+ "appid": "小程序id",
+ "wxa_name": "通用小程序"
+ }
+}
+```
+
+
+- npm打包指令
+
+
+
+```bash
+# 如遇初始化下载时间过长或者network timeout,可更换npm镜像源
+# npm更换淘宝镜像,使用此命令后,npm指令关键词改为(cnpm),例如:npm i 改为 cnpm i
+# 更换命令:npm install -g cnpm --registry=https://registry.npm.taobao.org
+
+# npm初始化安装
+npm i
+
+# 小程序本地开发编译
+npm run dev:weapp
+
+# 小程序生产打包
+npm run build:weapp
+
+# ----------目前小程序包与H5分离,小程序包暂不支持打包H5,请注意区分-----------------
+
+# H5本地开发编译
+npm run dev:h5
+
+# H5生产打包
+npm run build:h5
+```
+
+
+- 注意事项
+> - 关于小程序预览,dev:weapp本地开发编译模式下因为主包过大无法上传预览,需要使用build:weapp打包后选择小程序开发工具中的详情->本地设置->上传代码时自动压缩混淆
+> - 如果不需要直播插件请在app.js找到_live-player-plugin代码块将其注释掉_
+> - 目前小程序包与H5分离,小程序包暂不支持打包H5,请注意区分
+
+
+##
+
+### H5编译打包
+> 只支持H5打包
+
+
+
+- .env文件配置
+
+
+
+```javascript
+//小程序id
+APP_ID="小程序id"
+//首页路径
+APP_HOME_PAGE="首页路径"
+//企业ID
+APP_COMPANY_ID="企业ID"
+//api访问地址
+APP_API_BASE_URL="api访问地址"
+//域名地址
+APP_HOME_URL="h5访问域名地址"
+//websocket访问地址
+APP_WEBSOCKET_URL="websocket访问地址"
+//cdn地址
+APP_PUBLIC_PATH="cdn地址"
+//cdn地址
+CDN_QINIU_BUCKET="七牛cdn地址BUCKET"
+CDN_QINIU_PATH=h5/
+// 平台判断(standard 标准版 platform平台版)
+APP_PLATFORM="版本参数"
+//地图key
+APP_MAP_KEY="腾讯地图key"
+//地图name
+APP_MAP_NAME="腾讯地图名称"
+```
+
+
+- cdn配置
+> package.json文件配置
+
+
+
+```javascript
+"cdn": {
+ "publicPath": "*host*",
+ "bucket": "***",
+ "path": "h5/"
+}
+```
+
+
+- 打包发布
+
+
+
+```bash
+# 如遇初始化下载时间过长或者network timeout,可更换npm镜像源
+# npm更换淘宝镜像,使用此命令后,npm指令关键词改为(cnpm),例如:npm i 改为 cnpm i
+# 更换命令:npm install -g cnpm --registry=https://registry.npm.taobao.org
+
+# npm初始化安装
+npm i
+
+# H5本地开发编译
+npm run dev:h5
+
+# H5生产打包
+npm run build:h5
+
+# ----------目前小程序包与H5分离,H5包暂不支持打包小程序包,请注意区分-----------------
+# 小程序本地开发编译
+npm run dev:weapp
+
+# 小程序生产打包
+npm run build:weapp
+```
+
+
+- 美洽客服配置
+
+
+
+> 如果配置了美洽客服将客户的美洽配置文件放置在打包生成的/dist/h5中与index.html同级
+>
+
+> 美洽客服配置文件需要客户登录自己的美洽客服平台访问[https://app.meiqia.com/chatlink](https://app.meiqia.com/chatlink) 生成文件下载下来
+
+
+
+- 关于@shopex/sp-mui-app无法安装处理
+
+
+
+```bash
+# 配置npm镜像源
+npm config set registry http://registry.npm.ishopex.cn
+```
+
+##
+
+## 服务启动
+
+
启动队列任务, websocket服务
+
+```bash
+systemctl start supervisord.service
+```
+
+
启动nginx
+
+```
+systemctl start nginx.service
+```
+
+
启动php-fpm
+
+```
+systemctl start php82-php-fpm.service
+```
diff --git a/docs/docs/deploy_prepare_amore_open_weixin.md b/docs/docs/deploy_prepare_amore_open_weixin.md
new file mode 100644
index 0000000..c81c2ea
--- /dev/null
+++ b/docs/docs/deploy_prepare_amore_open_weixin.md
@@ -0,0 +1,139 @@
+---
+url: deploy_prepare_amore_open_weixin
+---
+
+# 微信开放平台-第三方平台配置
+
+
+## 注册微信平台账号
+
+[注册微信平台注册](https://open.weixin.qq.com/cgi-bin/readtemplate?t=regist/regist_tmpl&lang=zh_CN)
+
+
+## 开发者资质认证
+
+[第三方平台申请流程](https://open.weixin.qq.com/cgi-bin/frame?t=home/wx_plugin_tmpl&lang=zh_CN)
+
+点击`开发者资质认证`, 并进行认证.
+
+> 开发者资质认证介绍
+
+> 微信开放平台帐号的开发者资质认证提供更安全、更严格的真实性认证、也能够更好的保护企业及用户的合法权益
+开发者资质认证通过后,微信开放平台帐号下的应用,将获得微信登录、智能接口、第三方平台开发等高级能力
+审核费用:中国大陆地区:300元,非中国大陆地区:99美元
+
+
+认证时间大概2-3天, 已微信实际认证时间为准
+
+
+## 创建第三方平台
+
+管理中心->第三方平台
+
+
+点击`创建第三方平台`
+
+
+## 输入基本信息
+
+平台类型选择`平台型服务商`
+
+
+## 选择权限
+
+公众号权限
+
+
+小程序权限
+
+
+
+## 填写开发资料
+
+为了表述方便, 下文将以源源客正式站站为例.
+
+websocket地址: **dev-websocket-wmp.amorepacific.com.cn**
+
+授权流程相关
+
+- 授权发起页域名: dev-wmp.amorepacific.com.cn
+
+> 必须从本域名内网页跳转到登录授权页,才可完成登录授权。无需填写`http://等域名协议前缀`
+
+
+- 授权测试公众号列表: ghhh_fff6479ae2c8;gh_7bc47f612ba6
+
+> 在全网发布之前,仅该列表内公众号才可进行授权,以便测试。请填写公众号的原始ID(可在公众平台网站的公众号设置页找到),最多10个,以英文“;”隔开。
+
+
+- 授权事件接收URL: dev-wmp.amorepacific.com.cn/wechatAuth/events
+
+::: danger
+**url前缀**选择https
+:::
+
+> 用于接收取消授权通知、授权成功通知、授权更新通知,也用于接收ticket,ticket是验证平台方的重要凭据。
+
+
+授权后实现业务
+
+- 消息校验Token: qwn2995ktj024
+
+> 开发者在代替公众号或小程序接收到消息时,用此Token来校验消息。
+
+
+::: danger
+**消息校验Token**前后, 绝不能有空格
+:::
+
+- 消息加解密Key: sklfjkfgeiawwwqvn65997wlj01ndnfoqoe8x2k0nck
+
+> 在代替公众号或小程序收发消息过程中使用。必须是长度为43位的字符串,只能是字母和数字。
+
+
+::: danger
+**消息加解密Key**前后, 绝不能有空格. 长度必须43位
+:::
+
+- 消息与事件接收URL: dev-wmp.amorepacific.com.cn/wechatAuth/callback/$APPID$
+
+::: danger
+**url前缀**选择https
+:::
+
+> 通过该URL接收公众号或小程序消息和事件推送,该参数按规则填写(需包含/$APPID$,如www.abc.com/$APPID$/callback),实际接收消息时$APPID$将被替换为公众号或小程序AppId。
+
+
+- 公众号开发域名: dev-wmp.amorepacific.com.cn
+
+> 第三方平台在代公众号做网页授权、调用JS SDK等网页开发工作时所用的域名,以;隔开。为了满足开发者管理需要,符合以下要求的下级域名也将生效:$APPID$.wx.abc.com($APPID$为公众号的AppID的替换符)
+请**下载校验文件**,并将文件放置在域名根目录下,例如wx.qq.com,并确保可以访问该文件。
+每月可提交修改申请3次,本月有3次机会
+
+
+- 小程序服务器域名: dev-wmp.amorepacific.com.cn;dev-websocket-wmp.amorepacific.com.cn;mmbiz.qpic.cn;wx.qlogo.cn;
+
+> 第三方平台旗下授权的小程序,只可配置本平台服务器域名列表中的域名,以;隔开。
+每月可提交修改申请3次,本月有2次机会
+
+
+::: info
+需要访问的小程序服务器域名, 同时需要后端接口**dev-wmp.amorepacific.com.cn** 和 websocket服务: **dev-websocket-wmp.amorepacific.com.cn**
+:::
+
+- 小程序业务域名:
+
+> 请**下载校验文件**,并将文件放置在域名根目录下,例如wx.qq.com,并确保可以访问该文件。
+每月可提交修改申请3次,本月有3次机会
+
+
+其他
+
+- 白名单IP地址列表: 40.73.103.142
+
+> 仅当开发者IP地址在该列表中时,才被允许调用相关接口。最多填写100个IP地址,以英文“;”隔开。
+
+
+::: info
+服务器出口ip地址, 如果是vpc. 否则访问微信接口会被拒
+:::