bios-basic 0.2.0

An embeddable message queue system
Documentation
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
use serde::{Deserialize, Serialize};
use tardis::basic::field::TrimString;
use tardis::chrono::{DateTime, Utc};

use tardis::db::sea_orm;

use tardis::web::poem_openapi;

use crate::rbum::rbum_enumeration::{RbumDataTypeKind, RbumScopeLevelKind, RbumWidgetTypeKind};

/// Add request for resource kind attribute definition
///
/// 资源类型属性定义添加请求
#[derive(Serialize, Deserialize, Debug, poem_openapi::Object)]
pub struct RbumKindAttrAddReq {
    /// Attribute definition module
    ///
    /// 属性定义模块
    ///
    /// Default is ``empty``
    ///
    /// 默认为 ``空``
    ///
    /// Used to distinguish different instances of the same resource kind.
    /// For example, the ``user`` kind resource, different tenants can have different Attribute definitions.
    ///
    /// 用于区别使用同一资源类型的不同实例。比如 ``用户`` 类型的资源,不同的租户可以有不同的属性定义。
    #[oai(validator(min_length = "2", max_length = "255"))]
    pub module: Option<TrimString>,
    /// Attribute definition name
    ///
    /// 属性定义名称
    ///
    /// Corresponds to the field name, such as ``<input name=$name />`` .
    ///
    /// 多对应于字段名,如 ``<input name=$name />`` 。
    #[oai(validator(min_length = "2", max_length = "255"))]
    pub name: TrimString,
    /// Attribute definition label
    ///
    /// 属性定义标签
    ///
    /// Corresponds to the field label, such as ``<label for=$name>$label</label>`` .
    ///
    /// 多对应于字段标签,如 ``<label for="$name">$label</label>`` 。
    #[oai(validator(min_length = "2", max_length = "255"))]
    pub label: String,
    /// Attribute definition note
    ///
    /// 属性定义备注
    #[oai(validator(min_length = "2", max_length = "2000"))]
    pub note: Option<String>,
    /// Attribute definition sort
    ///
    /// 属性定义排序
    pub sort: Option<i64>,
    /// 是否定位类型的属性定义
    ///
    /// Whether the Attribute is a positioning kind
    ///
    /// Default is ``false``
    ///
    /// 默认为 ``false``
    ///
    /// Positioning kind extension attributes are used to assist in locating resources other than ID,
    /// such as ``ID card`` and ``work number``. Generally, an index will be added.
    ///
    /// 定位类型的属性用于除ID外辅助定位资源,比如 ``身份证`` ``工号`` 。 一般而言会加索引。
    pub position: Option<bool>,
    /// Whether the Attribute definition is a capacity kind
    ///
    /// 是否容量类型的属性定义
    ///
    /// Default is ``false``
    ///
    /// 默认为 ``false``
    ///
    /// Capacity kind extension attributes are used to store capacity information, such as ``disk capacity`` and ``memory capacity``.
    /// These attributes can be "consumed" and are often used in conjunction with [`crate::rbum::domain::rbum_rel::Model`] and [`crate::rbum::domain::rbum_rel_attr::Model`],
    /// the latter of which can record the consumed capacity.
    ///
    /// 容量类型的属性用于存储容量信息,如 ``磁盘容量`` ``内存容量`` 。
    /// 这些属性是可以被“消耗”的,多与 [`crate::rbum::domain::rbum_rel::Model`] 及 [`crate::rbum::domain::rbum_rel_attr::Model`] 配合使用,后者可以记录消耗的容量。
    pub capacity: Option<bool>,
    /// Whether overload is allowed
    ///
    /// 是否允许超载
    ///
    /// Default is ``false``
    ///
    /// 默认为 ``false``
    ///
    /// This attribute is only valid when ``capacity = true``, and is used to indicate whether the capacity is allowed to be overloaded.
    ///
    /// 此属性仅当 ``capacity = true``` 时有效,用于表示容量是否允许超载。
    pub overload: Option<bool>,
    /// Whether it is a secret
    ///
    /// 是否是秘密
    ///
    /// Default is ``false``
    ///
    /// 默认为 ``false``
    ///
    /// If ``true``, the value corresponding to this attribute will not be returned to the front end, but will only be processed on the server.
    /// This attribute can ensure the security of attribute data.
    ///
    /// 当为 ``true`` 时属性对应的值不会返回给前端,仅在服务端处理。此属性可以保证属性数据安全。
    pub secret: Option<bool>,
    /// Whether it is the main column
    ///
    /// 是否是主列
    ///
    /// Default is ``false``
    ///
    /// 默认为 ``false``
    ///
    /// If ``true``, it means that the attribute is the field corresponding to [`crate::rbum::domain::rbum_kind::Model::ext_table_name`] table,
    /// otherwise the attribute value will be stored in the [`crate::rbum::domain::rbum_item_attr::Model`] table.
    ///
    /// 当为 ``true`` 时表示该属性是 [`crate::rbum::domain::rbum_kind::Model::ext_table_name`] 表对应的字段,
    /// 否则会将该属性值存储在 [`crate::rbum::domain::rbum_item_attr::Model`] 表中。
    pub main_column: Option<bool>,
    /// Whether indexing is needed
    ///
    /// 是否需要索引
    ///
    /// Default is ``false``
    ///
    /// 默认为 ``false``
    ///
    /// This attribute is only valid when ``main_column = true``, used to indicate whether the attribute needs to be indexed.
    ///
    /// 此属性仅当 ``main_column = true`` 时有效,用于表示是否需要对该属性进行索引。
    pub idx: Option<bool>,
    /// Data kind
    ///
    /// 数据类型
    pub data_type: RbumDataTypeKind,
    /// Show widget kind
    ///
    /// 显示控件类型
    pub widget_type: RbumWidgetTypeKind,
    /// Number of columns occupied by the widget
    ///
    /// 控件占用列数
    ///
    /// Default is ``0``, indicating self-adaptation
    ///
    /// 默认为 ``0`` , 表示自适应
    #[oai(validator(minimum(value = "0", exclusive = "false")))]
    pub widget_columns: Option<i16>,
    /// Whether to hide by default
    ///
    /// 默认是否隐藏
    ///
    /// Default is ``false``
    ///
    /// 默认为 ``false``
    ///
    /// If ``true``, the value corresponding to this attribute will be returned to the front end, but will not be displayed.
    /// This attribute is often used for internal processing on the front end.
    /// This attribute cannot guarantee the security of attribute data.
    ///
    /// 当为 ``true`` 时该属性对应的值会返给前端,但不会显示。多用于前端内部处理。此属性不能保证属性数据安全。
    pub hide: Option<bool>,
    /// Show conditions
    ///
    /// 显示条件
    ///
    /// Json format: ``{<attribute name>:<attribute value>}``, currently only supports ``and`` operations.
    ///
    /// Json格式:``{<属性名>:<属性值>}``,目前仅支持``and``操作。
    pub show_by_conds: Option<String>,
    /// Fixed default value
    ///
    /// 固定默认值
    #[oai(validator(min_length = "2", max_length = "2000"))]
    pub default_value: Option<String>,
    /// Dynamic default value
    ///
    /// 动态默认值
    ///
    /// It can be a URL (with placeholders) or a set of placeholders.
    /// Placeholders are wrapped in ``{...}``, and the corresponding values can come from other current attribute values or incoming context variables.
    ///
    /// 可以是一个URL(允许有占位符)或是一组占位符。占位符使用 ``{...}``包裹,对应的值可以来自当前的其它属性值、传入的上下文变量。
    ///
    /// The return format is the same as ``default_value``
    /// or ``json`` when ``data_type = Json``` and ``widget_type = Control``
    /// or ``array`` when ``data_type = Array`` and ``widget_type = Group``.
    ///
    /// 返回格式与 ``default_value`` 一致,
    /// 或当 ``data_type = Json`` 且 ``widget_type = Control`` 时为 ``json`` ,
    /// 或当 ``data_type = Array`` 且 ``widget_type = Group`` 时为 ``array``。
    pub dyn_default_value: Option<String>,
    /// Fixed options
    ///
    /// 固定选项
    ///
    /// Json array format: ``[{name:<display name>:value:<corresponding value>}]``.
    ///
    /// Json数组格式:``[{name:<显示名称>:value:<对应值>}]``。
    pub options: Option<String>,
    /// Dynamic options
    ///
    /// 动态选项
    ///
    /// It can be a URL (with placeholders) or a set of placeholders.
    /// Placeholders are wrapped in ``{...}``, and the corresponding values can come from other current attribute values or incoming context variables.
    ///
    /// 可以是一个URL(允许有占位符)或是一组占位符。占位符使用 ``{...}``包裹,对应的值可以来自当前的其它属性值、传入的上下文变量。
    ///
    /// the return format is the same as `options`.
    ///
    /// 返回格式与 `options` 一致。
    pub dyn_options: Option<String>,
    /// Whether it is required
    ///
    /// 是否必填
    ///
    /// Default is ``false``
    ///
    /// 默认为 ``false``
    pub required: Option<bool>,
    /// Minimum length
    ///
    /// 最小长度
    ///
    /// Default is ``0``, indicating no limit
    ///
    /// 默认为 ``0`` , 表示不限制
    #[oai(validator(minimum(value = "0", exclusive = "false")))]
    pub min_length: Option<i32>,
    /// Maximum length
    ///
    /// 最大长度
    ///
    /// Default is ``0``, indicating no limit
    ///
    /// 默认为 ``0`` , 表示不限制
    #[oai(validator(minimum(value = "0", exclusive = "false")))]
    pub max_length: Option<i32>,
    /// Parent attribute name
    ///
    /// 父属性名称
    ///
    /// Used to implement multi-level attributes.
    ///
    /// 用于实现多级属性。
    pub parent_attr_name: Option<TrimString>,
    /// Custom behavior
    ///
    /// 自定义行为
    ///
    /// For example: user selection function, role selection function, etc.
    /// Custom behavior needs to be bound to the corresponding function code.
    ///
    /// 例如:用户选择函数、角色选择函数等。
    /// 自定义行为需要绑定到对应的函数代码。
    #[oai(validator(min_length = "2", max_length = "2000"))]
    pub action: Option<String>,
    /// Extension information
    ///
    /// 扩展信息
    #[oai(validator(min_length = "2", max_length = "2000"))]
    pub ext: Option<String>,
    /// Associated [resource kind](crate::rbum::dto::rbum_kind_dto::RbumKindDetailResp) id
    ///
    /// 关联的 [资源类型](crate::rbum::dto::rbum_kind_dto::RbumKindDetailResp) id
    #[oai(validator(min_length = "2", max_length = "255"))]
    pub rel_rbum_kind_id: String,

