channel_api_response.php 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. <?php
  2. $type = array
  3. (
  4. 1 => '数值型',
  5. 2 => '字符串型',
  6. );
  7. $sign = array
  8. (
  9. 1 => '参与签名',
  10. 2 => '不参与签名',
  11. );
  12. return array
  13. (
  14. # 表名
  15. 'name' => 'channel_api_response',
  16. # 显示给用户看的名称
  17. 'lang' => '响应参数配置',
  18. # 是否显示在后台菜单
  19. 'order' => -10,
  20. 'menu' => false,
  21. 'check' => 'key',
  22. # 数据结构
  23. 'struct' => array
  24. (
  25. 'id' => array
  26. (
  27. 'type' => 'int-11',
  28. 'name' => 'ID',
  29. 'default' => '',
  30. 'desc' => '',
  31. 'match' => 'is_numeric',
  32. 'list' => true,
  33. 'order' => 'desc',
  34. ),
  35. 'api_id' => array
  36. (
  37. 'type' => 'int-11',
  38. 'name' => '接口id',
  39. 'default' => '1',
  40. 'desc' => '接口id',
  41. 'match' => 'is_numeric',
  42. 'update' => 'hidden',
  43. 'value' => Dever::input('search_option_api_id'),
  44. ),
  45. 'name' => array
  46. (
  47. 'type' => 'varchar-150',
  48. 'name' => '参数名称',
  49. 'default' => '',
  50. 'desc' => '字段名称',
  51. 'match' => 'is_string',
  52. 'update' => 'text',
  53. 'search' => 'fulltext',
  54. 'list' => true,
  55. ),
  56. 'key' => array
  57. (
  58. 'type' => 'varchar-150',
  59. 'name' => '参数标识',
  60. 'default' => '',
  61. 'desc' => '参数标识',
  62. 'match' => 'is_string',
  63. 'update' => 'text',
  64. 'search' => 'fulltext',
  65. 'list' => true,
  66. ),
  67. 'default' => array
  68. (
  69. 'type' => 'varchar-300',
  70. 'name' => '默认值-' . Dever::config('base', 'middleware')->request_desc,
  71. 'default' => '',
  72. 'desc' => '默认值',
  73. 'match' => 'is_string',
  74. 'update' => 'text',
  75. 'search' => 'fulltext',
  76. 'list' => true,
  77. ),
  78. 'type' => array
  79. (
  80. 'type' => 'tinyint-1',
  81. 'name' => '参数类型',
  82. 'default' => '1',
  83. 'desc' => '参数类型',
  84. 'match' => 'is_numeric',
  85. 'update' => 'radio',
  86. 'option' => $type,
  87. ),
  88. 'sign' => array
  89. (
  90. 'type' => 'tinyint-1',
  91. 'name' => '是否参与签名',
  92. 'default' => '1',
  93. 'desc' => '是否参与签名',
  94. 'match' => 'is_numeric',
  95. 'update' => 'radio',
  96. 'option' => $sign,
  97. ),
  98. 'reorder' => array
  99. (
  100. 'type' => 'int-11',
  101. 'name' => '排序(数值越大越靠前)',
  102. 'default' => '1',
  103. 'desc' => '请输入排序',
  104. 'match' => 'option',
  105. //'update' => 'text',
  106. 'search' => 'order',
  107. 'list_name' => '排序',
  108. 'list' => true,
  109. 'order' => 'desc',
  110. 'edit' => true,
  111. ),
  112. 'state' => array
  113. (
  114. 'type' => 'tinyint-1',
  115. 'name' => '状态',
  116. 'default' => '1',
  117. 'desc' => '请选择状态',
  118. 'match' => 'is_numeric',
  119. ),
  120. 'cdate' => array
  121. (
  122. 'type' => 'int-11',
  123. 'name' => '录入时间',
  124. 'match' => array('is_numeric', time()),
  125. 'desc' => '',
  126. # 只有insert时才生效
  127. 'insert' => true,
  128. //'search' => 'date',
  129. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  130. ),
  131. ),
  132. 'manage' => array
  133. (
  134. 'insert' => false,
  135. 'edit' => false,
  136. # 自定义快捷新增和编辑
  137. 'button' => array
  138. (
  139. '新增' => array('fast'),
  140. ),
  141. 'list_button' => array
  142. (
  143. 'edit' => array('编辑'),
  144. )
  145. ),
  146. 'request' => array
  147. (
  148. )
  149. );