建表字段

CREATE TABLE `enterprise_members` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
`member_card` varchar(30) NOT NULL COMMENT '卡号',
`mobile` varchar(20) DEFAULT NULL COMMENT '手机号',
`username` varchar(100) DEFAULT NULL COMMENT '会员名',
`sex` tinyint(1) unsigned DEFAULT NULL COMMENT '会员性别 1:男 /2:女',
`ctime` int(11) unsigned DEFAULT NULL COMMENT '卡创建时间',
`utime` int(11) unsigned DEFAULT NULL COMMENT '卡更新时间',
`btime` int(11) unsigned DEFAULT NULL COMMENT '打通时间',
`openid` varchar(255) DEFAULT NULL COMMENT '微信openid',
`user_json` varchar(1024) DEFAULT NULL COMMENT '会员json数据',
`befrom` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '生成方式,1:xls表 2:添加',
`bonus` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '会员积分',
`type` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '会员卡类型 0:新卡号 1存量卡号',
`status` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '状态 0:未绑定 1绑定',
`wx_mid` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '微信会员关联字段',
`ent_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '商家信息关联字段',
PRIMARY KEY (`id`),
UNIQUE KEY `member_card` (`member_card`(11)) USING BTREE COMMENT '会员卡卡号',
KEY `ent_id` (`ent_id`) COMMENT '商户信息关联字段',
KEY `wx_mid` (`wx_mid`) USING BTREE COMMENT '微信会员信息关联字段',
KEY `user_type` (`type`) USING BTREE COMMENT '用户类型',
KEY `status` (`status`) USING BTREE COMMENT '会员卡状态'
) ENGINE=InnoDB DEFAULT CHARSET=utf8

posted @ 2018-03-26 10:43  岁月静好13543  阅读(245)  评论(0编辑  收藏  举报
AmazingCounters.com