live.php 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258
  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' => 'live',
  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. 'live' => array
  118. (
  119. 'type' => 'text-255',
  120. 'name' => '直播地址',
  121. 'default' => '',
  122. 'desc' => '直播地址',
  123. 'match' => 'is_string',
  124. 'update' => 'textarea',
  125. ),
  126. 'video' => array
  127. (
  128. 'type' => 'varchar-800',
  129. 'name' => '上传视频-当没有直播的时候,播放该视频',
  130. 'default' => '',
  131. 'desc' => '上传点播视频',
  132. 'match' => 'option',
  133. 'update' => 'upload',
  134. 'key' => '3',
  135. 'place' => '150',
  136. 'upload' => 'yun',
  137. 'large' => true,
  138. 'cover' => 'pic',//封面图字段名
  139. ),
  140. 'pic' => array
  141. (
  142. 'type' => 'varchar-150',
  143. 'name' => '封面图-封面图根据视频自动生成,也可以手动更改,上传大小不能超过2M,支持JPG、PNG、GIF格式,建议上传JPG格式',
  144. 'default' => '',
  145. 'desc' => '封面图',
  146. 'match' => 'option',
  147. 'update' => 'image',
  148. 'key' => '1',
  149. 'place' => '750*422',
  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. );