1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
| DROP TABLE IF EXISTS `role`; CREATE TABLE `role` ( `id` int(11) NOT NULL AUTO_INCREMENT, `role_name` VARCHAR(50) DEFAULT NULL COMMENT '角色名', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='角色表';
insert into `role` VALUES(1, '管理员'); insert into `role` VALUES(2, '总经理'); insert into `role` VALUES(3, '科长'); insert into `role` VALUES(4, '组长');
DROP TABLE IF EXISTS `user`; CREATE TABLE `user` ( `id` int(11) NOT NULL AUTO_INCREMENT, `role_id` int(11) NOT NULL COMMENT '角色id', `user_name` VARCHAR(50) DEFAULT NULL COMMENT '用户名', `sex` int(1) DEFAULT 0 COMMENT '性别', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='用户表';
insert into `user` VALUES(1, 1, 'admin', 1); insert into `user` VALUES(2, 2, '王经理', 1); insert into `user` VALUES(3, 2, '李经理', 2); insert into `user` VALUES(4, 2, '张经理', 2); insert into `user` VALUES(5, 3, '王科长', 1); insert into `user` VALUES(6, 3, '李科长', 1); insert into `user` VALUES(7, 3, '吕科长', 2); insert into `user` VALUES(8, 3, '邢科长', 1); insert into `user` VALUES(9, 4, '范组长', 2); insert into `user` VALUES(10, 4, '赵组长', 2); insert into `user` VALUES(11, 4, '姬组长', 1);
|