struct.go 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. package client
  2. type XmlApplication struct {
  3. ApplicationName string `xml:"name,attr"`
  4. PackageName string `xml:"packagename,attr"`
  5. Desc string `xml:"desc,attr"`
  6. Controllers XmlControllers `xml:"controllers"`
  7. Tables XmlTables `xml:"tables"`
  8. Beans XmlBeans `xml:"beans"`
  9. }
  10. type XmlControllers struct {
  11. ControllerList []XmlController `xml:"controller"`
  12. }
  13. type XmlController struct {
  14. Name string `xml:"name,attr"`
  15. Desc string `xml:"desc,attr"`
  16. Apis []XmlApi `xml:"api"`
  17. ApplicationName string `xml:"-"`
  18. }
  19. type XmlApi struct {
  20. Name string `xml:"name,attr"`
  21. Desc string `xml:"desc,attr"`
  22. Method string `xml:"method,attr"`
  23. ParamList []XmlApiParam `xml:"param"`
  24. Return XmlReturn `xml:"return"`
  25. }
  26. type XmlApiParam struct {
  27. Name string `xml:"name,attr"`
  28. TransType string `xml:"trans-type,attr"`
  29. Type string `xml:"type,attr"`
  30. Desc string `xml:"desc,attr"`
  31. Ref string `xml:"ref,attr"`
  32. Must bool `xml:"must,attr"`
  33. DefaultValue string `xml:"default-value,attr"`
  34. }
  35. type XmlReturn struct {
  36. Success XmlSuccess `xml:"success"`
  37. Failure XmlFailure `xml:"failure"`
  38. }
  39. type XmlSuccess struct {
  40. Ref string `xml:"ref,attr"`
  41. Desc string `xml:"desc,attr"`
  42. }
  43. type XmlFailure struct {
  44. Ref string `xml:"ref,attr"`
  45. Desc string `xml:"desc,attr"`
  46. }
  47. //
  48. type XmlTables struct {
  49. TableList []XmlTable `xml:"table"`
  50. }
  51. type XmlTable struct {
  52. Name string `xml:"name,attr"`
  53. Desc string `xml:"desc,attr"`
  54. ImportDateTime bool
  55. ColumnList []XmlColumn `xml:"column"`
  56. }
  57. type XmlColumn struct {
  58. Name string `xml:"name,attr"`
  59. Caption string `xml:"caption,attr"`
  60. IsNull bool `xml:"isNull,attr"`
  61. IsPK bool `xml:"isPK,attr"`
  62. IsUnique bool `xml:"isUnique,attr"`
  63. Size int `xml:"size,attr"`
  64. Type string `xml:"type,attr"`
  65. DbType string `xml:"dbtype,attr"`
  66. DefaultValue string `xml:"default-value,attr"`
  67. }
  68. type XmlBeans struct {
  69. BeanList []XmlBean `xml:"bean"`
  70. }
  71. type XmlBean struct {
  72. Name string `xml:"name,attr"`
  73. Desc string `xml:"desc,attr"`
  74. Inher string `xml:"inher,attr"`
  75. ImportDateTime bool
  76. PropList []XmlProp `xml:"prop"`
  77. }
  78. type XmlProp struct {
  79. Name string `xml:"name,attr"`
  80. Caption string `xml:"caption,attr"`
  81. Type string `xml:"type,attr"`
  82. DefaultValue string `xml:"default-value,attr"`
  83. }