channel_api_request.php 2.9 KB

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