    pub scope_level: Option<RbumScopeLevelKind>,
}

/// Modify request for resource kind attribute definition
///
/// 资源类型属性定义修改请求
#[derive(Serialize, Deserialize, Debug, poem_openapi::Object)]
pub struct RbumKindAttrModifyReq {
    /// Attribute definition label
    ///
    /// 属性定义标签
    ///
    /// Corresponds to the field label, such as ``<label for=$name>$label</label>`` .
    ///
    /// 多对应于字段标签,如 ``<label for="$name">$label</label>`` 。
    #[oai(validator(min_length = "2", max_length = "255"))]
    pub label: Option<String>,
    /// Attribute definition note
    ///
    /// 属性定义备注
    #[oai(validator(min_length = "2", max_length = "2000"))]
    pub note: Option<String>,
    /// Attribute definition sort
    ///
    /// 属性定义排序
    pub sort: Option<i64>,
    /// 是否定位类型的属性定义
    ///
    /// Whether the Attribute is a positioning kind
    ///
    /// Positioning kind extension attributes are used to assist in locating resources other than ID,
    /// such as ``ID card`` and ``work number``. Generally, an index will be added.
    ///
    /// 定位类型的属性用于除ID外辅助定位资源,比如 ``身份证`` ``工号`` 。 一般而言会加索引。
    pub position: Option<bool>,
    /// Whether the Attribute definition is a capacity kind
    ///
    /// 是否容量类型的属性定义
    ///
    /// Capacity kind extension attributes are used to store capacity information, such as ``disk capacity`` and ``memory capacity``.
    /// These attributes can be "consumed" and are often used in conjunction with [`crate::rbum::domain::rbum_rel::Model`] and [`crate::rbum::domain::rbum_rel_attr::Model`],
    /// the latter of which can record the consumed capacity.
    ///
    /// 容量类型的属性用于存储容量信息,如 ``磁盘容量`` ``内存容量`` 。
    /// 这些属性是可以被“消耗”的,多与 [`crate::rbum::domain::rbum_rel::Model`] 及 [`crate::rbum::domain::rbum_rel_attr::Model`] 配合使用,后者可以记录消耗的容量。
    pub capacity: Option<bool>,
    /// Whether overload is allowed
    ///
    /// 是否允许超载
    ///
    /// This attribute is only valid when ``capacity = true``, and is used to indicate whether the capacity is allowed to be overloaded.
    ///
    /// 此属性仅当 ``capacity = true``` 时有效,用于表示容量是否允许超载。
    pub overload: Option<bool>,
    /// Whether it is a secret
    ///
    /// 是否是秘密
    ///
    /// If ``true``, the value corresponding to this attribute will not be returned to the front end, but will only be processed on the server.
    /// This attribute can ensure the security of attribute data.
    ///
    /// 当为 ``true`` 时属性对应的值不会返回给前端,仅在服务端处理。此属性可以保证属性数据安全。
    pub secret: Option<bool>,
    /// Whether it is the main column
    ///
    /// 是否是主列
    ///
    /// If ``true``, it means that the attribute is the field corresponding to [`crate::rbum::domain::rbum_kind::Model::ext_table_name`] table,
    /// otherwise the attribute value will be stored in the [`crate::rbum::domain::rbum_item_attr::Model`] table.
    ///
    /// 当为 ``true`` 时表示该属性是 [`crate::rbum::domain::rbum_kind::Model::ext_table_name`] 表对应的字段,
    /// 否则会将该属性值存储在 [`crate::rbum::domain::rbum_item_attr::Model`] 表中。
    pub main_column: Option<bool>,
    /// Whether indexing is needed
    ///
    /// 是否需要索引
    ///
    /// This attribute is only valid when ``main_column = true``, used to indicate whether the attribute needs to be indexed.
    ///
    /// 此属性仅当 ``main_column = true`` 时有效,用于表示是否需要对该属性进行索引。
    pub idx: Option<bool>,
    /// Data kind
    ///
    /// 数据类型
    pub data_type: Option<RbumDataTypeKind>,
    /// Show widget kind
    ///
    /// 显示控件类型
    pub widget_type: Option<RbumWidgetTypeKind>,
    /// Number of columns occupied by the widget
    ///
    /// 控件占用列数
    ///
    /// Default is ``0``, indicating self-adaptation
    ///
    /// 默认为 ``0`` , 表示自适应
    #[oai(validator(minimum(value = "0", exclusive = "false")))]
    pub widget_columns: Option<i16>,
    /// Whether to hide by default
    ///
    /// 默认是否隐藏
    ///
    /// If ``true``, the value corresponding to this attribute will be returned to the front end, but will not be displayed.
    /// This attribute is often used for internal processing on the front end.
    /// This attribute cannot guarantee the security of attribute data.
    ///
    /// 当为 ``true`` 时该属性对应的值会返给前端,但不会显示。多用于前端内部处理。此属性不能保证属性数据安全。
    pub hide: Option<bool>,
    /// Show conditions
    ///
    /// 显示条件
    ///
    /// Json format: ``{<attribute name>:<attribute value>}``, currently only supports ``and`` operations.
    ///
    /// Json格式:``{<属性名>:<属性值>}``,目前仅支持``and``操作。
    pub show_by_conds: Option<String>,
    /// Fixed default value
    ///
    /// 固定默认值
    #[oai(validator(min_length = "2", max_length = "2000"))]
    pub default_value: Option<String>,
    /// Dynamic default value
    ///
    /// 动态默认值
    ///
    /// It can be a URL (with placeholders) or a set of placeholders.
    /// Placeholders are wrapped in ``{...}``, and the corresponding values can come from other current attribute values or incoming context variables.
    ///
    /// 可以是一个URL(允许有占位符)或是一组占位符。占位符使用 ``{...}``包裹,对应的值可以来自当前的其它属性值、传入的上下文变量。
    ///
    /// The return format is the same as ``default_value``
    /// or ``json`` when ``data_type = Json``` and ``widget_type = Control``
    /// or ``array`` when ``data_type = Array`` and ``widget_type = Group``.
    ///
    /// 返回格式与 ``default_value`` 一致,
    /// 或当 ``data_type = Json`` 且 ``widget_type = Control`` 时为 ``json`` ,
    /// 或当 ``data_type = Array`` 且 ``widget_type = Group`` 时为 ``array``。
    pub dyn_default_value: Option<String>,
    /// Fixed options
    ///
    /// 固定选项
    ///
    /// Json array format: ``[{name:<display name>:value:<corresponding value>}]``.
    ///
    /// Json数组格式:``[{name:<显示名称>:value:<对应值>}]``。
    pub options: Option<String>,
    /// Dynamic options
    ///
    /// 动态选项
    ///
    /// It can be a URL (with placeholders) or a set of placeholders.
    /// Placeholders are wrapped in ``{...}``, and the corresponding values can come from other current attribute values or incoming context variables.
    ///
    /// 可以是一个URL(允许有占位符)或是一组占位符。占位符使用 ``{...}``包裹,对应的值可以来自当前的其它属性值、传入的上下文变量。
    ///
    /// the return format is the same as `options`.
    ///
    /// 返回格式与 `options` 一致。
    pub dyn_options: Option<String>,
    /// Whether it is required
    ///
    /// 是否必填
    pub required: Option<bool>,
    /// Minimum length
    ///
    /// 最小长度
    #[oai(validator(minimum(value = "0", exclusive = "false")))]
    pub min_length: Option<i32>,
    /// Maximum length
    ///
    /// 最大长度
    #[oai(validator(minimum(value = "0", exclusive = "false")))]
    pub max_length: Option<i32>,
    /// Parent attribute name
    ///
    /// 父属性名称
    ///
    /// Used to implement multi-level attributes.
    ///
    /// 用于实现多级属性。
    pub parent_attr_name: Option<TrimString>,
    /// Custom behavior
    ///
    /// 自定义行为
    ///
    /// For example: user selection function, role selection function, etc.
    /// Custom behavior needs to be bound to the corresponding function code.
    ///
    /// 例如:用户选择函数、角色选择函数等。
    /// 自定义行为需要绑定到对应的函数代码。
    #[oai(validator(min_length = "2", max_length = "2000"))]
    pub action: Option<String>,
    /// Extension information
    ///
    /// 扩展信息
    #[oai(validator(min_length = "2", max_length = "2000"))]
    pub ext: Option<String>,

