CREATE TABLE `test_user` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`name` char(25) DEFAULT '' COMMENT '用戶名',
`pw` char(32) DEFAULT '' COMMENT '密碼',
`phone_num` int(11) unsigned DEFAULT NULL COMMENT '手機號',
`sex` tinyint(2) unsigned DEFAULT '1' COMMENT '性別 1男 2女',
`type` tinyint(2) unsigned DEFAULT '1' COMMENT '會員級別 1 普通 2 青銅 3 白銀 4 黃金',
`create_time` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '創建時間',
`update_time` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '創建時間',
PRIMARY KEY (`id`),
UNIQUE KEY `phone_num` (`phone_num`),
KEY `phone_pw` (`phone_num`,`pw`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8 COMMENT='用戶表';