shop-back-end/sql/20251029_wx_user.sql

19 lines
1.1 KiB
SQL
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

CREATE TABLE `wx_user` (
`wx_user_id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`openid` varchar(32) DEFAULT NULL COMMENT 'openid',
`ab98_user_id` bigint DEFAULT NULL COMMENT '汇邦云用户ID',
`qy_user_id` bigint DEFAULT NULL COMMENT '企业用户id',
`nick_name` varchar(50) NOT NULL COMMENT '昵称',
`tel` varchar(20) NULL COMMENT '手机号码',
`wx_balance` int NOT NULL DEFAULT '0' COMMENT '用户余额(单位:分)',
`creator_id` bigint NULL DEFAULT '0' COMMENT '创建者ID',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`updater_id` bigint NULL DEFAULT '0' COMMENT '更新者ID',
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
`deleted` tinyint(1) NOT NULL DEFAULT '0' COMMENT '删除标志0存在 1删除',
PRIMARY KEY (`wx_user_id`),
KEY `idx_openid` (`openid`),
KEY `idx_tel` (`tel`),
KEY `idx_nick_name` (`nick_name`)
) ENGINE=InnoDB AUTO_INCREMENT=75 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='微信用户信息表';