oak-domain 4.1.0 → 4.2.0
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/ActionAuth/Schema.d.ts +185 -185
- package/lib/base-app-domain/ActionDefDict.d.ts +2 -2
- package/lib/base-app-domain/I18n/Schema.d.ts +128 -128
- package/lib/base-app-domain/Modi/Schema.d.ts +135 -135
- package/lib/base-app-domain/ModiEntity/Schema.d.ts +383 -383
- package/lib/base-app-domain/Oper/Schema.d.ts +158 -152
- package/lib/base-app-domain/Oper/Storage.js +19 -1
- package/lib/base-app-domain/OperEntity/Schema.d.ts +372 -372
- package/lib/base-app-domain/Path/Schema.d.ts +148 -148
- package/lib/base-app-domain/Relation/Schema.d.ts +187 -187
- package/lib/base-app-domain/RelationAuth/Schema.d.ts +213 -213
- package/lib/base-app-domain/User/Action.d.ts +1 -0
- package/lib/base-app-domain/User/Action.js +3 -3
- package/lib/base-app-domain/User/Schema.d.ts +209 -209
- package/lib/base-app-domain/UserEntityClaim/Schema.d.ts +263 -263
- package/lib/base-app-domain/UserEntityGrant/Action.d.ts +5 -5
- package/lib/base-app-domain/UserEntityGrant/Action.js +5 -5
- package/lib/base-app-domain/UserEntityGrant/Schema.d.ts +130 -130
- package/lib/base-app-domain/UserRelation/Schema.d.ts +207 -207
- package/lib/compiler/localeBuilder.d.ts +27 -27
- package/lib/compiler/localeBuilder.js +215 -215
- package/lib/compiler/routerBuilder.js +263 -263
- package/lib/compiler/schemalBuilder.js +4167 -4160
- package/lib/entities/Oper.d.ts +2 -1
- package/lib/entities/Oper.js +16 -1
- package/lib/entities/User.d.ts +10 -0
- package/lib/entities/User.js +3 -2
- package/lib/index.d.ts +0 -22
- package/lib/index.js +1 -35
- package/lib/store/AsyncRowStore.d.ts +66 -65
- package/lib/store/AsyncRowStore.js +180 -180
- package/lib/store/CascadeStore.js +7 -31
- package/lib/store/RelationAuth.d.ts +103 -103
- package/lib/store/RelationAuth.js +1209 -1343
- package/lib/store/SyncRowStore.d.ts +29 -29
- package/lib/store/TriggerExecutor.js +468 -468
- package/lib/store/actionDef.js +278 -278
- package/lib/store/checker.js +487 -487
- package/lib/triggers/index.d.ts +2 -2
- package/lib/triggers/index.js +21 -1
- package/lib/types/Aspect.d.ts +13 -13
- package/lib/types/Configuration.d.ts +42 -0
- package/lib/types/Configuration.js +3 -0
- package/lib/types/Connector.d.ts +38 -38
- package/lib/types/Context.d.ts +7 -7
- package/lib/types/Entity.d.ts +4 -4
- package/lib/types/Environment.d.ts +93 -93
- package/lib/types/Exception.d.ts +155 -155
- package/lib/types/Exception.js +436 -436
- package/lib/types/Sync.d.ts +48 -0
- package/lib/types/Sync.js +8 -0
- package/lib/types/index.d.ts +1 -0
- package/lib/types/index.js +1 -0
- package/lib/utils/SimpleConnector.d.ts +64 -64
- package/lib/utils/SimpleConnector.js +206 -206
- package/lib/utils/assert.d.ts +5 -5
- package/lib/utils/projection.d.ts +1 -1
- package/lib/utils/relationPath.d.ts +31 -0
- package/lib/utils/relationPath.js +202 -0
- 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 -32
- 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/Oper.ts
CHANGED
|
@@ -1,32 +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
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
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
|
+
};
|
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
import { String } from '../types/DataType';
|
|
2
|
-
import { EntityShape } from '../types/Entity';
|
|
3
|
-
import { Schema as Relation } from './Relation';
|
|
4
|
-
import { EntityDesc } from '../types/EntityDesc';
|
|
5
|
-
import { Schema as Path } from './Path';
|
|
6
|
-
|
|
7
|
-
// destRelation需要有sourceRelation才能授权/除权
|
|
8
|
-
export interface Schema extends EntityShape {
|
|
9
|
-
sourceRelation: Relation;
|
|
10
|
-
path: Path;
|
|
11
|
-
destRelation: Relation;
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
const entityDesc: EntityDesc<Schema> = {
|
|
15
|
-
indexes: [
|
|
16
|
-
{
|
|
17
|
-
name: 'index_entity_relation_path',
|
|
18
|
-
attributes: [
|
|
19
|
-
{
|
|
20
|
-
name: 'sourceRelation',
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
name: 'path',
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
name: 'destRelation',
|
|
27
|
-
},
|
|
28
|
-
],
|
|
29
|
-
config: {
|
|
30
|
-
unique: true,
|
|
31
|
-
},
|
|
32
|
-
},
|
|
33
|
-
],
|
|
34
|
-
locales: {
|
|
35
|
-
zh_CN: {
|
|
36
|
-
name: '用户授权',
|
|
37
|
-
attr: {
|
|
38
|
-
sourceRelation: '源关系',
|
|
39
|
-
path: '路径',
|
|
40
|
-
destRelation: '目标关系',
|
|
41
|
-
},
|
|
42
|
-
},
|
|
43
|
-
}
|
|
44
|
-
};
|
|
1
|
+
import { String } from '../types/DataType';
|
|
2
|
+
import { EntityShape } from '../types/Entity';
|
|
3
|
+
import { Schema as Relation } from './Relation';
|
|
4
|
+
import { EntityDesc } from '../types/EntityDesc';
|
|
5
|
+
import { Schema as Path } from './Path';
|
|
6
|
+
|
|
7
|
+
// destRelation需要有sourceRelation才能授权/除权
|
|
8
|
+
export interface Schema extends EntityShape {
|
|
9
|
+
sourceRelation: Relation;
|
|
10
|
+
path: Path;
|
|
11
|
+
destRelation: Relation;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
const entityDesc: EntityDesc<Schema> = {
|
|
15
|
+
indexes: [
|
|
16
|
+
{
|
|
17
|
+
name: 'index_entity_relation_path',
|
|
18
|
+
attributes: [
|
|
19
|
+
{
|
|
20
|
+
name: 'sourceRelation',
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
name: 'path',
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
name: 'destRelation',
|
|
27
|
+
},
|
|
28
|
+
],
|
|
29
|
+
config: {
|
|
30
|
+
unique: true,
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
],
|
|
34
|
+
locales: {
|
|
35
|
+
zh_CN: {
|
|
36
|
+
name: '用户授权',
|
|
37
|
+
attr: {
|
|
38
|
+
sourceRelation: '源关系',
|
|
39
|
+
path: '路径',
|
|
40
|
+
destRelation: '目标关系',
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
}
|
|
44
|
+
};
|
package/src/entities/User.ts
CHANGED
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
import { String, Int, Text, Image, Datetime } from '../types/DataType';
|
|
2
|
-
import { EntityShape } from '../types/Entity';
|
|
3
|
-
import { ActionDef } from '../types/Action';
|
|
4
|
-
import { EntityDesc } from '../types/EntityDesc';
|
|
5
|
-
|
|
6
|
-
export interface Schema extends EntityShape {
|
|
7
|
-
name?: String<16>;
|
|
8
|
-
nickname?: String<64>;
|
|
9
|
-
password?: Text;
|
|
10
|
-
ref?: Schema;
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
type UserAction = 'mergeTo';
|
|
14
|
-
type UserState = 'normal' | 'merged';
|
|
15
|
-
|
|
16
|
-
type Action = UserAction;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
const UserActionDef: ActionDef<UserAction, UserState> = {
|
|
20
|
-
stm: {
|
|
21
|
-
mergeTo: ['normal', 'merged'],
|
|
22
|
-
},
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
const entityDesc: EntityDesc<Schema, Action, '', {
|
|
26
|
-
userState: UserState,
|
|
27
|
-
}> = {
|
|
28
|
-
locales: {
|
|
29
|
-
zh_CN: {
|
|
30
|
-
name: '用户',
|
|
31
|
-
attr: {
|
|
32
|
-
name: '姓名',
|
|
33
|
-
nickname: '昵称',
|
|
34
|
-
password: '密码',
|
|
35
|
-
ref: '指向用户',
|
|
36
|
-
userState: '状态',
|
|
37
|
-
},
|
|
38
|
-
action: {
|
|
39
|
-
mergeTo: '合并',
|
|
40
|
-
},
|
|
41
|
-
v: {
|
|
42
|
-
userState: {
|
|
43
|
-
normal: '正常',
|
|
44
|
-
merged: '已被合并',
|
|
45
|
-
},
|
|
46
|
-
}
|
|
47
|
-
},
|
|
48
|
-
},
|
|
1
|
+
import { String, Int, Text, Image, Datetime } from '../types/DataType';
|
|
2
|
+
import { EntityShape } from '../types/Entity';
|
|
3
|
+
import { ActionDef } from '../types/Action';
|
|
4
|
+
import { EntityDesc } from '../types/EntityDesc';
|
|
5
|
+
|
|
6
|
+
export interface Schema extends EntityShape {
|
|
7
|
+
name?: String<16>;
|
|
8
|
+
nickname?: String<64>;
|
|
9
|
+
password?: Text;
|
|
10
|
+
ref?: Schema;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
type UserAction = 'mergeTo';
|
|
14
|
+
type UserState = 'normal' | 'merged';
|
|
15
|
+
|
|
16
|
+
export type Action = UserAction;
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
export const UserActionDef: ActionDef<UserAction, UserState> = {
|
|
20
|
+
stm: {
|
|
21
|
+
mergeTo: ['normal', 'merged'],
|
|
22
|
+
},
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export const entityDesc: EntityDesc<Schema, Action, '', {
|
|
26
|
+
userState: UserState,
|
|
27
|
+
}> = {
|
|
28
|
+
locales: {
|
|
29
|
+
zh_CN: {
|
|
30
|
+
name: '用户',
|
|
31
|
+
attr: {
|
|
32
|
+
name: '姓名',
|
|
33
|
+
nickname: '昵称',
|
|
34
|
+
password: '密码',
|
|
35
|
+
ref: '指向用户',
|
|
36
|
+
userState: '状态',
|
|
37
|
+
},
|
|
38
|
+
action: {
|
|
39
|
+
mergeTo: '合并',
|
|
40
|
+
},
|
|
41
|
+
v: {
|
|
42
|
+
userState: {
|
|
43
|
+
normal: '正常',
|
|
44
|
+
merged: '已被合并',
|
|
45
|
+
},
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
49
|
};
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import { String } from '../types/DataType';
|
|
2
|
-
import { EntityShape } from '../types/Entity';
|
|
3
|
-
import { EntityDesc } from '../types/EntityDesc';
|
|
4
|
-
import { Schema as UserEntityGrant } from './UserEntityGrant';
|
|
5
|
-
import { Schema as User } from './User';
|
|
6
|
-
import { Schema as Relation } from './Relation';
|
|
7
|
-
import { Schema as UserRelation } from './UserRelation';
|
|
8
|
-
|
|
9
|
-
export interface Schema extends EntityShape {
|
|
10
|
-
ueg: UserEntityGrant;
|
|
11
|
-
user: User;
|
|
12
|
-
relation: Relation;
|
|
13
|
-
claimEntityId: String<64>;
|
|
14
|
-
userRelation: UserRelation;
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
const entityDesc: EntityDesc<Schema, ''> = {
|
|
18
|
-
locales: {
|
|
19
|
-
zh_CN: {
|
|
20
|
-
name: '用户授权领取',
|
|
21
|
-
attr: {
|
|
22
|
-
ueg: '授权',
|
|
23
|
-
user: '用户',
|
|
24
|
-
relation: '关系',
|
|
25
|
-
claimEntityId: '对象Id',
|
|
26
|
-
userRelation: '用户关系',
|
|
27
|
-
},
|
|
28
|
-
},
|
|
29
|
-
},
|
|
1
|
+
import { String } from '../types/DataType';
|
|
2
|
+
import { EntityShape } from '../types/Entity';
|
|
3
|
+
import { EntityDesc } from '../types/EntityDesc';
|
|
4
|
+
import { Schema as UserEntityGrant } from './UserEntityGrant';
|
|
5
|
+
import { Schema as User } from './User';
|
|
6
|
+
import { Schema as Relation } from './Relation';
|
|
7
|
+
import { Schema as UserRelation } from './UserRelation';
|
|
8
|
+
|
|
9
|
+
export interface Schema extends EntityShape {
|
|
10
|
+
ueg: UserEntityGrant;
|
|
11
|
+
user: User;
|
|
12
|
+
relation: Relation;
|
|
13
|
+
claimEntityId: String<64>;
|
|
14
|
+
userRelation: UserRelation;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
const entityDesc: EntityDesc<Schema, ''> = {
|
|
18
|
+
locales: {
|
|
19
|
+
zh_CN: {
|
|
20
|
+
name: '用户授权领取',
|
|
21
|
+
attr: {
|
|
22
|
+
ueg: '授权',
|
|
23
|
+
user: '用户',
|
|
24
|
+
relation: '关系',
|
|
25
|
+
claimEntityId: '对象Id',
|
|
26
|
+
userRelation: '用户关系',
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
30
|
};
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { String } from '../types/DataType';
|
|
2
|
-
import { EntityShape } from '../types/Entity';
|
|
3
|
-
import { EntityDesc } from '../types/EntityDesc';
|
|
4
|
-
|
|
5
|
-
type RelationIds = string[];
|
|
6
|
-
|
|
7
|
-
export interface Schema extends EntityShape {
|
|
8
|
-
relationEntity: String<32>;
|
|
9
|
-
relationEntityFilter: Object;
|
|
10
|
-
relationIds: RelationIds;
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
const entityDesc: EntityDesc<Schema, ''> = {
|
|
14
|
-
locales: {
|
|
15
|
-
zh_CN: {
|
|
16
|
-
name: '用户授权',
|
|
17
|
-
attr: {
|
|
18
|
-
relationIds: '关系',
|
|
19
|
-
relationEntity: '关联对象',
|
|
20
|
-
relationEntityFilter: '对象限定条件',
|
|
21
|
-
},
|
|
22
|
-
},
|
|
23
|
-
},
|
|
24
|
-
};
|
|
1
|
+
import { String } from '../types/DataType';
|
|
2
|
+
import { EntityShape } from '../types/Entity';
|
|
3
|
+
import { EntityDesc } from '../types/EntityDesc';
|
|
4
|
+
|
|
5
|
+
type RelationIds = string[];
|
|
6
|
+
|
|
7
|
+
export interface Schema extends EntityShape {
|
|
8
|
+
relationEntity: String<32>;
|
|
9
|
+
relationEntityFilter: Object;
|
|
10
|
+
relationIds: RelationIds;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
const entityDesc: EntityDesc<Schema, ''> = {
|
|
14
|
+
locales: {
|
|
15
|
+
zh_CN: {
|
|
16
|
+
name: '用户授权',
|
|
17
|
+
attr: {
|
|
18
|
+
relationIds: '关系',
|
|
19
|
+
relationEntity: '关联对象',
|
|
20
|
+
relationEntityFilter: '对象限定条件',
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
};
|