struct.go 4.3 KB

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