video_comment.php 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236
  1. <?php
  2. $status = Dever::config('base')->status;
  3. $type = array
  4. (
  5. 1 => '座位',
  6. 2 => '弹幕',
  7. );
  8. return array
  9. (
  10. # 表名
  11. 'name' => 'video_comment',
  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. 'desc' => array
  90. (
  91. 'type' => 'varchar-500',
  92. 'name' => '摘要-不填不显示',
  93. 'default' => '',
  94. 'desc' => '摘要',
  95. 'match' => 'option',
  96. 'update' => 'textarea',
  97. ),
  98. 'pic' => array
  99. (
  100. 'type' => 'varchar-150',
  101. 'name' => '封面图-图片尺寸750*422px或等比尺寸,上传大小不能超过2M,支持JPG、PNG、GIF格式,建议上传JPG格式',
  102. 'default' => '',
  103. 'desc' => '封面图',
  104. 'match' => 'option',
  105. 'update' => 'image',
  106. 'key' => '1',
  107. 'place' => '750*422',
  108. ),
  109. 'video' => array
  110. (
  111. 'type' => 'varchar-800',
  112. 'name' => '上传视频-视频格式mp4,上传大小不能超过4G',
  113. 'default' => '',
  114. 'desc' => '上传点播视频',
  115. 'match' => 'is_string',
  116. 'update' => 'upload',
  117. 'key' => '5',
  118. 'place' => '150',
  119. 'upload' => 'yun',
  120. 'large' => true,
  121. ),
  122. 'video_info' => array
  123. (
  124. 'type' => 'text-255',
  125. 'name' => '视频信息',
  126. 'default' => '',
  127. 'desc' => '视频信息',
  128. 'match' => 'is_string',
  129. ),
  130. 'content' => array
  131. (
  132. 'type' => 'text-255',
  133. 'name' => '内容',
  134. 'default' => '',
  135. 'desc' => '请输入内容',
  136. 'match' => 'is_string',
  137. 'update' => 'editor',
  138. 'key' => '1',
  139. ),
  140. 'udate' => array
  141. (
  142. 'type' => 'int-11',
  143. 'name' => '更新时间',
  144. 'match' => array('is_numeric', time()),
  145. 'desc' => '',
  146. ),
  147. 'status' => array
  148. (
  149. 'type' => 'int-11',
  150. 'name' => '发布状态',
  151. 'default' => '1',
  152. 'desc' => '发布状态',
  153. 'match' => 'is_numeric',
  154. //'update' => 'select',
  155. 'option' => $status,
  156. 'search' => 'select',
  157. 'list' => true,
  158. 'edit' => true,
  159. ),
  160. 'reorder' => array
  161. (
  162. 'type' => 'int-11',
  163. 'name' => '排序(数值越大越靠前)',
  164. 'default' => '1',
  165. 'desc' => '请输入排序',
  166. 'match' => 'option',
  167. //'update' => 'text',
  168. 'search' => 'order',
  169. 'list' => true,
  170. 'order' => 'desc',
  171. 'edit' => true,
  172. ),
  173. 'state' => array
  174. (
  175. 'type' => 'tinyint-1',
  176. 'name' => '状态',
  177. 'default' => '1',
  178. 'desc' => '请选择状态',
  179. 'match' => 'is_numeric',
  180. ),
  181. 'cdate' => array
  182. (
  183. 'type' => 'int-11',
  184. 'name' => '录入时间',
  185. 'match' => array('is_numeric', time()),
  186. 'desc' => '',
  187. # 只有insert时才生效
  188. 'insert' => true,
  189. ),
  190. ),
  191. # 管理功能
  192. 'manage' => array
  193. (
  194. ),
  195. # request 请求接口定义
  196. 'request' => array
  197. (
  198. 'getAll' => array
  199. (
  200. # 匹配的正则或函数 选填项
  201. 'option' => array
  202. (
  203. 'info_id' => 'yes',
  204. 'content_id' => 'yes',
  205. 'state' => 1,
  206. ),
  207. 'type' => 'all',
  208. 'order' => array('reorder' => 'desc', 'id' => 'desc'),
  209. 'col' => '*',
  210. ),
  211. ),
  212. );