数据辞典
数据库表数量: 431个
- Hfpay_withdraw_set(提现设置表)
- activate_log(激活表)
- adapay_alipay_industry_category(支付宝行业分类)
- adapay_bank_codes(银行代码)
- adapay_corp_member(企业用户对象)
- adapay_div_fee(分账金额表)
- adapay_draw_cash(adapay提现表)
- adapay_entry_apply(开户申请表)
- adapay_member(实名用户对象)
- adapay_member_update_log(adapay子账户修改log(审核成功后修改))
- adapay_merchant_entry(adapay开户进件)
- adapay_merchant_resident(adapay商户入驻)
- adapay_operation_log(adapay操作日志表)
- adapay_paymemt_confirm(adapay支付确认表)
- adapay_payment_reverse(adapay支付撤销表)
- adapay_regions(省市编码(四位码))
- adapay_regions_third(省市区编码(六位码或九位码))
- adapay_settle_account(结算账户)
- adapay_sms_log(adapay短信提醒日志表)
- adapay_submit_license(adapay提交商户证照)
- adapay_upload_license(adapay上传商户证照)
- adapay_withdraw_set(提现设置表)
- adapay_wx_business_category(微信经营类目)
- aftersales(售后主表)
- aftersales_detail(售后明细子表)
- aftersales_offline_refund(线下转账退款)
- aftersales_refund(退款表)
- ali_mini_app_setting(支付宝小程序配置表)
- aliyunsms_accesskey(AccessKey表)
- aliyunsms_record(短信发送记录)
- aliyunsms_scene(场景表)
- aliyunsms_scene_item(场景实例表)
- aliyunsms_sign(短信签名表)
- aliyunsms_task(短信群发任务)
- aliyunsms_template(模板表)
- bspay_div_fee(分账金额表)
- bspay_entry_apply(开户申请表)
- bspay_paymemt_confirm(斗拱支付确认表)
- bspay_regions_third(省市区编码(六位码或九位码))
- bspay_user_card(用户结算账户)
- bspay_user_ent(企业用户对象)
- bspay_user_indv(个人用户)
- bspay_user_update_log(用户进件修改log(审核成功后修改))
- business_rep_user(业务员关联会员)
- business_representative(业务员)
- card_package(卡券包)
- card_package_items(卡券包关联表)
- card_package_receive(卡券包领取记录表)
- card_package_receive_details(卡券包领取记录详情表)
- card_package_receive_record(等级卡券包领取记录表)
- card_package_trigger(卡券包触发关联表)
- chinaumspay_division(银联商务支付分账流水)
- chinaumspay_division_detail(银联商务支付分账流水明细)
- chinaumspay_division_error_log(银联商务支付分账错误日志)
- chinaumspay_division_upload_detail(银联商务支付sftp上传明细)
- chinaumspay_division_upload_log(银联商务支付上传文件日志)
- community_activity(社区拼团活动表)
- community_activity_item(社区拼团活动商品表)
- community_activity_ziti(社区拼团活动自提表)
- community_cart(社区团购购物车)
- community_chief(社区拼团团长表)
- community_chief_apply_info(社区拼团团长申请表)
- community_chief_cash_withdrawal(团长提现表)
- community_chief_distributor(社区拼团团长关联店铺表)
- community_chief_ziti(社区拼团团长自提点管理表)
- community_items(社区拼团商品池)
- community_order_rel_activity(社区团购购物车)
- company_rel_dada(商城关联达达同城配表)
- company_rel_delivery(商城关联配送配置表)
- company_rel_kuaizhen(商城关联580快诊配置)
- company_rel_logistics(商城物流启用表)
- company_rel_shansong(商城关联闪送应用配置信息表)
- companys(公司表)
- companys_article(文章表)
- companys_article_category(文章类目表)
- companys_currency_exchange_rate(货币汇率)
- companys_employee_rel_roles(员工绑定角色表)
- companys_operator_cart(导购员购物车)
- companys_operator_logs(商家操作日志表)
- companys_operator_pending_order(导购挂单)
- companys_profit(分润记录表)
- companys_profit_log(分润记录表)
- companys_profit_statistics(分润记录表)
- companys_protocol_update_log(协议更新日志表)
- companys_regionauth(地区权限)
- companys_roles(员工角色表)
- companys_saleman_customer_complaints(导购客诉表)
- companys_saleperson_cart(导购员购物车)
- companys_sales_promotions(导购促销单)
- companys_salesperson_statistics(导购员销售额数据统计表)
- companys_setting(企业设置表)
- companys_statistics(商城数据统计表)
- companys_store_statistics(商城数据统计表)
- config_request_fields(配置信息, 配置传递的请求字段)
- coupon_give_error_log(优惠券赠送失败记录表)
- coupon_give_log(优惠券赠送表)
- crossborder_identity(跨境-身份证信息)
- crossborder_origincountry(跨境-产地国表)
- crossborder_set(跨境-设置)
- crossborder_taxstrategy(跨境-税费策略)
- custom_declare_order_result(订单附加信息提交信息接口请求结果表)
- customs_data(接收海关支付数据请求表)
- datacube_company_data(商城数据统计表)
- datacube_distributor_data(商城门店数据统计表)
- datacube_goods_data(商品数据统计表)
- datacube_merchant_data(商户数据统计表)
- datacube_monitors(小程序页面监控)
- datacube_relsources(小程序页面与来源关联表)
- datacube_statistics(小程序页面与来源关联表)
- deposit_recharge_agreement(充值协议表)
- deposit_recharge_rule(储值规则,充值固定金额送钱或送礼品)
- deposit_trade(预存款交易记录表)
- distribution_basic_config(分销商基础配置)
- distribution_cash_withdrawal(分销商佣金提现记录表)
- distribution_distribute_logs(分销商佣金记录表)
- distribution_distributor(店铺表)
- distribution_distributor_geofence(店铺围栏信息)
- distribution_distributor_items(店铺导购员表)
- distribution_distributor_sales_count(店铺销量表)
- distribution_distributor_salesman(店铺导购员表)
- distribution_distributor_salesman_role(店铺权限表)
- distribution_distributor_user(会员对应的导购员信息表)
- distribution_distributor_white_list(店铺表)
- distribution_pickup_location(店铺自提点)
- distribution_shopScreen_advertisement(广告表)
- distribution_shopScreen_slider()
- distributor_aftersales_address(店铺售后地址)
- distributor_rel_tags(店铺关联标签表)
- distributor_tags(店铺标签库表)
- distributor_wechat_rel(店务端微信关联表)
- distributor_work_wechat_rel(店务端企业微信关联表)
- employee_purchase_activities(员工内购活动表)
- employee_purchase_activity_enterprises(活动参与企业表)
- employee_purchase_activity_goods(员工内购商品表)
- employee_purchase_activity_items(员工内购商品表)
- employee_purchase_cart(员工内购活动购物车)
- employee_purchase_employees(企业员工表)
- employee_purchase_enterprise_email_box(企业发件邮箱)
- employee_purchase_enterprises(企业表)
- employee_purchase_member_activity_aggregate(内购活动会员累计使用额度)
- employee_purchase_member_activity_items_aggregate(内购活动商品会员累计使用额度)
- employee_purchase_orders_rel_activity(内购订单关联活动企业表)
- employee_purchase_relatives(企业员工家属表)
- espier_address(地区表)
- espier_export_log(导出日志表)
- espier_printer(打印机表)
- espier_subdistrict(街道社区表)
- espier_uploadefile(上传文件日志ID)
- espier_uploadimages(图片上传表)
- espier_uploadimages_cat(图片分类表)
- goods_items_rel_cats(商品和分类关联表)
- hfpay_bank_card(汇付取现银行卡表)
- hfpay_cash_record(汇付取现记录表)
- hfpay_company_statistics_day(平台分账数据统计)
- hfpay_distributor_statistics_day(店铺分账数据统计)
- hfpay_distributor_transaction_statistics(店铺交易统计统计)
- hfpay_enterapply(入驻信息表)
- hfpay_ledger_config(分账配置表)
- hfpay_merchant_payment(汇付平台转账记录表)
- hfpay_trade_record(汇付记账表)
- icbc_pay_log(工商银行接口日志)
- item_keywords(商品热门关键词表)
- items(商品表)
- items_attribute_values(商品属性值表)
- items_attributes(商品属性表)
- items_barcode(商品条形码表)
- items_category(商品分类表)
- items_category_profit(商品分润配置表)
- items_commission(商品佣金配置表)
- items_medicine(商品药品数据表)
- items_profit(商品分润配置表)
- items_recommend(商品推荐表)
- items_rel_attributes(商品关联属性表)
- items_rel_point_access(商品和积分获取设置关联表)
- items_rel_tags(商品关联标签表)
- items_rel_type(商品数值属性关联表)
- items_tags(商品标签库表)
- kaquan_card_related(卡券库存统计表)
- kaquan_discount_cards(优惠券信息表)
- kaquan_rel_items(卡券关联商品表)
- kaquan_rel_member_tags(卡券关联用户标签表)
- kaquan_salesperson_give_coupons(导购员发放给用户优惠券记录)
- kaquan_user_discount(用户领取的优惠券表)
- kaquan_user_discount_logs(优惠券核销记录表)
- kaquan_vip_grade(付费会员等级库表)
- kaquan_vip_grade_order(付费会员等级卡)
- kaquan_vip_rel_user(付费会员的等级卡表)
- kaquan_wechat_card(关联微信卡券)
- logistics(物流公司表)
- lucky_draw_activity(抽奖表)
- map_config(地图配置表)
- map_config_service(地图配置表)
- medication_personnel(用药人信息)
- member_group(分组表)
- member_outfit()
- member_outfit_log()
- member_rel_group(会员分组表)
- member_remarks(会员备注表)
- membercard(会员卡)
- membercard_grade(会员卡等级表)
- members(会员主表,其他平台的会员本地化表)
- members_address(会员收货地址表)
- members_article_fav(会员心愿单收藏)
- members_associations(不同平台会员关联表,关联到members表)
- members_browse_history(会员浏览足迹)
- members_delete_record(会员删除记录)
- members_distribution_fav(会员店铺收藏)
- members_info(会员详情信息表)
- members_invoices(会员发票信息表)
- members_items_fav(会员收藏商品表)
- members_msmsend_log(群发短信log)
- members_offine_log(会员线下实体卡日志)
- members_operate_log(管理员修改员工操作日志表)
- members_protocol_log(会员隐私协议记录表)
- members_rel_shop(店铺管理会员表)
- members_rel_tags(会员关联标签表)
- members_subscribe_notice(订阅通知)
- members_tags(会员标签库表)
- members_tags_category(标签分类)
- members_wechat_fans(微信粉丝表)
- members_wechatusers(微信会员表)
- members_whitelist(会员白名单)
- merchant(商户表)
- merchant_settlement_apply(商户入驻申请表)
- merchant_type(商户类型表)
- offline_bank_account(线下转账收款账户)
- offline_payment(线下转账支付订单)
- onecode_batchs(物品批次表)
- onecode_things(物品表,一物一码的物)
- openapi_developer(openapi开发配置表)
- operator_bind_shop(员工关联门店表)
- operator_data_pass(数据敏感信息申请)
- operator_data_pass_log(数据敏感信息查看)
- operator_license(商户许可协议表)
- operators(账号表)
- order_epidemic_register(订单疫情登记表)
- order_profit_sharing(订单资金分账)
- order_profit_sharing_details(订单资金分账详情)
- orders_associations(订单主关联表)
- orders_bargain(砍价订单表)
- orders_cancel_orders(已付钱订单取消退款记录表)
- orders_cart(购物车)
- orders_delivery(订单发货单表)
- orders_delivery_items(订单发货单商品表)
- orders_diagnosis(问诊单)
- orders_invoice(订单发票表)
- orders_invoice_item(订单发票商品表)
- orders_invoice_log(订单发票日志表)
- orders_invoices(发票表)
- orders_items_rel_profit(订单商品分润表)
- orders_merchant_trade(企业付款账单)
- orders_normal_orders(实体订单表)
- orders_normal_orders_items(实体订单明细表)
- orders_operate_logs(订单操作日志表)
- orders_prescription(问诊单开方数据)
- orders_process_log(订单流程记录表)
- orders_rel_chinaumspay_division(订单关联银联商务分账表)
- orders_rel_dada(实体订单关联达达同城配表)
- orders_rel_jushuitan(订单关联聚水潭表)
- orders_rel_profit(订单分润表)
- orders_rel_promotions(商品促销和订单关联表)
- orders_rel_supplier(实体订单关联供应商)
- orders_rel_ziti(实体订单关联自提信息)
- orders_rights(权益表)
- orders_rights_detail(权益详细ID)
- orders_rights_log(权益日志表)
- orders_rights_operate_logs(权益操作日志表)
- orders_rights_transfer_logs(权益转赠表)
- orders_user_invoice(订单发票)
- pages_open_screen_ad(开屏广告设置)
- pages_template(页面模板表)
- pages_template_set(模板设置表)
- point_member(用户积分表)
- point_member_log(用户积分记录表)
- pointsmall_items(积分商品表)
- pointsmall_items_rel_attributes(积分商品关联属性表)
- pointsmall_items_rel_cats(积分商品和分类关联表)
- popularize_brokerage(分销佣金表)
- popularize_brokerage_statistics(分销佣金统计)
- popularize_cash_withdrawal(推广员提现表)
- popularize_promoter(推广员表)
- popularize_promoter_goods(推广员商品表)
- popularize_promoter_identity(推广员身份表)
- popularize_task_brokerage(任务制返佣)
- popularize_task_brokerage_count(任务制返佣)
- promotion_check_in(签到日志)
- promotion_groups_activity(拼团活动表)
- promotion_groups_team(开团表)
- promotion_groups_team_member(参团表)
- promotion_user_task(签到日志)
- promotions_active_articles(活动文章表)
- promotions_activity(自动化营销活动表)
- promotions_bargain(砍价活动表)
- promotions_bargain_log(砍价日志表)
- promotions_distributor(分销商营销)
- promotions_extrapoint_activity(积分营销活动表)
- promotions_items_tag(商品的促销标签表)
- promotions_limit(限购活动规则表)
- promotions_limit_category(限购活动分类表)
- promotions_limit_item(限购活动商品表)
- promotions_limit_person(限购活动用户表)
- promotions_marketing_activity(各种促销活动表)
- promotions_marketing_activity_category(各种促销活动分类表)
- promotions_marketing_activity_items(各种促销活动商品表)
- promotions_marketing_gift_items(活动赠品列表)
- promotions_member_price(商品会员价表)
- promotions_notice_template(小程序通知消息模版)
- promotions_package(组合促销促销规则表)
- promotions_package_item(组合促销商品表)
- promotions_package_main_item(组合促销主商品表)
- promotions_point_upvaluation(积分升值活动表)
- promotions_recommend_like_items(推荐喜欢商品(猜你喜欢))
- promotions_scd_rel_user(定向促销会员日志)
- promotions_seckill_activity(秒杀活动表)
- promotions_seckill_rel_goods(秒杀关联商品表)
- promotions_specific_crowd_discount(特定人群促销)
- promotions_turntable_log(用户大转盘中奖纪录表)
- promotions_user_bargains(用户砍价表)
- refund_error_logs(退款错误日志)
- register_promotions(注册营销表)
- reservation_default_work_shift(商户配置默认排班)
- reservation_level_rel_service(资源位服务项目关联表)
- reservation_record(预约记录表)
- reservation_resource_level(资源位表)
- reservation_setting(预约配置表)
- reservation_shift_type(班次类型表)
- reservation_work_shift(班次类型表)
- resources(资源包表)
- resources_op_log(资源操作记录表)
- salesperson_active_article_share_log(活动文章表)
- salesperson_active_article_statistics(导购员活动转发数据统计表)
- salesperson_coupon_statistics(导购员优惠券数据统计表)
- salesperson_items_shelves()
- salesperson_leaderboard(导购排名)
- salesperson_leaderboard_distributor(导购店铺排名)
- salesperson_notice(导购通知)
- salesperson_notice_log(导购通知)
- salesperson_operator_log(商家操作日志表)
- salesperson_profit_statistics(导购员销售提成数据统计表)
- salesperson_rel_coupon(导购员优惠券数据统计表)
- salesperson_rel_notice(导购通知关联表)
- salesperson_sales_statistics(导购员销售额数据统计表)
- salesperson_signup_log(导购到/签退记录)
- salesperson_task(导购任务表)
- salesperson_task_record(导购任务表)
- salesperson_task_record_logs(导购任务表)
- salesperson_task_rel_distributor(导购任务表)
- self_delivery_staff(自配送员工信息表)
- selfservice_form_setting(自助表单配置)
- selfservice_form_template(自助表单模板)
- selfservice_registration_activity(报名问卷活动)
- selfservice_registration_activity_rel_shop(报名活动关联店铺)
- selfservice_registration_record(报名记录)
- selfservice_user_daily_record(用户日常数据记录表)
- service_orders(服务订单表)
- servicelabels(数值属性表)
- shipping_templates(运费模板表)
- shop_comments(店铺评论表)
- shop_menu(商家和平台端菜单管理)
- shop_menu_rel_type(菜单类型关联)
- shop_notice(店铺公告表)
- shop_rel_salesperson(店铺管理员关联店铺表)
- shop_salesperson(门店人员)
- sms_idiograph(短信签名表)
- sms_template(短信模板表)
- sources(小程序来源列表)
- statement_details(结算单明细)
- statement_period_setting(结算周期设置)
- statements(结算单)
- sub_orders(服务类子订单表)
- super_admin_accounts(平台账号表)
- superadmin_wxapp_template(小程序模板表)
- supplier(供应商)
- supplier_items(商品表)
- supplier_items_attr(新供应商商品属性表)
- supplier_items_commission(商品佣金费率)
- supplier_order(供应商订单)
- systemlink_oms_queuelog(联通oms通信日志)
- template_orders(小程序开通表)
- theme_member_center_share(会员中心分享信息表)
- theme_pc_template(pc页面装修)
- theme_pc_template_content(pc页面装修组件内容)
- thirdparty_saaserp_log(联通saasErp通信日志)
- thirdparty_shop_bind(矩阵节点绑定)
- trade(交易单表)
- trade_rate(订单评价表)
- trade_rate_reply(订单评价回复/评论表)
- transcript_properties(成绩单考评项目表)
- transcripts(成绩单配置表)
- user_deposit(用户储值金额表)
- user_signin(用户签到表)
- user_signin_logs(用户签到奖励记录表)
- user_signin_rules(用户签到规则表)
- user_task_activity(签到日志)
- user_task_activity_rule(签到活动规则)
- user_task_finish_rule(活动规则完成任务)
- user_transcripts(用户成绩单记录表)
- wechat_authorization(微信授权表(公众号,小程序))
- wechat_tags(微信粉丝标签表)
- wechat_weapp(微信小程序提交审核表)
- wechat_weapp_customize_page(小程序自定义页面)
- wechat_weapp_setting(小程序模板装修表)
- wechat_weapp_template(小程序模板表)
- wechatfans_bind_wechattag(粉丝关联标微信签表)
- work_wechat_message(企业微信通知)
- work_wechat_message_manager_template(企业微信管理员通知模板)
- work_wechat_message_template(企业微信通知模板)
- work_wechat_rel(企业微信用户关联表)
- work_wechat_rel_logs(企业微信用户关联关系日志)
- work_wechat_verify_domain_file(企业微信可信域名校验文件)
- wsugc_badge(角标)
- wsugc_comment(笔记评论)
- wsugc_comment_like(评论点赞)
- wsugc_follower()
- wsugc_image_tag(图片tag关联表)
- wsugc_message(消息)
- wsugc_post(笔记)
- wsugc_post_badge(笔记角标)
- wsugc_post_favorite(笔记收藏)
- wsugc_post_goods(笔记)
- wsugc_post_image(笔记的图片)
- wsugc_post_like(笔记点赞)
- wsugc_post_reviewlog(笔记审核日志)
- wsugc_post_topic()
- wsugc_setting(ugc通用设置)
- wsugc_tag(图片tag)
- wsugc_topic(话题)
- wx_external_config(外部小程序配置表)
- wx_external_routes(外部小程序路径表)
- wxshops(微信门店表)
- 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 | |
| 企业邮箱 | 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 |
| 用户邮箱 | 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 |
| 邮箱地址 | 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 |
| 邮箱 | 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 |
| 常用邮箱 | 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 |
| 常用邮箱 | 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 | 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 |
| 联系邮箱 | 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 |
| 电子邮箱 | 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 |
| free_postage | 0 包邮 | 1 商品 | TINYINT(1) | No | 0 |
| 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 已取消 |
| 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 |
| 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 |
