audio_comment.php 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  1. <?php
  2. $status = Dever::config('base')->status;
  3. return array
  4. (
  5. # 表名
  6. 'name' => 'audio_comment',
  7. # 显示给用户看的名称
  8. 'lang' => '留言音频',
  9. 'order' => 100,
  10. 'menu' => false,
  11. 'end' => array
  12. (
  13. 'insert' => 'collection/lib/content.updateTypeId',
  14. 'update' => 'collection/lib/content.updateTypeId',
  15. ),
  16. # 数据结构
  17. 'struct' => array
  18. (
  19. 'id' => array
  20. (
  21. 'type' => 'int-11',
  22. 'name' => 'ID',
  23. 'default' => '',
  24. 'desc' => '',
  25. 'match' => 'is_numeric',
  26. 'list' => true,
  27. ),
  28. 'info_id' => array
  29. (
  30. 'type' => 'int-11',
  31. 'name' => '合集',
  32. 'default' => '',
  33. 'desc' => '合集',
  34. 'match' => 'is_numeric',
  35. 'update' => 'hidden',
  36. 'value' => Dever::input('search_option_info_id')
  37. ),
  38. 'content_id' => array
  39. (
  40. 'type' => 'int-11',
  41. 'name' => '合集内容id',
  42. 'default' => '',
  43. 'desc' => '合集内容id',
  44. 'match' => 'is_numeric',
  45. 'update' => 'hidden',
  46. 'value' => Dever::input('search_option_content_id')
  47. ),
  48. 'name' => array
  49. (
  50. 'type' => 'varchar-80',
  51. 'name' => '标题',
  52. 'default' => '',
  53. 'desc' => '标题',
  54. 'match' => 'is_string',
  55. 'update' => 'text',
  56. 'list' => true,
  57. 'search' => 'fulltext',
  58. //增加预览
  59. 'preview' => true,
  60. ),
  61. 'desc' => array
  62. (
  63. 'type' => 'varchar-500',
  64. 'name' => '摘要-不填不显示',
  65. 'default' => '',
  66. 'desc' => '摘要',
  67. 'match' => 'option',
  68. 'update' => 'textarea',
  69. ),
  70. 'pic' => array
  71. (
  72. 'type' => 'varchar-150',
  73. 'name' => '封面图-图片尺寸750*422px或等比尺寸,上传大小不能超过2M,支持JPG、PNG、GIF格式,建议上传JPG格式',
  74. 'default' => '',
  75. 'desc' => '封面图',
  76. 'match' => 'option',
  77. 'update' => 'image',
  78. 'key' => '1',
  79. 'place' => '750*422',
  80. ),
  81. 'audio' => array
  82. (
  83. 'type' => 'varchar-800',
  84. 'name' => '上传音频-格式mp3,上传大小不能超过100M',
  85. 'default' => '',
  86. 'desc' => '上传音频',
  87. 'match' => 'is_string',
  88. 'update' => 'upload',
  89. 'key' => '3',
  90. 'place' => '150',
  91. 'upload' => 'qiniu',
  92. 'large' => true,
  93. //不覆盖原文件,生成新文件
  94. 'cover' => 2,
  95. ),
  96. 'audio_info' => array
  97. (
  98. 'type' => 'text-255',
  99. 'name' => '音频信息',
  100. 'default' => '',
  101. 'desc' => '音频信息',
  102. 'match' => 'is_string',
  103. ),
  104. 'udate' => array
  105. (
  106. 'type' => 'int-11',
  107. 'name' => '更新时间',
  108. 'match' => array('is_numeric', time()),
  109. 'desc' => '',
  110. ),
  111. 'status' => array
  112. (
  113. 'type' => 'int-11',
  114. 'name' => '发布状态',
  115. 'default' => '1',
  116. 'desc' => '发布状态',
  117. 'match' => 'is_numeric',
  118. //'update' => 'select',
  119. 'option' => $status,
  120. 'search' => 'select',
  121. 'list' => true,
  122. 'edit' => true,
  123. ),
  124. 'reorder' => array
  125. (
  126. 'type' => 'int-11',
  127. 'name' => '排序(数值越大越靠前)',
  128. 'default' => '1',
  129. 'desc' => '请输入排序',
  130. 'match' => 'option',
  131. //'update' => 'text',
  132. 'search' => 'order',
  133. 'list' => true,
  134. 'order' => 'desc',
  135. 'edit' => true,
  136. ),
  137. 'state' => array
  138. (
  139. 'type' => 'tinyint-1',
  140. 'name' => '状态',
  141. 'default' => '1',
  142. 'desc' => '请选择状态',
  143. 'match' => 'is_numeric',
  144. ),
  145. 'cdate' => array
  146. (
  147. 'type' => 'int-11',
  148. 'name' => '录入时间',
  149. 'match' => array('is_numeric', time()),
  150. 'desc' => '',
  151. # 只有insert时才生效
  152. 'insert' => true,
  153. ),
  154. ),
  155. # 管理功能
  156. 'manage' => array
  157. (
  158. ),
  159. # request 请求接口定义
  160. 'request' => array
  161. (
  162. 'getAll' => array
  163. (
  164. # 匹配的正则或函数 选填项
  165. 'option' => array
  166. (
  167. 'info_id' => 'yes',
  168. 'content_id' => 'yes',
  169. 'state' => 1,
  170. ),
  171. 'type' => 'all',
  172. 'order' => array('reorder' => 'desc', 'id' => 'desc'),
  173. 'col' => '*',
  174. ),
  175. ),
  176. );