-
Notifications
You must be signed in to change notification settings - Fork 0
/
RBAC.sql
55 lines (50 loc) · 1.6 KB
/
RBAC.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
CREATE TABLE IF NOT EXISTS `test`.`rbac_user_role` (
`id` INT(11) NOT NULL,
`user_id` INT(11) NOT NULL,
`role_id` INT(11) NOT NULL,
`create_date` VARCHAR(45) NOT NULL,
PRIMARY KEY (`id`))
ENGINE = InnoDB;
CREATE TABLE IF NOT EXISTS `test`.`rbac_user` (
`id` INT(11) NOT NULL,
`name` VARCHAR(45) NOT NULL,
`email` VARCHAR(45) NULL,
`is_admin` TINYINT(1) NOT NULL,
`status` TINYINT(1) NOT NULL,
`create_date` VARCHAR(45) NOT NULL,
`update_date` VARCHAR(45) NULL,
PRIMARY KEY (`id`))
ENGINE = InnoDB;
CREATE TABLE IF NOT EXISTS `test`.`rbac_role` (
`id` INT(11) NOT NULL,
`name` VARCHAR(45) NOT NULL,
`status` TINYINT(1) NOT NULL,
`create_date` VARCHAR(45) NOT NULL,
`update_date` VARCHAR(45) NULL,
PRIMARY KEY (`id`))
ENGINE = InnoDB;
CREATE TABLE IF NOT EXISTS `test`.`rbac_access` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`title` VARCHAR(45) NULL,
`urls` VARCHAR(100) NULL,
`status` TINYINT(1) NOT NULL,
`create_date` VARCHAR(45) NOT NULL,
`update_date` VARCHAR(45) NULL,
PRIMARY KEY (`id`))
ENGINE = InnoDB;
CREATE TABLE IF NOT EXISTS `test`.`rbac_role_access` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`role_id` INT(11) NOT NULL,
`access_id` INT(11) NOT NULL,
`create_date` VARCHAR(45) NOT NULL,
PRIMARY KEY (`id`))
ENGINE = InnoDB
CREATE TABLE `orm_country` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(100) NOT NULL,
`name_en` varchar(100) NOT NULL,
`abbreviation` varchar(4) NOT NULL,
`three_abbreviation` varchar(6) NOT NULL,
`create_date` varchar(45) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=250 DEFAULT CHARSET=utf8;