    pub scope_level: Option<RbumScopeLevelKind>,
}

/// Resource kind attribute definition summary information
///
/// 资源类型属性定义概要信息
#[derive(Serialize, Deserialize, Debug, poem_openapi::Object, sea_orm::FromQueryResult)]
pub struct RbumKindAttrSummaryResp {
    /// Attribute definition id
    ///
    /// 属性定义id
    pub id: String,
    /// Attribute definition module
    ///
    /// 属性定义模块
    pub module: String,
    /// Attribute definition name
    ///
    /// 属性定义名称
    pub name: String,
    /// Attribute definition label
    ///
    /// 属性定义标签
    pub label: String,
    /// Attribute definition note
    ///
    /// 属性定义备注
    pub note: String,
    /// Attribute definition sort
    ///
    /// 属性定义排序
    pub sort: i64,
    /// 是否定位类型的属性定义
    ///
    /// Whether the Attribute is a positioning kind
    pub position: bool,
    /// Whether the Attribute definition is a capacity kind
    ///
    /// 是否容量类型的属性定义
    pub capacity: bool,
    /// Whether overload is allowed
    ///
    /// 是否允许超载
    pub overload: bool,
    /// Whether it is a secret
    ///
    /// 是否是秘密
    pub secret: bool,
    /// Whether it is the main column
    ///
    /// 是否是主列
    pub main_column: bool,
    /// Whether indexing is needed
    ///
    /// 是否需要索引
    pub idx: bool,
    /// Data kind
    ///
    /// 数据类型
    pub data_type: RbumDataTypeKind,
    /// Show widget kind
    ///
    /// 显示控件类型
    pub widget_type: RbumWidgetTypeKind,
    /// Number of columns occupied by the widget
    ///
    /// 控件占用列数
    pub widget_columns: i16,
    /// Whether to hide by default
    ///
    /// 默认是否隐藏
    pub hide: bool,
    /// Show conditions
    ///
    /// 显示条件
    ///
    /// Json format: ``{<attribute name>:<attribute value>}``, currently only supports ``and`` operations.
    ///
    /// Json格式:``{<属性名>:<属性值>}``,目前仅支持``and``操作。
    pub show_by_conds: String,
    /// Fixed default value
    ///
    /// 固定默认值
    pub default_value: String,
    /// Dynamic default value
    ///
    /// 动态默认值
    ///
    /// Placeholders are wrapped in ``{...}``, and the corresponding values can come from other current attribute values or incoming context variables.
    ///
    /// 可以是一个URL(允许有占位符)或是一组占位符。占位符使用 ``{...}``包裹,对应的值可以来自当前的其它属性值、传入的上下文变量。
    ///
    /// The return format is the same as ``default_value``
    /// or ``json`` when ``data_type = Json``` and ``widget_type = Control``
    /// or ``array`` when ``data_type = Array`` and ``widget_type = Group``.
    ///
    /// 返回格式与 ``default_value`` 一致,
    /// 或当 ``data_type = Json`` 且 ``widget_type = Control`` 时为 ``json`` ,
    /// 或当 ``data_type = Array`` 且 ``widget_type = Group`` 时为 ``array``。
    pub dyn_default_value: String,
    /// Fixed options
    ///
    /// 固定选项
    ///
    /// Json array format: ``[{name:<display name>:value:<corresponding value>}]``.
    ///
    /// Json数组格式:``[{name:<显示名称>:value:<对应值>}]``。
    pub options: String,
    /// Dynamic options
    ///
    /// 动态选项
    ///
    /// It can be a URL (with placeholders) or a set of placeholders.
    /// Placeholders are wrapped in ``{...}``, and the corresponding values can come from other current attribute values or incoming context variables.
    ///
    /// 可以是一个URL(允许有占位符)或是一组占位符。占位符使用 ``{...}``包裹,对应的值可以来自当前的其它属性值、传入的上下文变量。
    ///
    /// the return format is the same as `options`.
    ///
    /// 返回格式与 `options` 一致。
    pub dyn_options: String,
    /// Whether it is required
    ///
    /// 是否必填
    pub required: bool,
    /// Minimum length
    ///
    /// 最小长度
    pub min_length: i32,
    /// Maximum length
    ///
    /// 最大长度
    pub max_length: i32,
    /// Parent attribute name
    ///
    /// 父属性名称
    pub parent_attr_name: String,
    /// Custom behavior
    ///
    /// 自定义行为
    pub action: String,
    /// Extension information
    ///
    /// 扩展信息
    pub ext: String,
    /// Associated [resource kind](crate::rbum::dto::rbum_kind_dto::RbumKindDetailResp) id
    ///
    /// 关联的 [资源类型](crate::rbum::dto::rbum_kind_dto::RbumKindDetailResp) id
    pub rel_rbum_kind_id: String,

