wdXmlSchemas.js 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. var tf = ["true", "false"]
  2. var ft = ["false", "true"];
  3. var objectType = ["number", "boolean", "string", "text", "content", "time", "picture", "manage"];
  4. var paramNames = ["objClass", "object", "retName", "process"];
  5. var serviceTypes = ["view", "update", "delete", "change"];
  6. var functionNames = ["search", "info", "baseInfo", "miniInfo", "add", "update", "updateBaseInfo", "save", "submit", "submitConfirm", "delete", "change", "changeBaseInfo", "changeSave", "changeSubmit", "changeSubmitConfirm", "check", "changeCheck", "changeCheckBaseInfo", "enableSubmit", "enableSubmitConfirm", "disableSubmit", "disableSubmitConfirm", "initAdd", "initSubmit", "initSubmitConfirm"];
  7. var sqlParamType = ["char"];
  8. var sqlScope = ["request"];
  9. var sqlTypes=["select"];
  10. var wdXmlSchemas = {
  11. //services
  12. services: {
  13. attrs: {
  14. business: null
  15. }
  16. },
  17. service: {
  18. attrs: {
  19. name: null,
  20. desc: null,
  21. type: serviceTypes,
  22. authorizable: tf,
  23. "public": tf,
  24. recall: ft
  25. }
  26. },
  27. param: {
  28. attrs: {
  29. name: paramNames,
  30. value: null
  31. }
  32. },
  33. //objects
  34. objects: {
  35. attrs: {
  36. business: null
  37. }
  38. },
  39. object: {
  40. attrs: {
  41. name: null,
  42. objClass: null,
  43. desc: null,
  44. children: null
  45. }
  46. },
  47. field: {
  48. attrs: {
  49. key: tf,
  50. editable: tf,
  51. name: null,
  52. desc: null,
  53. objectId: tf,
  54. type: objectType,
  55. codebook: null,
  56. width: null,
  57. keywordNo: null,
  58. body: tf,
  59. display: null,
  60. thumbnail: null,
  61. }
  62. },
  63. "function": {
  64. attrs: {
  65. name: functionNames,
  66. desc: null,
  67. service: null,
  68. dest: null,
  69. }
  70. },
  71. //codebook
  72. codebooks: {
  73. attrs: {
  74. business: null
  75. }
  76. },
  77. codebook: {
  78. attrs: {name:null}
  79. },
  80. //sql
  81. sqls: {
  82. attrs: {
  83. business: null
  84. }
  85. },
  86. sql: {
  87. attrs: {
  88. name: null,
  89. type: sqlTypes,
  90. }
  91. },
  92. statement: {},
  93. param: {
  94. attrs: {
  95. name: null,
  96. type: sqlParamType,
  97. scope: sqlScope,
  98. nullable: tf
  99. }
  100. },
  101. where: {
  102. attr: {
  103. name: null
  104. }
  105. },
  106. orderby: {
  107. attrs: {
  108. value: null,
  109. asc: tf
  110. }
  111. }
  112. }
  113. function getXmlSchemas(){
  114. return JSON.parse(JSON.stringify(wdXmlSchemas));
  115. }