16 lines
		
	
	
		
			1000 B
		
	
	
	
		
			MySQL
		
	
	
	
		
		
			
		
	
	
			16 lines
		
	
	
		
			1000 B
		
	
	
	
		
			MySQL
		
	
	
	
|  | -- 一級分類
 | ||
|  | INSERT INTO `permission` (`parent`, `name`, `http_method`, `http_path`, `create_time`, `update_time`)
 | ||
|  | VALUES (0, 'user.info.management', '', '', UNIX_TIMESTAMP(), UNIX_TIMESTAMP()); -- 用戶資訊管理
 | ||
|  | 
 | ||
|  | # -- 二級分類 用戶資訊管理
 | ||
|  | SET @id := (SELECT id FROM `permission` where name = 'user.info.management');
 | ||
|  | INSERT INTO `permission` (`parent`, `name`, `http_method`, `http_path`, `create_time`, `update_time`)
 | ||
|  | VALUES (@id, 'user.basic.info', '', '', UNIX_TIMESTAMP(), UNIX_TIMESTAMP()); -- 用戶基礎資訊查詢
 | ||
|  | 
 | ||
|  | 
 | ||
|  | # -- 三級分類 用戶基礎資訊管理-基礎資訊查詢表
 | ||
|  | SET @id := (SELECT id FROM `permission` where name = 'user.basic.info');
 | ||
|  | INSERT INTO `permission` (`parent`, `name`, `http_method`, `http_path`, `create_time`, `update_time`)
 | ||
|  | VALUES (@id, 'user.info.select', 'GET', '/v1/user', UNIX_TIMESTAMP(), UNIX_TIMESTAMP()), -- 查詢
 | ||
|  |        (@id, 'user.info.select.plain_code', 'GET', '/v1/user', UNIX_TIMESTAMP(), UNIX_TIMESTAMP()); -- 明碼查詢
 |