    pub own_paths: String,
    pub owner: String,
    pub create_time: DateTime<Utc>,
    pub update_time: DateTime<Utc>,

    pub scope_level: RbumScopeLevelKind,
}

/// Resource kind attribute definition detail information
///
/// 资源类型属性定义详细信息
#[derive(Serialize, Deserialize, Debug, poem_openapi::Object, sea_orm::FromQueryResult)]
pub struct RbumKindAttrDetailResp {
    /// Attribute definition id
    ///
    /// 属性定义id
    pub id: String,
    /// Attribute definition module
    ///
    /// 属性定义模块
    pub module: String,
    /// Attribute definition module
    ///
    /// 属性定义模块
    pub name: String,
    /// Attribute definition label
    ///
    /// 属性定义标签
    pub label: String,
    /// Attribute definition note
    ///
    /// 属性定义备注
    pub note: String,
    /// Attribute definition sort
    ///
    /// 属性定义排序
    pub sort: i64,
    /// 是否定位类型的属性定义
    ///
    /// Whether the Attribute is a positioning kind
    pub position: bool,
    /// Whether the Attribute definition is a capacity kind
    ///
    /// 是否容量类型的属性定义
    pub capacity: bool,
    /// Whether overload is allowed
    ///
    /// 是否允许超载
    pub overload: bool,
    /// Whether it is a secret
    ///
    /// 是否是秘密
    pub secret: bool,
    /// Whether it is the main column
    ///
    /// 是否是主列
    pub main_column: bool,
    /// Whether indexing is needed
    ///
    /// 是否需要索引
    pub idx: bool,
    /// Data kind
    ///
    /// 数据类型
    pub data_type: RbumDataTypeKind,
    /// Show widget kind
    ///
    /// 显示控件类型
    pub widget_type: RbumWidgetTypeKind,
    /// Number of columns occupied by the widget
    ///
    /// 控件占用列数
    pub widget_columns: i16,
    /// Whether to hide by default
    ///
    /// 默认是否隐藏
    pub hide: bool,
    /// Show conditions
    ///
    /// 显示条件
    ///
    /// Json format: ``{<attribute name>:<attribute value>}``, currently only supports ``and`` operations.
    ///
    /// Json格式:``{<属性名>:<属性值>}``,目前仅支持``and``操作。
    pub show_by_conds: String,
    /// Fixed default value
    ///
    /// 固定默认值
    pub default_value: String,
    /// Dynamic default value
    ///
    /// 动态默认值
    ///
    /// Placeholders are wrapped in ``{...}``, and the corresponding values can come from other current attribute values or incoming context variables.
    ///
    /// 可以是一个URL(允许有占位符)或是一组占位符。占位符使用 ``{...}``包裹,对应的值可以来自当前的其它属性值、传入的上下文变量。
    ///
    /// The return format is the same as ``default_value``
    /// or ``json`` when ``data_type = Json``` and ``widget_type = Control``
    /// or ``array`` when ``data_type = Array`` and ``widget_type = Group``.
    ///
    /// 返回格式与 ``default_value`` 一致,
    /// 或当 ``data_type = Json`` 且 ``widget_type = Control`` 时为 ``json`` ,
    /// 或当 ``data_type = Array`` 且 ``widget_type = Group`` 时为 ``array``。
    pub dyn_default_value: String,
    /// Fixed options
    ///
    /// 固定选项
    ///
    /// Json array format: ``[{name:<display name>:value:<corresponding value>}]``.
    ///
    /// Json数组格式:``[{name:<显示名称>:value:<对应值>}]``。
    pub options: String,
    /// Dynamic options
    ///
    /// 动态选项
    ///
    /// It can be a URL (with placeholders) or a set of placeholders.
    /// Placeholders are wrapped in ``{...}``, and the corresponding values can come from other current attribute values or incoming context variables.
    ///
    /// 可以是一个URL(允许有占位符)或是一组占位符。占位符使用 ``{...}``包裹,对应的值可以来自当前的其它属性值、传入的上下文变量。
    ///
    /// the return format is the same as `options`.
    ///
    /// 返回格式与 `options` 一致。
    pub dyn_options: String,
    /// Whether it is required
    ///
    /// 是否必填
    pub required: bool,
    /// Minimum length
    ///
    /// 最小长度
    pub min_length: i32,
    /// Maximum length
    ///
    /// 最大长度
    pub max_length: i32,
    /// Parent attribute name
    ///
    /// 父属性名称
    pub parent_attr_name: String,
    /// Custom behavior
    ///
    /// 自定义行为
    pub action: String,
    /// Extension information
    ///
    /// 扩展信息
    pub ext: String,
    /// Associated [resource kind](crate::rbum::dto::rbum_kind_dto::RbumKindDetailResp) id
    ///
    /// 关联的 [资源类型](crate::rbum::dto::rbum_kind_dto::RbumKindDetailResp) id
    pub rel_rbum_kind_id: String,
    /// Associated [resource kind](crate::rbum::dto::rbum_kind_dto::RbumKindDetailResp) name
    ///
    /// 关联的 [资源类型](crate::rbum::dto::rbum_kind_dto::RbumKindDetailResp) name
    pub rel_rbum_kind_name: String,

    pub own_paths: String,
    pub owner: String,
    pub owner_name: Option<String>,
    pub create_time: DateTime<Utc>,
    pub update_time: DateTime<Utc>,

    pub scope_level: RbumScopeLevelKind,
}