/
db_user_authority.js
73 lines (73 loc) · 1.71 KB
/
db_user_authority.js
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
const Seq = require('sequelize')
const shortid = require('shortid')
const time = require('../time')
module.exports = {
NAME: 'user_authority' /* 表名 */,
TABLE: {
/* 表结构 */
id: {
// ID
type: Seq.BIGINT(20),
primaryKey: true, // 定义主键
autoIncrement: true, // 自动递增
comment: 'id',
field: 'id'
},
authority_id: {
// 权限ID
type: Seq.STRING(100),
comment: '权限ID',
defaultValue: shortid.generate,
field: 'authority_id'
},
authority_name: {
// 权限名字
type: Seq.CHAR(100),
comment: '权限名字',
field: 'authority_name'
},
authority_type: {
// 权限类型
type: Seq.CHAR(100),
comment: '权限类型',
field: 'authority_type'
},
authority_parent_id: {
// 权限父ID
type: Seq.STRING(20),
comment: '权限父ID',
field: 'authority_parent_id'
},
authority_parent_name: {
// 父权限名字
type: Seq.CHAR(100),
comment: '父权限名字',
field: 'authority_parent_name'
},
authority_url: {
// 权限树的连接路径
type: Seq.CHAR(100),
comment: '权限树的连接路径',
field: 'authority_url'
},
authority_sort: {
// 权限树的排序
type: Seq.INTEGER(20),
comment: '权限树的排序',
field: 'authority_sort'
},
authority_description: {
// 权限描述
type: Seq.STRING(100),
comment: '权限描述',
field: 'authority_description'
},
enable: {
// 是否可以显示
type: Seq.BOOLEAN,
comment: '是否可以显示',
field: 'enable'
},
...time.create_date
}
}