-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path~schema.gql
8756 lines (7829 loc) · 231 KB
/
~schema.gql
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
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# ------------------------------------------------------
# THIS FILE WAS AUTOMATICALLY GENERATED (DO NOT MODIFY)
# ------------------------------------------------------
directive @upper on FIELD_DEFINITION
directive @lower on FIELD_DEFINITION
type PermissionGroupCount {
actions: Int!
permission: Int!
}
"""操作权限分组 -- 存储已经分配的操作组与操作的对应关系"""
type PermissionGroup {
id: ID!
create_date: DateTime!
update_date: DateTime!
"""删除的数据"""
isDelete: Boolean!
"""
"权限组"
"""
actionGroupId: String!
actionGroup: ActionGroup!
"""
"操作列表"
"""
actions: [Action!]
"""
"操作说明"
"""
description: String
"""权限列表"""
permission: [Permission!]
_count: PermissionGroupCount!
}
"""
A date-time string at UTC, such as 2019-12-03T09:54:33Z, compliant with the date-time format.
"""
scalar DateTime
type ActionGroupCount {
actions: Int!
}
"""功能操作组 - 要求:不可在Menu中复用"""
type ActionGroup {
id: ID!
create_date: DateTime!
update_date: DateTime!
"""删除的数据"""
isDelete: Boolean!
"""
"分组编码-相同菜单下不能重复"
"""
code: String!
"""
"分组名称"
"""
name: String!
"""
"多语言标识"
"""
i18N: String
"""
"菜单"
"""
menuId: String
menu: Menu
"""
"操作"
"""
actions: [Action!]
"""
"分组说明"
"""
description: String
permissionGroup: PermissionGroup
_count: ActionGroupCount!
}
type ActionCount {
permissionGroup: Int!
}
"""功能操作 - 要求:不可在ActionGroup中复用"""
type Action {
id: ID!
create_date: DateTime!
update_date: DateTime!
"""删除的数据"""
isDelete: Boolean!
"""操作编码"""
code: String
"""操作名称,显示名称"""
name: String!
"""多语言标识"""
i18N: String
"""是否需要签名"""
signature: Boolean
"""分组"""
groupId: String!
group: ActionGroup!
"""操作说明"""
description: String!
permissionGroup: [PermissionGroup!]
signaturePermission: SignaturePermission
_count: ActionCount!
}
type SignatureRuleCount {
group: Int!
}
"""
签名规则 -- 一个用户组中的任意用户签名有效 一个用户组中的任意用户,但不包含当前登录用户,签名有效 两个或两个以上用户组中的任意用户进行联合签名有效 两个或两个以上用户组中的任意用户签名,但不包含当前登录用户,签名有效
"""
type SignatureRule {
id: ID!
create_date: DateTime!
update_date: DateTime!
"""删除的数据"""
isDelete: Boolean!
"""
"规则名称"
"""
name: String!
"""
"分类"
"""
category: SignatureCategory!
"""
"规则值 user.name | userGroup.code"
"""
value: String!
"""
"动作"
"""
action: SignatureAction!
"""
"规则分组"
"""
group: [SignatureGroup!]
"""
"规则说明"
"""
description: String
_count: SignatureRuleCount!
}
"""签名规则分类"""
enum SignatureCategory {
USERGROUP
LOGINUSER
}
"""签名规则"""
enum SignatureAction {
ALLOW
DENY
}
type SignatureGroupCount {
rules: Int!
}
"""签名分组"""
type SignatureGroup {
id: ID!
create_date: DateTime!
update_date: DateTime!
"""删除的数据"""
isDelete: Boolean!
"""
"分组名称"
"""
name: String!
"""
"签名规则"
"""
rules: [SignatureRule!]
"""
"分组说明"
"""
description: String
signaturePermission: SignaturePermission
_count: SignatureGroupCount!
}
"""签名权限 - 不包括数据查询外的数据操作签名控制 签名控制以Action为细粒度索引签名规则"""
type SignaturePermission {
id: ID!
create_date: DateTime!
update_date: DateTime!
"""删除的数据"""
isDelete: Boolean!
"""
"菜单功能操作,数据唯一"
"""
actionId: String!
action: Action!
"""
"分组"
"""
signatureGroupId: String!
signatureGroup: SignatureGroup!
"""
"菜单所属模块,冗余校验"
"""
moduleId: String!
module: Module
"""
"权限说明"
"""
description: String
}
type ModuleCount {
Menu: Int!
}
"""模块列表"""
type Module {
id: ID!
create_date: DateTime!
update_date: DateTime!
"""删除的数据"""
isDelete: Boolean!
"""
"模块编码"
"""
code: String!
"""
"模块名称"
"""
name: String!
"""
"数据路径-数据权限使用"
"""
path: String
"""
"模块说明"
"""
description: String
"""
"是否启用"
"""
enable: Boolean!
Menu: [Menu!]
SignaturePermission: SignaturePermission
_count: ModuleCount!
}
type MenuCount {
menus: Int!
actionGroups: Int!
permission: Int!
}
"""菜单列表 树形结构"""
type Menu {
id: ID!
create_date: DateTime!
update_date: DateTime!
"""删除的数据"""
isDelete: Boolean!
"""
"菜单编码,不能重复"
"""
code: String!
"""
"菜单名称,展示名称"
"""
name: String!
"""
"父菜单:一"
"""
parentId: String
parent: Menu
"""
"子菜单"
"""
menus: [Menu!]
"""
"菜单类型"
"""
menuType: MenuType!
"""
"所属模块"
"""
moduleId: String!
module: Module!
"""
"URL地址"
"""
url: String
"""
"多语言标识"
"""
i18N: String
"""
"图标标示"
"""
icon: String
"""
"排序号"
"""
orderNo: Int
"""
"菜单说明"
"""
description: String
"""
"是否可用"
"""
enable: Boolean!
"""
"对应操作"
"""
actionGroups: [ActionGroup!]
"""权限列表"""
permission: [Permission!]
_count: MenuCount!
}
"""菜单类型"""
enum MenuType {
INTERNAL
INTERNALLINK
EXTERNAL
EXTERNALPOPUP
}
type PermissionCount {
menu: Int!
userGroup: Int!
permissionGroups: Int!
}
"""权限列表 -- 不同用户组,在相同菜单下有不同的操作组"""
type Permission {
id: ID!
create_date: DateTime!
update_date: DateTime!
"""删除的数据"""
isDelete: Boolean!
"""
"菜单信息"
"""
menu: [Menu!]
"""
"用户组"
"""
userGroup: [UserGroup!]
"""
"操作权限组"
"""
permissionGroups: [PermissionGroup!]
"""
"权限说明"
"""
description: String
_count: PermissionCount!
}
type UserGroupCount {
users: Int!
permission: Int!
}
"""用户组 -- 用户分组,菜单和功能操作权限对应用户组进行分配"""
type UserGroup {
id: ID!
create_date: DateTime!
update_date: DateTime!
"""删除的数据"""
isDelete: Boolean!
"""
"用户组编码,不能重复"
"""
code: String!
"""
"用户组名称"
"""
name: String!
"""
"用户列表"
"""
users: [User!]
"""
"其他描述信息"
"""
description: String
permission: [Permission!]
_count: UserGroupCount!
}
type UserCount {
group: Int!
person: Int!
}
"""用户信息 登录、密码、鉴权"""
type User {
id: ID!
create_date: DateTime!
update_date: DateTime!
"""删除的数据"""
isDelete: Boolean!
"""
"用户名称,用户登录字段"
"""
username: String!
"""
"用户邮箱,密码找回用"
"""
email: String!
"""
"用户角色组"
"""
role: Role!
"""
"用户组"
"""
group: [UserGroup!]
"""
"RFID 可以为空不能重复"
"""
RFID: String
"""
"用户对应人员"
"""
person: [Person!]
"""
"其他描述信息"
"""
description: String
"""
"用户过期,时间戳"
"""
expired: Float
"""
"用户状态"
"""
status: UserStatus!
_count: UserCount!
}
"""角色定义"""
enum Role {
ADMIN
SYSTEM
USER
}
"""用户状态"""
enum UserStatus {
LOCK
ACTIVITY
INACTIVATED
}
type PersonCount {
user: Int!
organize: Int!
}
"""人员信息 一个人员对应一个用户"""
type Person {
id: ID!
create_date: DateTime!
update_date: DateTime!
"""删除的数据"""
isDelete: Boolean!
"""
"员工编码,不能重复"
"""
code: String!
"""
"人员名称,中文名称等"
"""
name: String
"""
"个人头像"
"""
avatar: String
"""
"对应的登录用户,可以为空"
"""
user: [User!]
"""
"生日"
"""
birthday: DateTime
"""
"手机号"
"""
mobile: String
"""
"性别"
"""
sex: SexType
"""
"组织 用户至少从属1个组织"
"""
organize: [Organize!]
"""
"状态"
"""
status: PersonStatus
"""
"其他描述信息"
"""
description: String
_count: PersonCount!
}
"""性别"""
enum SexType {
MALE
FEMALE
OTHER
}
"""人员状态"""
enum PersonStatus {
INCUMBENCY
LEAVING
}
type OrganizeCount {
persons: Int!
organizes: Int!
}
"""组织机构- 对应集团,公司,部门"""
type Organize {
id: ID!
create_date: DateTime!
update_date: DateTime!
"""删除的数据"""
isDelete: Boolean!
"""
"编码,不能为空"
"""
code: String!
"""
"名称不可重复"
"""
name: String!
"""
"人员信息"
"""
persons: [Person!]
"""
"组织类型"
"""
type: OrganizeType!
"""
"说明"
"""
description: String
"""
"父组织:一"
"""
parentId: String
parent: Organize
"""
"子结构:多"
"""
organizes: [Organize!]
_count: OrganizeCount!
}
"""组织类型"""
enum OrganizeType {
GROUP
COMPANY
DEPARTMENT
}
type OrganizeCountAggregate {
id: Int!
create_date: Int!
update_date: Int!
isDelete: Int!
code: Int!
name: Int!
type: Int!
description: Int!
parentId: Int!
_all: Int!
}
type OrganizeMinAggregate {
id: String
create_date: DateTime
update_date: DateTime
isDelete: Boolean
code: String
name: String
type: OrganizeType
description: String
parentId: String
}
type OrganizeMaxAggregate {
id: String
create_date: DateTime
update_date: DateTime
isDelete: Boolean
code: String
name: String
type: OrganizeType
description: String
parentId: String
}
type AggregateOrganize {
_count: OrganizeCountAggregate
_min: OrganizeMinAggregate
_max: OrganizeMaxAggregate
}
type OrganizeGroupBy {
id: String!
create_date: DateTime!
update_date: DateTime!
isDelete: Boolean!
code: String!
name: String!
type: OrganizeType!
description: String
parentId: String
_count: OrganizeCountAggregate
_min: OrganizeMinAggregate
_max: OrganizeMaxAggregate
}
type AffectedRows {
count: Int!
}
type PersonCountAggregate {
id: Int!
create_date: Int!
update_date: Int!
isDelete: Int!
code: Int!
name: Int!
avatar: Int!
birthday: Int!
mobile: Int!
sex: Int!
status: Int!
description: Int!
_all: Int!
}
type PersonMinAggregate {
id: String
create_date: DateTime
update_date: DateTime
isDelete: Boolean
code: String
name: String
avatar: String
birthday: DateTime
mobile: String
sex: SexType
status: PersonStatus
description: String
}
type PersonMaxAggregate {
id: String
create_date: DateTime
update_date: DateTime
isDelete: Boolean
code: String
name: String
avatar: String
birthday: DateTime
mobile: String
sex: SexType
status: PersonStatus
description: String
}
type AggregatePerson {
_count: PersonCountAggregate
_min: PersonMinAggregate
_max: PersonMaxAggregate
}
type PersonGroupBy {
id: String!
create_date: DateTime!
update_date: DateTime!
isDelete: Boolean!
code: String!
name: String
avatar: String
birthday: DateTime
mobile: String
sex: SexType
status: PersonStatus
description: String
_count: PersonCountAggregate
_min: PersonMinAggregate
_max: PersonMaxAggregate
}
type UserCountAggregate {
id: Int!
create_date: Int!
update_date: Int!
isDelete: Int!
username: Int!
email: Int!
role: Int!
RFID: Int!
description: Int!
expired: Int!
status: Int!
_all: Int!
}
type UserAvgAggregate {
expired: Float
}
type UserSumAggregate {
expired: Float
}
type UserMinAggregate {
id: String
create_date: DateTime
update_date: DateTime
isDelete: Boolean
username: String
email: String
role: Role
RFID: String
description: String
expired: Float
status: UserStatus
}
type UserMaxAggregate {
id: String
create_date: DateTime
update_date: DateTime
isDelete: Boolean
username: String
email: String
role: Role
RFID: String
description: String
expired: Float
status: UserStatus
}
type AggregateUser {
_count: UserCountAggregate
_avg: UserAvgAggregate
_sum: UserSumAggregate
_min: UserMinAggregate
_max: UserMaxAggregate
}
type UserGroupBy {
id: String!
create_date: DateTime!
update_date: DateTime!
isDelete: Boolean!
username: String!
email: String!
role: Role!
RFID: String
description: String
expired: Float
status: UserStatus!
_count: UserCountAggregate
_avg: UserAvgAggregate
_sum: UserSumAggregate
_min: UserMinAggregate
_max: UserMaxAggregate
}
type UserGroupCountAggregate {
id: Int!
create_date: Int!
update_date: Int!
isDelete: Int!
code: Int!
name: Int!
description: Int!
_all: Int!
}
type UserGroupMinAggregate {
id: String
create_date: DateTime
update_date: DateTime
isDelete: Boolean
code: String
name: String
description: String
}
type UserGroupMaxAggregate {
id: String
create_date: DateTime
update_date: DateTime
isDelete: Boolean
code: String
name: String
description: String
}
type AggregateUserGroup {
_count: UserGroupCountAggregate
_min: UserGroupMinAggregate
_max: UserGroupMaxAggregate
}
type UserGroupGroupBy {
id: String!
create_date: DateTime!
update_date: DateTime!
isDelete: Boolean!
code: String!
name: String!
description: String
_count: UserGroupCountAggregate
_min: UserGroupMinAggregate
_max: UserGroupMaxAggregate
}
type ModuleCountAggregate {
id: Int!
create_date: Int!
update_date: Int!
isDelete: Int!
code: Int!
name: Int!
path: Int!
description: Int!
enable: Int!
_all: Int!
}
type ModuleMinAggregate {
id: String
create_date: DateTime
update_date: DateTime
isDelete: Boolean
code: String
name: String
path: String
description: String
enable: Boolean
}
type ModuleMaxAggregate {
id: String
create_date: DateTime
update_date: DateTime
isDelete: Boolean
code: String
name: String
path: String
description: String
enable: Boolean
}
type AggregateModule {
_count: ModuleCountAggregate
_min: ModuleMinAggregate
_max: ModuleMaxAggregate
}
type ModuleGroupBy {
id: String!
create_date: DateTime!
update_date: DateTime!
isDelete: Boolean!
code: String!
name: String!
path: String
description: String
enable: Boolean!
_count: ModuleCountAggregate
_min: ModuleMinAggregate
_max: ModuleMaxAggregate
}
type MenuCountAggregate {
id: Int!
create_date: Int!
update_date: Int!