Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
Litemall
Commits
b301b53a
Commit
b301b53a
authored
Jan 07, 2019
by
Junling Bu
Browse files
数据库更新,支持权限管理
parent
4c3c758b
Changes
2
Hide whitespace changes
Inline
Side-by-side
litemall-db/sql/litemall_data.sql
View file @
b301b53a
...
...
@@ -40,7 +40,7 @@ UNLOCK TABLES;
LOCK TABLES `litemall_admin` WRITE;
/*!40000 ALTER TABLE `litemall_admin` DISABLE KEYS */;
INSERT INTO `litemall_admin` VALUES (1,'admin123','$2a$10$.rEfyBb/GURD9P2p0fRg/OAJGloGNDkJS4lY0cQHeqDgsbdTylBpu',NULL,NULL,'https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif','2018-02-01 00:00:00','2018-02-01 00:00:00',0);
INSERT INTO `litemall_admin` VALUES (1,'admin123','$2a$10$.rEfyBb/GURD9P2p0fRg/OAJGloGNDkJS4lY0cQHeqDgsbdTylBpu',NULL,NULL,'https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif','2018-02-01 00:00:00','2018-02-01 00:00:00',0
,'[1]'),(4,'promotion123','$2a$10$wDZLOLLnzZ1EFZ3ldZ1XFOUWDEX6TnQCUFdJz4g.PoMaLTzS8TjWq','',NULL,'\'','2019-01-07 15:16:59','2019-01-07 15:17:34',0,'[3]'),(5,'mall123','$2a$10$aCtsc4rG6KmxQ59.IkYse.oRyKuwQoU2CPCmxSdB.d5nXq6aw/z4O','',NULL,'\'','2019-01-07 15:17:25','2019-01-07 15:21:05',0,'[2]'
);
/*!40000 ALTER TABLE `litemall_admin` ENABLE KEYS */;
UNLOCK TABLES;
...
...
@@ -227,6 +227,16 @@ LOCK TABLES `litemall_order_goods` WRITE;
/*!40000 ALTER TABLE `litemall_order_goods` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Dumping data for table `litemall_permission`
--
LOCK TABLES `litemall_permission` WRITE;
/*!40000 ALTER TABLE `litemall_permission` DISABLE KEYS */;
INSERT INTO `litemall_permission` VALUES (1,1,'*','2019-01-01 00:00:00','2019-01-01 00:00:00',0),(2,2,'admin:category:read','2019-01-07 15:18:53','2019-01-07 15:18:53',0),(3,2,'admin:category:update','2019-01-07 15:18:53','2019-01-07 15:18:53',0),(4,2,'admin:category:delete','2019-01-07 15:18:53','2019-01-07 15:18:53',0),(5,2,'admin:category:create','2019-01-07 15:18:53','2019-01-07 15:18:53',0),(6,2,'admin:category:list','2019-01-07 15:18:53','2019-01-07 15:18:53',0),(7,2,'admin:brand:create','2019-01-07 15:18:53','2019-01-07 15:18:53',0),(8,2,'admin:brand:list','2019-01-07 15:18:53','2019-01-07 15:18:53',0),(9,2,'admin:brand:delete','2019-01-07 15:18:53','2019-01-07 15:18:53',0),(10,2,'admin:brand:read','2019-01-07 15:18:53','2019-01-07 15:18:53',0),(11,2,'admin:brand:update','2019-01-07 15:18:53','2019-01-07 15:18:53',0),(12,3,'admin:ad:list','2019-01-07 15:18:57','2019-01-07 15:18:57',0),(13,3,'admin:ad:delete','2019-01-07 15:18:57','2019-01-07 15:18:57',0),(14,3,'admin:ad:create','2019-01-07 15:18:57','2019-01-07 15:18:57',0),(15,3,'admin:ad:update','2019-01-07 15:18:57','2019-01-07 15:18:57',0),(16,3,'admin:ad:read','2019-01-07 15:18:57','2019-01-07 15:18:57',0),(17,3,'admin:groupon:list','2019-01-07 15:18:57','2019-01-07 15:18:57',0),(18,3,'admin:groupon:update','2019-01-07 15:18:57','2019-01-07 15:18:57',0),(19,3,'admin:groupon:create','2019-01-07 15:18:57','2019-01-07 15:18:57',0),(20,3,'admin:groupon:read','2019-01-07 15:18:57','2019-01-07 15:18:57',0),(21,3,'admin:groupon:delete','2019-01-07 15:18:57','2019-01-07 15:18:57',0),(22,3,'admin:topic:create','2019-01-07 15:18:57','2019-01-07 15:18:57',0),(23,3,'admin:topic:read','2019-01-07 15:18:57','2019-01-07 15:18:57',0),(24,3,'admin:topic:list','2019-01-07 15:18:57','2019-01-07 15:18:57',0),(25,3,'admin:topic:delete','2019-01-07 15:18:57','2019-01-07 15:18:57',0),(26,3,'admin:topic:update','2019-01-07 15:18:57','2019-01-07 15:18:57',0),(27,3,'admin:coupon:list','2019-01-07 15:18:57','2019-01-07 15:18:57',0),(28,3,'admin:coupon:delete','2019-01-07 15:18:57','2019-01-07 15:18:57',0),(29,3,'admin:coupon:read','2019-01-07 15:18:57','2019-01-07 15:18:57',0),(30,3,'admin:coupon:create','2019-01-07 15:18:57','2019-01-07 15:18:57',0),(31,3,'admin:coupon:update','2019-01-07 15:18:57','2019-01-07 15:18:57',0);
/*!40000 ALTER TABLE `litemall_permission` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Dumping data for table `litemall_region`
--
...
...
@@ -237,6 +247,16 @@ INSERT INTO `litemall_region` VALUES (1,0,'北京市',1,11),(2,0,'天津市',1,1
/*!40000 ALTER TABLE `litemall_region` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Dumping data for table `litemall_role`
--
LOCK TABLES `litemall_role` WRITE;
/*!40000 ALTER TABLE `litemall_role` DISABLE KEYS */;
INSERT INTO `litemall_role` VALUES (1,'超级管理员','所有模块的权限',1,'2019-01-01 00:00:00','2019-01-01 00:00:00',0),(2,'商场管理员','只有商场模块的操作权限',1,'2019-01-01 00:00:00','2019-01-07 15:15:12',0),(3,'推广管理员','只有推广模块的操作权限',1,'2019-01-01 00:00:00','2019-01-07 15:15:24',0);
/*!40000 ALTER TABLE `litemall_role` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Dumping data for table `litemall_search_history`
--
litemall-db/sql/litemall_table.sql
View file @
b301b53a
...
...
@@ -82,6 +82,7 @@ CREATE TABLE `litemall_admin` (
`add_time`
datetime
DEFAULT
NULL
COMMENT
'创建时间'
,
`update_time`
datetime
DEFAULT
NULL
COMMENT
'更新时间'
,
`deleted`
tinyint
(
1
)
DEFAULT
'0'
COMMENT
'逻辑删除'
,
`role_ids`
varchar
(
127
)
DEFAULT
'[]'
COMMENT
'角色列表'
,
PRIMARY
KEY
(
`id`
)
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
4
DEFAULT
CHARSET
=
utf8mb4
COMMENT
=
'管理员表'
;
/*!40101 SET character_set_client = @saved_cs_client */
;
...
...
@@ -550,6 +551,24 @@ CREATE TABLE `litemall_order_goods` (
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8mb4
COMMENT
=
'订单商品表'
;
/*!40101 SET character_set_client = @saved_cs_client */
;
--
-- Table structure for table `litemall_permission`
--
DROP
TABLE
IF
EXISTS
`litemall_permission`
;
/*!40101 SET @saved_cs_client = @@character_set_client */
;
/*!40101 SET character_set_client = utf8 */
;
CREATE
TABLE
`litemall_permission`
(
`id`
int
(
11
)
NOT
NULL
AUTO_INCREMENT
,
`role_id`
int
(
11
)
DEFAULT
NULL
COMMENT
'角色ID'
,
`permission`
varchar
(
63
)
DEFAULT
NULL
COMMENT
'权限'
,
`add_time`
datetime
DEFAULT
NULL
COMMENT
'创建时间'
,
`update_time`
datetime
DEFAULT
NULL
COMMENT
'更新时间'
,
`deleted`
tinyint
(
1
)
DEFAULT
'0'
COMMENT
'逻辑删除'
,
PRIMARY
KEY
(
`id`
)
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
32
DEFAULT
CHARSET
=
utf8mb4
COMMENT
=
'权限表'
;
/*!40101 SET character_set_client = @saved_cs_client */
;
--
-- Table structure for table `litemall_region`
--
...
...
@@ -570,6 +589,26 @@ CREATE TABLE `litemall_region` (
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
3232
DEFAULT
CHARSET
=
utf8mb4
COMMENT
=
'行政区域表'
;
/*!40101 SET character_set_client = @saved_cs_client */
;
--
-- Table structure for table `litemall_role`
--
DROP
TABLE
IF
EXISTS
`litemall_role`
;
/*!40101 SET @saved_cs_client = @@character_set_client */
;
/*!40101 SET character_set_client = utf8 */
;
CREATE
TABLE
`litemall_role`
(
`id`
int
(
11
)
NOT
NULL
AUTO_INCREMENT
,
`name`
varchar
(
63
)
NOT
NULL
COMMENT
'角色名称'
,
`desc`
varchar
(
1023
)
DEFAULT
NULL
COMMENT
'角色描述'
,
`enabled`
tinyint
(
1
)
DEFAULT
'1'
COMMENT
'是否启用'
,
`add_time`
datetime
DEFAULT
NULL
COMMENT
'创建时间'
,
`update_time`
datetime
DEFAULT
NULL
COMMENT
'更新时间'
,
`deleted`
tinyint
(
1
)
DEFAULT
'0'
COMMENT
'逻辑删除'
,
PRIMARY
KEY
(
`id`
),
UNIQUE
KEY
`name_UNIQUE`
(
`name`
)
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
10
DEFAULT
CHARSET
=
utf8mb4
COMMENT
=
'角色表'
;
/*!40101 SET character_set_client = @saved_cs_client */
;
--
-- Table structure for table `litemall_search_history`
--
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment