live.php 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259
  1. <?php
  2. $status = Dever::config('base')->status;
  3. $type = array
  4. (
  5. 1 => '座位模式',
  6. //2 => '弹幕',
  7. );
  8. return array
  9. (
  10. # 表名
  11. 'name' => 'live',
  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. 'live' => array
  128. (
  129. 'type' => 'text-255',
  130. 'name' => '直播地址',
  131. 'default' => '',
  132. 'desc' => '直播地址',
  133. 'match' => 'is_string',
  134. 'update' => 'textarea',
  135. ),
  136. 'video' => array
  137. (
  138. 'type' => 'varchar-800',
  139. 'name' => '上传视频-当没有直播的时候,播放该视频',
  140. 'default' => '',
  141. 'desc' => '上传点播视频',
  142. 'match' => 'option',
  143. 'update' => 'upload',
  144. 'key' => '3',
  145. 'place' => '150',
  146. 'upload' => 'qiniu',
  147. 'large' => true,
  148. //不覆盖原文件,生成新文件
  149. 'cover' => 2,
  150. ),
  151. 'content' => array
  152. (
  153. 'type' => 'text-255',
  154. 'name' => '内容',
  155. 'default' => '',
  156. 'desc' => '请输入内容',
  157. 'match' => 'is_string',
  158. 'update' => 'editor',
  159. 'key' => '1',
  160. ),
  161. 'udate' => array
  162. (
  163. 'type' => 'int-11',
  164. 'name' => '更新时间',
  165. 'match' => array('is_numeric', time()),
  166. 'desc' => '',
  167. ),
  168. 'status' => array
  169. (
  170. 'type' => 'int-11',
  171. 'name' => '发布状态',
  172. 'default' => '1',
  173. 'desc' => '发布状态',
  174. 'match' => 'is_numeric',
  175. //'update' => 'select',
  176. 'option' => $status,
  177. 'search' => 'select',
  178. 'list' => true,
  179. 'edit' => true,
  180. ),
  181. 'reorder' => array
  182. (
  183. 'type' => 'int-11',
  184. 'name' => '排序(数值越大越靠前)',
  185. 'default' => '1',
  186. 'desc' => '请输入排序',
  187. 'match' => 'option',
  188. //'update' => 'text',
  189. 'search' => 'order',
  190. 'list' => true,
  191. 'order' => 'desc',
  192. 'edit' => true,
  193. ),
  194. 'state' => array
  195. (
  196. 'type' => 'tinyint-1',
  197. 'name' => '状态',
  198. 'default' => '1',
  199. 'desc' => '请选择状态',
  200. 'match' => 'is_numeric',
  201. ),
  202. 'cdate' => array
  203. (
  204. 'type' => 'int-11',
  205. 'name' => '录入时间',
  206. 'match' => array('is_numeric', time()),
  207. 'desc' => '',
  208. # 只有insert时才生效
  209. 'insert' => true,
  210. ),
  211. ),
  212. # 管理功能
  213. 'manage' => array
  214. (
  215. ),
  216. # request 请求接口定义
  217. 'request' => array
  218. (
  219. 'getAll' => array
  220. (
  221. # 匹配的正则或函数 选填项
  222. 'option' => array
  223. (
  224. 'info_id' => 'yes',
  225. 'content_id' => 'yes',
  226. 'state' => 1,
  227. ),
  228. 'type' => 'all',
  229. 'order' => array('reorder' => 'desc', 'id' => 'desc'),
  230. 'col' => '*',
  231. ),
  232. ),
  233. );