Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
S
shuidi-product-change
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Operations
    • Operations
    • Incidents
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • 互联网应用开发
  • shuidi-product-change
  • Issues
  • #326

Closed
Open
Created Aug 31, 2019 by 王常春@wangchangchunDeveloper

可信百科小程序迭代第二版数据库变更

#数据库 wiki

SQL

CREATE TABLE `tb_mp_user` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `openid` varchar(30) NOT NULL DEFAULT '' COMMENT '微信openid',
  `nick_name` varchar(100) CHARACTER SET utf8mb4 NOT NULL DEFAULT '' COMMENT '微信昵称',
  `avatar` varchar(255) NOT NULL DEFAULT '' COMMENT '头像',
  `mobile` varchar(11) NOT NULL DEFAULT '' COMMENT '用户手机号',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE KEY `uk_openid` (`openid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='企业可信百科小程序用户表';

CREATE TABLE `tb_personal_card_mp_tpl` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `pc_id` int(10) unsigned NOT NULL COMMENT '卡片id',
  `tpl_id` tinyint(3) unsigned NOT NULL DEFAULT '1' COMMENT '模板id',
  `color` varchar(7) NOT NULL DEFAULT '1' COMMENT '颜色',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE KEY `uk_pc_id` (`pc_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 comment="个人名片小程序模板表";

CREATE TABLE `tb_personal_card_wp_bind` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `wp_user_id` int(10) unsigned NOT NULL COMMENT '小程序用户id',
  `openid` varchar(30) NOT NULL DEFAULT '' COMMENT '小程序用户openid',
  `pc_id` int(10) unsigned NOT NULL COMMENT '个人名片id',
  `mobile` varchar(11) NOT NULL DEFAULT '' COMMENT '手机号',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `idx_openid` (`openid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT="个人名片绑定信息表";
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking