audio_content.php 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248
  1. <?php
  2. $status = array
  3. (
  4. 1 => '开启',
  5. 2 => '关闭',
  6. );
  7. $type = array
  8. (
  9. 1 => '收费',
  10. 2 => '免费',
  11. );
  12. $audio_status = array
  13. (
  14. 1 => '未转换',
  15. 2 => '转换中',
  16. 3 => '转换完成',
  17. );
  18. return array
  19. (
  20. # 表名
  21. 'name' => 'audio_content',
  22. # 显示给用户看的名称
  23. 'lang' => '章节管理',
  24. 'menu' => false,
  25. 'end' => array
  26. (
  27. 'insert' => 'content/lib/audio.convert',
  28. 'update' => 'content/lib/audio.convert',
  29. ),
  30. # 数据结构
  31. 'struct' => array
  32. (
  33. 'id' => array
  34. (
  35. 'type' => 'int-11',
  36. 'name' => 'ID',
  37. 'default' => '',
  38. 'desc' => '',
  39. 'match' => 'is_numeric',
  40. 'search' => 'order',
  41. //'list' => true,
  42. ),
  43. 'audio_id' => array
  44. (
  45. 'type' => 'int-11',
  46. 'name' => '课程',
  47. 'default' => '',
  48. 'desc' => '课程',
  49. 'match' => 'is_numeric',
  50. 'update' => 'hidden',
  51. 'value' => Dever::input('search_option_audio_id')
  52. ),
  53. 'name' => array
  54. (
  55. 'type' => 'varchar-80',
  56. 'name' => '标题',
  57. 'default' => '',
  58. 'desc' => '标题',
  59. 'match' => 'is_string',
  60. 'update' => 'text',
  61. 'search' => 'fulltext',
  62. 'list' => true,
  63. ),
  64. 'reorder' => array
  65. (
  66. 'type' => 'int-11',
  67. 'name' => '章节数(数值越小越靠前)',
  68. 'default' => '1',
  69. 'desc' => '请输入排序',
  70. 'match' => 'option',
  71. 'update' => 'text',
  72. 'search' => 'order',
  73. 'list' => true,
  74. 'order' => 'asc',
  75. 'edit' => true,
  76. ),
  77. 'type' => array
  78. (
  79. 'type' => 'int-11',
  80. 'name' => '是否收费',
  81. 'default' => '1',
  82. 'desc' => '是否收费',
  83. 'match' => 'is_numeric',
  84. 'update' => 'radio',
  85. 'option' => $type,
  86. ),
  87. 'desc' => array
  88. (
  89. 'type' => 'varchar-500',
  90. 'name' => '摘要',
  91. 'default' => '',
  92. 'desc' => '摘要',
  93. 'match' => 'is_string',
  94. 'update' => 'textarea',
  95. ),
  96. 'content' => array
  97. (
  98. 'type' => 'text-255',
  99. 'name' => '课程展示内容-排版后显示的内容,可以有图片',
  100. 'default' => '',
  101. 'desc' => '内容',
  102. 'match' => 'option',
  103. 'update' => 'editor',
  104. 'key' => 1,
  105. //'search' => 'fulltext',
  106. //'list' => true,
  107. ),
  108. 'audio_content' => array
  109. (
  110. 'type' => 'text-255',
  111. 'name' => '语音内容-系统自动从中提取文字转成一段语音,多音字请用同音字替代,不显示在前端',
  112. 'default' => '',
  113. 'desc' => '语音内容',
  114. 'match' => 'option',
  115. 'update' => 'editor',
  116. 'key' => 1,
  117. //'search' => 'fulltext',
  118. //'list' => true,
  119. ),
  120. 'audio' => array
  121. (
  122. 'type' => 'varchar-500',
  123. 'name' => '语音文件',
  124. 'default' => '',
  125. 'desc' => '语音文件',
  126. 'match' => 'is_string',
  127. ),
  128. 'ali_request_id' => array
  129. (
  130. 'type' => 'varchar-150',
  131. 'name' => '阿里云请求的request_id',
  132. 'default' => '',
  133. 'desc' => '阿里云请求的request_id',
  134. 'match' => 'is_string',
  135. 'update' => 'text',
  136. ),
  137. 'ali_task_id' => array
  138. (
  139. 'type' => 'varchar-150',
  140. 'name' => '阿里云请求的task_id',
  141. 'default' => '',
  142. 'desc' => '阿里云请求的task_id',
  143. 'match' => 'is_string',
  144. 'update' => 'text',
  145. ),
  146. 'audio_status' => array
  147. (
  148. 'type' => 'int-11',
  149. 'name' => '转换状态',
  150. 'default' => '1',
  151. 'desc' => '转换状态',
  152. 'match' => 'is_numeric',
  153. //'update' => 'radio',
  154. 'option' => $audio_status,
  155. ),
  156. 'status' => array
  157. (
  158. 'type' => 'int-11',
  159. 'name' => '状态',
  160. 'default' => '1',
  161. 'desc' => '状态',
  162. 'match' => 'is_numeric',
  163. 'update' => 'radio',
  164. 'option' => $status,
  165. ),
  166. 'num_add_view' => array
  167. (
  168. 'type' => 'int-11',
  169. 'name' => '学习量基数',
  170. 'default' => '0',
  171. 'desc' => '学习量基数',
  172. 'match' => 'option',
  173. //'update' => 'text',
  174. ),
  175. 'num_view' => array
  176. (
  177. 'type' => 'int-11',
  178. 'name' => '学习量',
  179. 'default' => '0',
  180. 'desc' => '请填写浏览量',
  181. 'match' => 'option',
  182. 'search' => 'order',
  183. 'list' => '{num_view}+{num_add_view}',
  184. ),
  185. 'state' => array
  186. (
  187. 'type' => 'tinyint-1',
  188. 'name' => '状态',
  189. 'default' => '1',
  190. 'desc' => '请选择状态',
  191. 'match' => 'is_numeric',
  192. ),
  193. 'cdate' => array
  194. (
  195. 'type' => 'int-11',
  196. 'name' => '创建时间',
  197. 'match' => array('is_numeric', time()),
  198. 'desc' => '',
  199. # 只有insert时才生效
  200. 'insert' => true,
  201. 'search' => 'date',
  202. //'list' => 'date("Y-m-d H:i:s", {cdate})',
  203. ),
  204. ),
  205. 'manage' => array
  206. (
  207. ),
  208. 'request' => array
  209. (
  210. 'getData' => array
  211. (
  212. # 匹配的正则或函数 选填项
  213. 'option' => array
  214. (
  215. 'audio_id' => 'yes',
  216. 'state' => 1,
  217. 'status' => 1,
  218. ),
  219. 'type' => 'all',
  220. 'order' => array('reorder' => 'asc', 'id' => 'desc'),
  221. 'col' => '*',
  222. ),
  223. ),
  224. );