audio.php 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241
  1. <?php
  2. $status = Dever::config('base')->status;
  3. return array
  4. (
  5. # 表名
  6. 'name' => 'audio',
  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' => 'option',
  55. 'update' => 'text',
  56. //'list' => true,
  57. 'search' => 'fulltext',
  58. //增加预览
  59. 'preview' => true,
  60. ),
  61. 'singer' => array
  62. (
  63. 'type' => 'varchar-80',
  64. 'name' => '歌手创作人',
  65. 'default' => '',
  66. 'desc' => '歌手创作人',
  67. 'match' => 'option',
  68. 'update' => 'text',
  69. //'list' => true,
  70. //增加预览
  71. 'preview' => true,
  72. ),
  73. 'desc' => array
  74. (
  75. 'type' => 'varchar-500',
  76. 'name' => '摘要-不填不显示',
  77. 'default' => '',
  78. 'desc' => '摘要',
  79. 'match' => 'option',
  80. 'update' => 'textarea',
  81. ),
  82. 'pic' => array
  83. (
  84. 'type' => 'varchar-150',
  85. 'name' => '背景图-图片尺寸750*1386px或等比尺寸,上传大小不能超过2M,支持JPG、PNG、GIF格式,建议上传JPG格式',
  86. 'default' => '',
  87. 'desc' => '背景图',
  88. 'match' => 'option',
  89. 'update' => 'image',
  90. 'key' => '1',
  91. 'place' => '750*1386',
  92. 'list' => 'Dever::load("content/lib/manage.pic", "{pic}")',
  93. ),
  94. 'audio' => array
  95. (
  96. 'type' => 'varchar-800',
  97. 'name' => '上传音频-格式mp3,上传大小不能超过100M',
  98. 'default' => '',
  99. 'desc' => '上传音频',
  100. 'match' => 'is_string',
  101. 'update' => 'upload',
  102. 'key' => '2',
  103. 'place' => '150',
  104. 'upload' => 'qiniu',
  105. 'large' => true,
  106. //不覆盖原文件,生成新文件
  107. 'cover' => 2,
  108. ),
  109. 'audio_info' => array
  110. (
  111. 'type' => 'text-255',
  112. 'name' => '音频信息',
  113. 'default' => '',
  114. 'desc' => '音频信息',
  115. 'match' => 'is_string',
  116. ),
  117. 'color' => array
  118. (
  119. 'type' => 'varchar-10',
  120. 'name' => '歌词文字颜色-默认为黑色',
  121. 'default' => '#000000',
  122. 'desc' => '歌词文字颜色',
  123. 'match' => 'is_string',
  124. 'update' => 'color',
  125. ),
  126. 'atcolor' => array
  127. (
  128. 'type' => 'varchar-10',
  129. 'name' => '当前播放的歌词文字颜色-默认为白色',
  130. 'default' => '#ffffff',
  131. 'desc' => '背景颜色',
  132. 'match' => 'is_string',
  133. 'update' => 'color',
  134. ),
  135. 'lrc' => array
  136. (
  137. 'type' => 'text-255',
  138. 'name' => '歌词内容-传入lrc格式的歌词',
  139. 'default' => '',
  140. 'desc' => '歌词内容',
  141. 'match' => 'is_string',
  142. 'update' => 'editor',
  143. 'key' => '1',
  144. ),
  145. 'udate' => array
  146. (
  147. 'type' => 'int-11',
  148. 'name' => '更新时间',
  149. 'match' => array('is_numeric', time()),
  150. 'desc' => '',
  151. ),
  152. 'status' => array
  153. (
  154. 'type' => 'int-11',
  155. 'name' => '发布状态',
  156. 'default' => '1',
  157. 'desc' => '发布状态',
  158. 'match' => 'is_numeric',
  159. //'update' => 'select',
  160. 'option' => $status,
  161. //'search' => 'select',
  162. //'list' => true,
  163. //'edit' => true,
  164. ),
  165. 'reorder' => array
  166. (
  167. 'type' => 'int-11',
  168. 'name' => '排序(数值越大越靠前)',
  169. 'default' => '1',
  170. 'desc' => '请输入排序',
  171. 'match' => 'option',
  172. //'update' => 'text',
  173. 'search' => 'order',
  174. 'list' => true,
  175. 'order' => 'desc',
  176. 'edit' => true,
  177. ),
  178. 'state' => array
  179. (
  180. 'type' => 'tinyint-1',
  181. 'name' => '状态',
  182. 'default' => '1',
  183. 'desc' => '请选择状态',
  184. 'match' => 'is_numeric',
  185. ),
  186. 'cdate' => array
  187. (
  188. 'type' => 'int-11',
  189. 'name' => '录入时间',
  190. 'match' => array('is_numeric', time()),
  191. 'desc' => '',
  192. # 只有insert时才生效
  193. 'insert' => true,
  194. ),
  195. ),
  196. # 管理功能
  197. 'manage' => array
  198. (
  199. ),
  200. # request 请求接口定义
  201. 'request' => array
  202. (
  203. 'getAll' => array
  204. (
  205. # 匹配的正则或函数 选填项
  206. 'option' => array
  207. (
  208. 'info_id' => 'yes',
  209. 'content_id' => 'yes',
  210. 'state' => 1,
  211. ),
  212. 'type' => 'all',
  213. 'order' => array('reorder' => 'desc', 'id' => 'desc'),
  214. 'col' => '*',
  215. ),
  216. ),
  217. );