audio_comment.php 7.0 KB

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