ConditionModel.ts
656 Bytes
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
export const enum ConditionRelation {
And = 1,
Or = 2
}
export const enum ConditionOperator {
Equal = 1,
NotEqual = 2,
Greater = 3,
GreaterOrEqual = 4,
Less = 5,
LessOrEqual = 6
}
export const enum ConditionOprandType {
Variable = 1,
Const = 2
}
export interface ConditionItem {
target: string,
operator: ConditionOperator,
oprand: {
type: ConditionOprandType,
value: string
}
}
export interface ConditionGroup {
relation: ConditionRelation;
items: ConditionItem[];
}
export interface ConditionExpression {
relation: ConditionRelation;
groups: ConditionGroup[];
}