struct.go 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. package approve_former
  2. type Node struct {
  3. ID string `json:"id"`
  4. Name string `json:"name"`
  5. Type string `json:"type"`
  6. Props Props `json:"props"`
  7. Children *Node `json:"children,omitempty"`
  8. Branchs []Branch `json:"branchs,omitempty"`
  9. ParentID string `json:"ParentID,omitempty"`
  10. Subjects []interface{} `json:"subjects,omitempty"`
  11. Error bool `json:"error"`
  12. NodeType int `json:"nodeType,omitempty"`
  13. Priority int `json:"priorityLevel,omitempty"`
  14. }
  15. type Props struct {
  16. AssignedUser []UserRole `json:"assignedUser,omitempty"`
  17. FormPerms []FormPerm `json:"formPerms,omitempty"`
  18. AssignedType string `json:"assignedType,omitempty"`
  19. Mode string `json:"mode,omitempty"`
  20. Sign bool `json:"sign,omitempty"`
  21. Nobody Nobody `json:"nobody,omitempty"`
  22. TimeLimit TimeLimit `json:"timeLimit,omitempty"`
  23. AssignedRole []UserRole `json:"assignedRole,omitempty"`
  24. SelfSelect SelfSelect `json:"selfSelect,omitempty"`
  25. LeaderTop LeaderTop `json:"leaderTop,omitempty"`
  26. Leader Leader `json:"leader,omitempty"`
  27. Role []interface{} `json:"role,omitempty"`
  28. Refuse Refuse `json:"refuse,omitempty"`
  29. FormUser string `json:"formUser,omitempty"`
  30. PassHttp HTTPRequest `json:"passHttp,omitempty"`
  31. RejectHttp HTTPRequest `json:"rejectHttp,omitempty"`
  32. ShouldAdd bool `json:"shouldAdd,omitempty"`
  33. CCSelfSelectFlag int `json:"ccSelfSelectFlag,omitempty"`
  34. }
  35. type UserRole struct {
  36. Type string `json:"type"`
  37. RoleCode string `json:"roleCode,omitempty"`
  38. Name string `json:"name"`
  39. ID string `json:"id"`
  40. SubjectID string `json:"subjectId,omitempty"`
  41. }
  42. type FormPerm struct {
  43. ID string `json:"id"`
  44. Title string `json:"title"`
  45. Required bool `json:"required"`
  46. Perm string `json:"perm"`
  47. }
  48. type Nobody struct {
  49. Handler string `json:"handler"`
  50. AssignedUser []UserRole `json:"assignedUser,omitempty"`
  51. AssignedRole []UserRole `json:"assignedRole,omitempty"`
  52. }
  53. type TimeLimit struct {
  54. Timeout struct {
  55. Unit string `json:"unit"`
  56. Value int `json:"value"`
  57. } `json:"timeout"`
  58. Handler struct {
  59. Type string `json:"type"`
  60. Notify struct {
  61. Once bool `json:"once"`
  62. Hour int `json:"hour"`
  63. } `json:"notify"`
  64. } `json:"handler"`
  65. }
  66. type SelfSelect struct {
  67. Multiple bool `json:"multiple"`
  68. }
  69. type LeaderTop struct {
  70. EndCondition string `json:"endCondition"`
  71. EndLevel int `json:"endLevel"`
  72. }
  73. type Leader struct {
  74. Level int `json:"level"`
  75. }
  76. type Refuse struct {
  77. Type string `json:"type"`
  78. Target string `json:"target"`
  79. }
  80. type HTTPRequest struct {
  81. Method string `json:"method"`
  82. URL string `json:"url"`
  83. Headers []HTTPParam `json:"headers"`
  84. ContentType string `json:"contentType"`
  85. Params []HTTPParam `json:"params"`
  86. Retry int `json:"retry"`
  87. HandlerByScript bool `json:"handlerByScript"`
  88. Success string `json:"success"`
  89. Fail string `json:"fail"`
  90. }
  91. type HTTPParam struct {
  92. Name string `json:"name"`
  93. IsField bool `json:"isField"`
  94. Value string `json:"value"`
  95. }
  96. type Branch struct {
  97. ID string `json:"id"`
  98. Name string `json:"name"`
  99. Type string `json:"type"`
  100. Props Props `json:"props"`
  101. Children *Node `json:"children"`
  102. CondGroup *CondGroup `json:"condGroup,omitempty"`
  103. }
  104. type CondGroup struct {
  105. Type string `json:"type"`
  106. Items []CondItem `json:"items"`
  107. }
  108. type CondItem struct {
  109. ShowType int `json:"showType"`
  110. ColumnID string `json:"columnId"`
  111. Type int `json:"type"`
  112. ShowName string `json:"showName"`
  113. OptType string `json:"optType"`
  114. Zdy1 string `json:"zdy1"`
  115. Opt1 string `json:"opt1"`
  116. Zdy2 string `json:"zdy2"`
  117. Opt2 string `json:"opt2"`
  118. ColumnDbName string `json:"columnDbname"`
  119. ColumnType string `json:"columnType"`
  120. FieldID string `json:"fieldId"`
  121. Operator string `json:"operator"`
  122. RightValue string `json:"rightValue"`
  123. }