types.ts
1.38 KB
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
// 与后端 SceneSchemaService 输出对应的类型(宽松定义,随模型演进自动兼容)
export interface FieldBind {
bindAggregateId: string
bindSourceType: 'aggregate_root' | 'aggregate_entity'
domainEntityName?: string
domainFieldName: string
formLabel?: string
placeholder?: string
required?: boolean
maskField?: boolean
fieldType?: string
masked?: boolean
optionsSource?: {
aggregateId: string
endpoint: string
valueField: string
labelField: string
}
}
export interface DragComponent {
compId: string
compType: 'input' | 'number_input' | 'date_picker' | 'switch' | 'table' | 'card' | 'text_area' | 'select'
width?: string
span?: number
fieldBind?: FieldBind
childComponents?: DragComponent[]
}
export interface SceneSchema {
sceneId: string
sceneName: string
aggregateScope: string[]
permissionBind: string[]
command?: any
commandApi?: string
template?: {
templateId: string
templateName: string
templateType: string
renderMode: string
masterAggregate: string
detailAggregates: string[]
rootComponents: DragComponent[]
}
rules?: Array<{ ruleId: string; ruleName: string; effect: string; message: string; matchCondition: string }>
ruleGlobalParams?: Record<string, any>
sourceLayers?: Record<string, string>
}
export type OptionItem = { value: any; label: any; data: Record<string, any> }