audio.php 5.9 KB

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