oak-domain 4.2.2 → 4.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/base-app-domain/ActionDefDict.d.ts +8 -8
- package/lib/base-app-domain/Oper/Schema.d.ts +158 -158
- package/lib/base-app-domain/Oper/Storage.js +56 -56
- package/lib/base-app-domain/User/Action.d.ts +11 -11
- package/lib/base-app-domain/User/Action.js +12 -12
- package/lib/base-app-domain/UserEntityGrant/Action.d.ts +5 -5
- package/lib/base-app-domain/UserEntityGrant/Action.js +5 -5
- package/lib/compiler/schemalBuilder.js +4167 -4167
- package/lib/entities/Oper.d.ts +12 -12
- package/lib/entities/Oper.js +36 -36
- package/lib/entities/User.d.ts +18 -18
- package/lib/entities/User.js +32 -32
- package/lib/index.d.ts +1 -1
- package/lib/index.js +3 -3
- package/lib/store/AsyncRowStore.d.ts +66 -66
- package/lib/store/CascadeStore.d.ts +109 -109
- package/lib/store/CascadeStore.js +1728 -1726
- package/lib/store/RelationAuth.js +1209 -1209
- package/lib/store/TriggerExecutor.js +468 -468
- package/lib/store/actionDef.js +278 -278
- package/lib/store/checker.js +487 -487
- package/lib/store/relation.d.ts +12 -12
- package/lib/store/relation.js +74 -74
- package/lib/triggers/index.d.ts +5 -5
- package/lib/triggers/index.js +28 -28
- package/lib/types/Configuration.d.ts +42 -42
- package/lib/types/Configuration.js +3 -3
- package/lib/types/Connector.d.ts +39 -38
- package/lib/types/Entity.d.ts +209 -209
- package/lib/types/Sync.d.ts +74 -69
- package/lib/types/Sync.js +9 -9
- package/lib/types/index.d.ts +27 -27
- package/lib/types/index.js +30 -30
- package/lib/utils/SimpleConnector.d.ts +81 -64
- package/lib/utils/SimpleConnector.js +217 -206
- package/lib/utils/assert.d.ts +5 -5
- package/lib/utils/projection.d.ts +4 -4
- package/lib/utils/relationPath.d.ts +31 -31
- package/lib/utils/relationPath.js +202 -202
- package/package.json +51 -51
- package/src/entities/ActionAuth.ts +41 -41
- package/src/entities/I18n.ts +45 -45
- package/src/entities/Modi.ts +69 -69
- package/src/entities/ModiEntity.ts +26 -26
- package/src/entities/Oper.ts +48 -48
- package/src/entities/OperEntity.ts +27 -27
- package/src/entities/Path.ts +43 -43
- package/src/entities/Relation.ts +43 -43
- package/src/entities/RelationAuth.ts +44 -44
- package/src/entities/User.ts +48 -48
- package/src/entities/UserEntityClaim.ts +29 -29
- package/src/entities/UserEntityGrant.ts +24 -24
- package/src/entities/UserRelation.ts +50 -50
package/src/entities/I18n.ts
CHANGED
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
import { String } from '../types/DataType';
|
|
2
|
-
import { EntityShape } from '../types/Entity';
|
|
3
|
-
import { EntityDesc } from '../types/EntityDesc';
|
|
4
|
-
|
|
5
|
-
export interface Schema extends EntityShape {
|
|
6
|
-
module: String<64>;
|
|
7
|
-
position: String<188>;
|
|
8
|
-
namespace: String<256>;
|
|
9
|
-
language: String<32>;
|
|
10
|
-
data: Object;
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
const entityDesc: EntityDesc<Schema> = {
|
|
14
|
-
locales: {
|
|
15
|
-
zh_CN: {
|
|
16
|
-
name: '用户授权',
|
|
17
|
-
attr: {
|
|
18
|
-
module: '模块',
|
|
19
|
-
position: '文件位置',
|
|
20
|
-
namespace: '命名空间',
|
|
21
|
-
language: '语言',
|
|
22
|
-
data: '数据'
|
|
23
|
-
},
|
|
24
|
-
},
|
|
25
|
-
},
|
|
26
|
-
indexes: [
|
|
27
|
-
{
|
|
28
|
-
name: 'namespace_language',
|
|
29
|
-
attributes: [
|
|
30
|
-
{
|
|
31
|
-
name: 'namespace',
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
name: 'language',
|
|
35
|
-
}
|
|
36
|
-
],
|
|
37
|
-
config: {
|
|
38
|
-
unique: true,
|
|
39
|
-
},
|
|
40
|
-
}
|
|
41
|
-
],
|
|
42
|
-
configuration: {
|
|
43
|
-
static: true,
|
|
44
|
-
},
|
|
45
|
-
};
|
|
1
|
+
import { String } from '../types/DataType';
|
|
2
|
+
import { EntityShape } from '../types/Entity';
|
|
3
|
+
import { EntityDesc } from '../types/EntityDesc';
|
|
4
|
+
|
|
5
|
+
export interface Schema extends EntityShape {
|
|
6
|
+
module: String<64>;
|
|
7
|
+
position: String<188>;
|
|
8
|
+
namespace: String<256>;
|
|
9
|
+
language: String<32>;
|
|
10
|
+
data: Object;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
const entityDesc: EntityDesc<Schema> = {
|
|
14
|
+
locales: {
|
|
15
|
+
zh_CN: {
|
|
16
|
+
name: '用户授权',
|
|
17
|
+
attr: {
|
|
18
|
+
module: '模块',
|
|
19
|
+
position: '文件位置',
|
|
20
|
+
namespace: '命名空间',
|
|
21
|
+
language: '语言',
|
|
22
|
+
data: '数据'
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
indexes: [
|
|
27
|
+
{
|
|
28
|
+
name: 'namespace_language',
|
|
29
|
+
attributes: [
|
|
30
|
+
{
|
|
31
|
+
name: 'namespace',
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
name: 'language',
|
|
35
|
+
}
|
|
36
|
+
],
|
|
37
|
+
config: {
|
|
38
|
+
unique: true,
|
|
39
|
+
},
|
|
40
|
+
}
|
|
41
|
+
],
|
|
42
|
+
configuration: {
|
|
43
|
+
static: true,
|
|
44
|
+
},
|
|
45
|
+
};
|
package/src/entities/Modi.ts
CHANGED
|
@@ -1,69 +1,69 @@
|
|
|
1
|
-
import { ActionDef } from '../types/Action';
|
|
2
|
-
import { String } from '../types/DataType';
|
|
3
|
-
import { EntityShape } from '../types/Entity';
|
|
4
|
-
import { EntityDesc } from '../types/EntityDesc';
|
|
5
|
-
|
|
6
|
-
export interface Schema extends EntityShape {
|
|
7
|
-
targetEntity: String<32>; // 要操作的目标对象
|
|
8
|
-
entity: String<32>; // 关联的目标对象
|
|
9
|
-
entityId: String<64>; // 关联的目标对象id
|
|
10
|
-
action: String<16>;
|
|
11
|
-
data: Object;
|
|
12
|
-
filter?: Object;
|
|
13
|
-
extra?: Object;
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
type IState = 'active' | 'applied' | 'abandoned';
|
|
17
|
-
type IAction = 'apply' | 'abandon';
|
|
18
|
-
|
|
19
|
-
const IActionDef: ActionDef<IAction, IState> = {
|
|
20
|
-
stm: {
|
|
21
|
-
apply: ['active', 'applied'],
|
|
22
|
-
abandon: ['active', 'abandoned'],
|
|
23
|
-
},
|
|
24
|
-
is: 'active',
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
type Action = IAction;
|
|
28
|
-
|
|
29
|
-
const entityDesc: EntityDesc<Schema, Action, '', {
|
|
30
|
-
iState: IState,
|
|
31
|
-
}> = {
|
|
32
|
-
locales: {
|
|
33
|
-
zh_CN: {
|
|
34
|
-
name: '更新',
|
|
35
|
-
attr: {
|
|
36
|
-
targetEntity: '目标对象',
|
|
37
|
-
entity: '关联对象',
|
|
38
|
-
entityId: '关联对象Id',
|
|
39
|
-
action: '动作',
|
|
40
|
-
data: '数据',
|
|
41
|
-
filter: '条件',
|
|
42
|
-
extra: '其它',
|
|
43
|
-
iState: '状态',
|
|
44
|
-
},
|
|
45
|
-
action: {
|
|
46
|
-
abandon: '放弃',
|
|
47
|
-
apply: '应用',
|
|
48
|
-
},
|
|
49
|
-
v: {
|
|
50
|
-
iState: {
|
|
51
|
-
active: '活跃的',
|
|
52
|
-
abandoned: '放弃的',
|
|
53
|
-
applied: '应用的',
|
|
54
|
-
},
|
|
55
|
-
},
|
|
56
|
-
},
|
|
57
|
-
},
|
|
58
|
-
indexes: [
|
|
59
|
-
{
|
|
60
|
-
name: 'index_state',
|
|
61
|
-
attributes: [
|
|
62
|
-
{
|
|
63
|
-
name: 'iState',
|
|
64
|
-
direction: 'ASC',
|
|
65
|
-
}
|
|
66
|
-
],
|
|
67
|
-
},
|
|
68
|
-
],
|
|
69
|
-
};
|
|
1
|
+
import { ActionDef } from '../types/Action';
|
|
2
|
+
import { String } from '../types/DataType';
|
|
3
|
+
import { EntityShape } from '../types/Entity';
|
|
4
|
+
import { EntityDesc } from '../types/EntityDesc';
|
|
5
|
+
|
|
6
|
+
export interface Schema extends EntityShape {
|
|
7
|
+
targetEntity: String<32>; // 要操作的目标对象
|
|
8
|
+
entity: String<32>; // 关联的目标对象
|
|
9
|
+
entityId: String<64>; // 关联的目标对象id
|
|
10
|
+
action: String<16>;
|
|
11
|
+
data: Object;
|
|
12
|
+
filter?: Object;
|
|
13
|
+
extra?: Object;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
type IState = 'active' | 'applied' | 'abandoned';
|
|
17
|
+
type IAction = 'apply' | 'abandon';
|
|
18
|
+
|
|
19
|
+
const IActionDef: ActionDef<IAction, IState> = {
|
|
20
|
+
stm: {
|
|
21
|
+
apply: ['active', 'applied'],
|
|
22
|
+
abandon: ['active', 'abandoned'],
|
|
23
|
+
},
|
|
24
|
+
is: 'active',
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
type Action = IAction;
|
|
28
|
+
|
|
29
|
+
const entityDesc: EntityDesc<Schema, Action, '', {
|
|
30
|
+
iState: IState,
|
|
31
|
+
}> = {
|
|
32
|
+
locales: {
|
|
33
|
+
zh_CN: {
|
|
34
|
+
name: '更新',
|
|
35
|
+
attr: {
|
|
36
|
+
targetEntity: '目标对象',
|
|
37
|
+
entity: '关联对象',
|
|
38
|
+
entityId: '关联对象Id',
|
|
39
|
+
action: '动作',
|
|
40
|
+
data: '数据',
|
|
41
|
+
filter: '条件',
|
|
42
|
+
extra: '其它',
|
|
43
|
+
iState: '状态',
|
|
44
|
+
},
|
|
45
|
+
action: {
|
|
46
|
+
abandon: '放弃',
|
|
47
|
+
apply: '应用',
|
|
48
|
+
},
|
|
49
|
+
v: {
|
|
50
|
+
iState: {
|
|
51
|
+
active: '活跃的',
|
|
52
|
+
abandoned: '放弃的',
|
|
53
|
+
applied: '应用的',
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
indexes: [
|
|
59
|
+
{
|
|
60
|
+
name: 'index_state',
|
|
61
|
+
attributes: [
|
|
62
|
+
{
|
|
63
|
+
name: 'iState',
|
|
64
|
+
direction: 'ASC',
|
|
65
|
+
}
|
|
66
|
+
],
|
|
67
|
+
},
|
|
68
|
+
],
|
|
69
|
+
};
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { String } from '../types/DataType';
|
|
2
|
-
import { EntityShape } from '../types/Entity';
|
|
3
|
-
import { Schema as Modi } from './Modi';
|
|
4
|
-
import { EntityDesc } from '../types/EntityDesc';
|
|
5
|
-
|
|
6
|
-
export interface Schema extends EntityShape {
|
|
7
|
-
modi: Modi,
|
|
8
|
-
entity: String<32>;
|
|
9
|
-
entityId: String<64>;
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
const entityDesc: EntityDesc<Schema> = {
|
|
13
|
-
locales: {
|
|
14
|
-
zh_CN: {
|
|
15
|
-
name: '更新对象连接',
|
|
16
|
-
attr: {
|
|
17
|
-
modi: '更新',
|
|
18
|
-
entity: '关联对象',
|
|
19
|
-
entityId: '关联对象id',
|
|
20
|
-
},
|
|
21
|
-
},
|
|
22
|
-
},
|
|
23
|
-
configuration: {
|
|
24
|
-
actionType: 'appendOnly',
|
|
25
|
-
}
|
|
26
|
-
};
|
|
1
|
+
import { String } from '../types/DataType';
|
|
2
|
+
import { EntityShape } from '../types/Entity';
|
|
3
|
+
import { Schema as Modi } from './Modi';
|
|
4
|
+
import { EntityDesc } from '../types/EntityDesc';
|
|
5
|
+
|
|
6
|
+
export interface Schema extends EntityShape {
|
|
7
|
+
modi: Modi,
|
|
8
|
+
entity: String<32>;
|
|
9
|
+
entityId: String<64>;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
const entityDesc: EntityDesc<Schema> = {
|
|
13
|
+
locales: {
|
|
14
|
+
zh_CN: {
|
|
15
|
+
name: '更新对象连接',
|
|
16
|
+
attr: {
|
|
17
|
+
modi: '更新',
|
|
18
|
+
entity: '关联对象',
|
|
19
|
+
entityId: '关联对象id',
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
configuration: {
|
|
24
|
+
actionType: 'appendOnly',
|
|
25
|
+
}
|
|
26
|
+
};
|
package/src/entities/Oper.ts
CHANGED
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
import { String, Int, Datetime, Image, Boolean, Text } from '../types/DataType';
|
|
2
|
-
import { EntityShape } from '../types/Entity';
|
|
3
|
-
import { Schema as User } from './User';
|
|
4
|
-
import { EntityDesc } from '../types/EntityDesc';
|
|
5
|
-
|
|
6
|
-
export interface Schema extends EntityShape {
|
|
7
|
-
action: String<16>;
|
|
8
|
-
data: Object;
|
|
9
|
-
filter?: Object;
|
|
10
|
-
extra?: Object;
|
|
11
|
-
operator?: User;
|
|
12
|
-
targetEntity: String<32>;
|
|
13
|
-
bornAt: Datetime;
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
const entityDesc: EntityDesc<Schema> = {
|
|
17
|
-
locales: {
|
|
18
|
-
zh_CN: {
|
|
19
|
-
name: '操作',
|
|
20
|
-
attr: {
|
|
21
|
-
action: '动作',
|
|
22
|
-
data: '数据',
|
|
23
|
-
filter: '选择条件',
|
|
24
|
-
extra: '其它',
|
|
25
|
-
operator: '操作者',
|
|
26
|
-
targetEntity: '关联对象',
|
|
27
|
-
bornAt: '诞生时间'
|
|
28
|
-
},
|
|
29
|
-
},
|
|
30
|
-
},
|
|
31
|
-
configuration: {
|
|
32
|
-
actionType: 'appendOnly',
|
|
33
|
-
},
|
|
34
|
-
indexes: [
|
|
35
|
-
{
|
|
36
|
-
name: 'index_bornAt_operatorId',
|
|
37
|
-
attributes: [
|
|
38
|
-
{
|
|
39
|
-
name: 'bornAt',
|
|
40
|
-
direction: 'DESC',
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
name: 'operator',
|
|
44
|
-
},
|
|
45
|
-
]
|
|
46
|
-
}
|
|
47
|
-
]
|
|
48
|
-
};
|
|
1
|
+
import { String, Int, Datetime, Image, Boolean, Text } from '../types/DataType';
|
|
2
|
+
import { EntityShape } from '../types/Entity';
|
|
3
|
+
import { Schema as User } from './User';
|
|
4
|
+
import { EntityDesc } from '../types/EntityDesc';
|
|
5
|
+
|
|
6
|
+
export interface Schema extends EntityShape {
|
|
7
|
+
action: String<16>;
|
|
8
|
+
data: Object;
|
|
9
|
+
filter?: Object;
|
|
10
|
+
extra?: Object;
|
|
11
|
+
operator?: User;
|
|
12
|
+
targetEntity: String<32>;
|
|
13
|
+
bornAt: Datetime;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
const entityDesc: EntityDesc<Schema> = {
|
|
17
|
+
locales: {
|
|
18
|
+
zh_CN: {
|
|
19
|
+
name: '操作',
|
|
20
|
+
attr: {
|
|
21
|
+
action: '动作',
|
|
22
|
+
data: '数据',
|
|
23
|
+
filter: '选择条件',
|
|
24
|
+
extra: '其它',
|
|
25
|
+
operator: '操作者',
|
|
26
|
+
targetEntity: '关联对象',
|
|
27
|
+
bornAt: '诞生时间'
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
configuration: {
|
|
32
|
+
actionType: 'appendOnly',
|
|
33
|
+
},
|
|
34
|
+
indexes: [
|
|
35
|
+
{
|
|
36
|
+
name: 'index_bornAt_operatorId',
|
|
37
|
+
attributes: [
|
|
38
|
+
{
|
|
39
|
+
name: 'bornAt',
|
|
40
|
+
direction: 'DESC',
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
name: 'operator',
|
|
44
|
+
},
|
|
45
|
+
]
|
|
46
|
+
}
|
|
47
|
+
]
|
|
48
|
+
};
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import { String } from '../types/DataType';
|
|
2
|
-
import { EntityShape, Configuration } from '../types/Entity';
|
|
3
|
-
import { LocaleDef } from '../types/Locale';
|
|
4
|
-
import { Schema as Oper } from './Oper';
|
|
5
|
-
import { EntityDesc } from '../types/EntityDesc';
|
|
6
|
-
|
|
7
|
-
export interface Schema extends EntityShape {
|
|
8
|
-
oper: Oper,
|
|
9
|
-
entity: String<32>;
|
|
10
|
-
entityId: String<64>;
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
const entityDesc: EntityDesc<Schema> = {
|
|
14
|
-
locales: {
|
|
15
|
-
zh_CN: {
|
|
16
|
-
name: '操作对象连接',
|
|
17
|
-
attr: {
|
|
18
|
-
oper: '操作',
|
|
19
|
-
entity: '关联对象',
|
|
20
|
-
entityId: '关联对象id',
|
|
21
|
-
},
|
|
22
|
-
},
|
|
23
|
-
},
|
|
24
|
-
configuration: {
|
|
25
|
-
actionType: 'appendOnly',
|
|
26
|
-
}
|
|
27
|
-
};
|
|
1
|
+
import { String } from '../types/DataType';
|
|
2
|
+
import { EntityShape, Configuration } from '../types/Entity';
|
|
3
|
+
import { LocaleDef } from '../types/Locale';
|
|
4
|
+
import { Schema as Oper } from './Oper';
|
|
5
|
+
import { EntityDesc } from '../types/EntityDesc';
|
|
6
|
+
|
|
7
|
+
export interface Schema extends EntityShape {
|
|
8
|
+
oper: Oper,
|
|
9
|
+
entity: String<32>;
|
|
10
|
+
entityId: String<64>;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
const entityDesc: EntityDesc<Schema> = {
|
|
14
|
+
locales: {
|
|
15
|
+
zh_CN: {
|
|
16
|
+
name: '操作对象连接',
|
|
17
|
+
attr: {
|
|
18
|
+
oper: '操作',
|
|
19
|
+
entity: '关联对象',
|
|
20
|
+
entityId: '关联对象id',
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
configuration: {
|
|
25
|
+
actionType: 'appendOnly',
|
|
26
|
+
}
|
|
27
|
+
};
|
package/src/entities/Path.ts
CHANGED
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
import { String, Boolean, Text } from '../types/DataType';
|
|
2
|
-
import { EntityShape } from '../types/Entity';
|
|
3
|
-
import { EntityDesc } from '../types/EntityDesc';
|
|
4
|
-
|
|
5
|
-
export interface Schema extends EntityShape {
|
|
6
|
-
destEntity: String<32>;
|
|
7
|
-
value: String<256>;
|
|
8
|
-
recursive: Boolean;
|
|
9
|
-
sourceEntity: String<32>;
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
const entityDesc: EntityDesc<Schema> = {
|
|
13
|
-
indexes: [
|
|
14
|
-
{
|
|
15
|
-
name: 'index_source_dest_path',
|
|
16
|
-
attributes: [
|
|
17
|
-
{
|
|
18
|
-
name: 'sourceEntity',
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
name: 'value',
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
name: 'destEntity',
|
|
25
|
-
},
|
|
26
|
-
],
|
|
27
|
-
config: {
|
|
28
|
-
unique: true,
|
|
29
|
-
},
|
|
30
|
-
},
|
|
31
|
-
],
|
|
32
|
-
locales: {
|
|
33
|
-
zh_CN: {
|
|
34
|
-
name: '关系路径',
|
|
35
|
-
attr: {
|
|
36
|
-
sourceEntity: '源对象',
|
|
37
|
-
value: '路径(从dest到source)',
|
|
38
|
-
destEntity: '目标对象',
|
|
39
|
-
recursive: '是否递归(目标对象)',
|
|
40
|
-
},
|
|
41
|
-
},
|
|
42
|
-
}
|
|
43
|
-
};
|
|
1
|
+
import { String, Boolean, Text } from '../types/DataType';
|
|
2
|
+
import { EntityShape } from '../types/Entity';
|
|
3
|
+
import { EntityDesc } from '../types/EntityDesc';
|
|
4
|
+
|
|
5
|
+
export interface Schema extends EntityShape {
|
|
6
|
+
destEntity: String<32>;
|
|
7
|
+
value: String<256>;
|
|
8
|
+
recursive: Boolean;
|
|
9
|
+
sourceEntity: String<32>;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
const entityDesc: EntityDesc<Schema> = {
|
|
13
|
+
indexes: [
|
|
14
|
+
{
|
|
15
|
+
name: 'index_source_dest_path',
|
|
16
|
+
attributes: [
|
|
17
|
+
{
|
|
18
|
+
name: 'sourceEntity',
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
name: 'value',
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
name: 'destEntity',
|
|
25
|
+
},
|
|
26
|
+
],
|
|
27
|
+
config: {
|
|
28
|
+
unique: true,
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
],
|
|
32
|
+
locales: {
|
|
33
|
+
zh_CN: {
|
|
34
|
+
name: '关系路径',
|
|
35
|
+
attr: {
|
|
36
|
+
sourceEntity: '源对象',
|
|
37
|
+
value: '路径(从dest到source)',
|
|
38
|
+
destEntity: '目标对象',
|
|
39
|
+
recursive: '是否递归(目标对象)',
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
}
|
|
43
|
+
};
|
package/src/entities/Relation.ts
CHANGED
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
import { String } from '../types/DataType';
|
|
2
|
-
import { EntityShape } from '../types/Entity';
|
|
3
|
-
import { EntityDesc } from '../types/EntityDesc';
|
|
4
|
-
|
|
5
|
-
export interface Schema extends EntityShape {
|
|
6
|
-
entity: String<32>;
|
|
7
|
-
entityId?: String<64>; // 可以为空
|
|
8
|
-
name?: String<32>;
|
|
9
|
-
display?: String<32>;
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
const entityDesc: EntityDesc<Schema> = {
|
|
13
|
-
locales: {
|
|
14
|
-
zh_CN: {
|
|
15
|
-
name: '用户授权',
|
|
16
|
-
attr: {
|
|
17
|
-
name: '关系',
|
|
18
|
-
entity: '目标对象',
|
|
19
|
-
entityId: '目标对象id',
|
|
20
|
-
display: '显示值',
|
|
21
|
-
},
|
|
22
|
-
},
|
|
23
|
-
},
|
|
24
|
-
indexes: [
|
|
25
|
-
{
|
|
26
|
-
name: 'index_targetEntity_entityId_name',
|
|
27
|
-
attributes: [
|
|
28
|
-
{
|
|
29
|
-
name: 'entity',
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
name: 'entityId',
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
name: 'name',
|
|
36
|
-
}
|
|
37
|
-
],
|
|
38
|
-
config: {
|
|
39
|
-
unique: true,
|
|
40
|
-
},
|
|
41
|
-
},
|
|
42
|
-
]
|
|
43
|
-
};
|
|
1
|
+
import { String } from '../types/DataType';
|
|
2
|
+
import { EntityShape } from '../types/Entity';
|
|
3
|
+
import { EntityDesc } from '../types/EntityDesc';
|
|
4
|
+
|
|
5
|
+
export interface Schema extends EntityShape {
|
|
6
|
+
entity: String<32>;
|
|
7
|
+
entityId?: String<64>; // 可以为空
|
|
8
|
+
name?: String<32>;
|
|
9
|
+
display?: String<32>;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
const entityDesc: EntityDesc<Schema> = {
|
|
13
|
+
locales: {
|
|
14
|
+
zh_CN: {
|
|
15
|
+
name: '用户授权',
|
|
16
|
+
attr: {
|
|
17
|
+
name: '关系',
|
|
18
|
+
entity: '目标对象',
|
|
19
|
+
entityId: '目标对象id',
|
|
20
|
+
display: '显示值',
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
indexes: [
|
|
25
|
+
{
|
|
26
|
+
name: 'index_targetEntity_entityId_name',
|
|
27
|
+
attributes: [
|
|
28
|
+
{
|
|
29
|
+
name: 'entity',
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
name: 'entityId',
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
name: 'name',
|
|
36
|
+
}
|
|
37
|
+
],
|
|
38
|
+
config: {
|
|
39
|
+
unique: true,
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
]
|
|
43
|
+
};
|