channel_api_response.php 2.9 KB

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