forked from lhtzbj12/sdrms
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sdrms.sql
123 lines (88 loc) · 6.01 KB
/
sdrms.sql
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
/*
SQLyog v10.2
MySQL - 5.6.14 : Database - sdrms
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
CREATE DATABASE /*!32312 IF NOT EXISTS*/`sdrms` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `sdrms`;
/*Table structure for table `rms_backend_user` */
DROP TABLE IF EXISTS `rms_backend_user`;
CREATE TABLE `rms_backend_user` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`real_name` varchar(255) NOT NULL DEFAULT '',
`user_name` varchar(255) NOT NULL DEFAULT '',
`user_pwd` varchar(255) NOT NULL DEFAULT '',
`is_super` tinyint(1) NOT NULL DEFAULT '0',
`status` int(11) NOT NULL DEFAULT '0',
`mobile` varchar(16) NOT NULL DEFAULT '',
`email` varchar(256) NOT NULL DEFAULT '',
`avatar` varchar(256) NOT NULL DEFAULT '',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;
/*Data for the table `rms_backend_user` */
insert into `rms_backend_user`(`id`,`real_name`,`user_name`,`user_pwd`,`is_super`,`status`,`mobile`,`email`,`avatar`) values (1,'lihaitao','admin','e10adc3949ba59abbe56e057f20f883e',0,1,'18612348765','[email protected]','/static/upload/1.jpg'),(3,'张三','zhangsan','e10adc3949ba59abbe56e057f20f883e',0,1,'','',''),(5,'李四','lisi','e10adc3949ba59abbe56e057f20f883e',0,0,'','','');
/*Table structure for table `rms_backend_user_rms_roles` */
DROP TABLE IF EXISTS `rms_backend_user_rms_roles`;
CREATE TABLE `rms_backend_user_rms_roles` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`rms_backend_user_id` int(11) NOT NULL,
`rms_role_id` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*Data for the table `rms_backend_user_rms_roles` */
/*Table structure for table `rms_resource` */
DROP TABLE IF EXISTS `rms_resource`;
CREATE TABLE `rms_resource` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`rtype` int(11) NOT NULL DEFAULT '0',
`name` varchar(64) NOT NULL DEFAULT '',
`parent_id` int(11) DEFAULT NULL,
`seq` int(11) NOT NULL DEFAULT '0',
`icon` varchar(32) NOT NULL DEFAULT '',
`url_for` varchar(256) NOT NULL DEFAULT '',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=36 DEFAULT CHARSET=utf8;
/*Data for the table `rms_resource` */
insert into `rms_resource`(`id`,`rtype`,`name`,`parent_id`,`seq`,`icon`,`url_for`) values (7,1,'权限管理',8,100,'fa fa-balance-scale',''),(8,0,'系统菜单',NULL,200,'',''),(9,1,'资源管理',7,100,'','ResourceController.Index'),(12,1,'角色管理',7,100,'','RoleController.Index'),(13,1,'用户管理',7,100,'','BackendUserController.Index'),(14,1,'系统管理',8,90,'fa fa-gears',''),(21,0,'业务菜单',NULL,170,'',''),(22,1,'课程资源(空)',21,100,'fa fa-book',''),(23,1,'日志管理(空)',14,100,'',''),(25,2,'编辑',9,100,'fa fa-pencil','ResourceController.Edit'),(26,2,'编辑',13,100,'fa fa-pencil','BackendUserController.Edit'),(27,2,'删除',9,100,'fa fa-trash','ResourceController.Delete'),(29,2,'删除',13,100,'fa fa-trash','BackendUserController.Delete'),(30,2,'编辑',12,100,'fa fa-pencil','RoleController.Edit'),(31,2,'删除',12,100,'fa fa-trash','RoleController.Delete'),(32,2,'分配资源',12,100,'fa fa-th','RoleController.Allocate'),(35,1,' 首页',NULL,100,'fa fa-dashboard','HomeController.Index');
/*Table structure for table `rms_role` */
DROP TABLE IF EXISTS `rms_role`;
CREATE TABLE `rms_role` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL DEFAULT '',
`seq` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=26 DEFAULT CHARSET=utf8;
/*Data for the table `rms_role` */
insert into `rms_role`(`id`,`name`,`seq`) values (22,'超级管理员',20),(24,'角色管理员',10),(25,'课程资源管理员',5);
/*Table structure for table `rms_role_backenduser_rel` */
DROP TABLE IF EXISTS `rms_role_backenduser_rel`;
CREATE TABLE `rms_role_backenduser_rel` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`role_id` int(11) NOT NULL,
`backend_user_id` int(11) NOT NULL,