audio_comment.php 7.0 KB

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