video_comment.php 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  1. <?php
  2. $status = Dever::config('base')->status;
  3. return array
  4. (
  5. # 表名
  6. 'name' => 'video_comment',
  7. # 显示给用户看的名称
  8. 'lang' => '留言视频',
  9. 'order' => 100,
  10. 'menu' => false,
  11. # 数据结构
  12. 'struct' => array
  13. (
  14. 'id' => array
  15. (
  16. 'type' => 'int-11',
  17. 'name' => 'ID',
  18. 'default' => '',
  19. 'desc' => '',
  20. 'match' => 'is_numeric',
  21. 'list' => true,
  22. ),
  23. 'info_id' => array
  24. (
  25. 'type' => 'int-11',
  26. 'name' => '合集',
  27. 'default' => '',
  28. 'desc' => '合集',
  29. 'match' => 'is_numeric',
  30. 'update' => 'hidden',
  31. 'value' => Dever::input('search_option_info_id')
  32. ),
  33. 'content_id' => array
  34. (
  35. 'type' => 'int-11',
  36. 'name' => '合集内容id',
  37. 'default' => '',
  38. 'desc' => '合集内容id',
  39. 'match' => 'is_numeric',
  40. 'update' => 'hidden',
  41. 'value' => Dever::input('search_option_content_id')
  42. ),
  43. 'name' => array
  44. (
  45. 'type' => 'varchar-80',
  46. 'name' => '标题',
  47. 'default' => '',
  48. 'desc' => '标题',
  49. 'match' => 'is_string',
  50. 'update' => 'text',
  51. 'list' => true,
  52. 'search' => 'fulltext',
  53. //增加预览
  54. 'preview' => true,
  55. ),
  56. 'desc' => array
  57. (
  58. 'type' => 'varchar-500',
  59. 'name' => '摘要-不填不显示',
  60. 'default' => '',
  61. 'desc' => '摘要',
  62. 'match' => 'option',
  63. 'update' => 'textarea',
  64. ),
  65. 'pic' => array
  66. (
  67. 'type' => 'varchar-150',
  68. 'name' => '封面图-图片尺寸750*422px或等比尺寸,上传大小不能超过2M,支持JPG、PNG、GIF格式,建议上传JPG格式',
  69. 'default' => '',
  70. 'desc' => '封面图',
  71. 'match' => 'option',
  72. 'update' => 'image',
  73. 'key' => '1',
  74. 'place' => '750*422',
  75. ),
  76. 'video' => array
  77. (
  78. 'type' => 'varchar-800',
  79. 'name' => '上传视频-视频格式mp4,上传大小不能超过4G',
  80. 'default' => '',
  81. 'desc' => '上传点播视频',
  82. 'match' => 'is_string',
  83. 'update' => 'upload',
  84. 'key' => '3',
  85. 'place' => '150',
  86. 'upload' => 'qiniu',
  87. 'large' => true,
  88. //不覆盖原文件,生成新文件
  89. 'cover' => 2,
  90. ),
  91. 'video_info' => array
  92. (
  93. 'type' => 'text-255',
  94. 'name' => '视频信息',
  95. 'default' => '',
  96. 'desc' => '视频信息',
  97. 'match' => 'is_string',
  98. ),
  99. 'udate' => array
  100. (
  101. 'type' => 'int-11',
  102. 'name' => '更新时间',
  103. 'match' => array('is_numeric', time()),
  104. 'desc' => '',
  105. ),
  106. 'status' => array
  107. (
  108. 'type' => 'int-11',
  109. 'name' => '发布状态',
  110. 'default' => '1',
  111. 'desc' => '发布状态',
  112. 'match' => 'is_numeric',
  113. //'update' => 'select',
  114. 'option' => $status,
  115. 'search' => 'select',
  116. 'list' => true,
  117. 'edit' => true,
  118. ),
  119. 'reorder' => array
  120. (
  121. 'type' => 'int-11',
  122. 'name' => '排序(数值越大越靠前)',
  123. 'default' => '1',
  124. 'desc' => '请输入排序',
  125. 'match' => 'option',
  126. //'update' => 'text',
  127. 'search' => 'order',
  128. 'list' => true,
  129. 'order' => 'desc',
  130. 'edit' => true,
  131. ),
  132. 'state' => array
  133. (
  134. 'type' => 'tinyint-1',
  135. 'name' => '状态',
  136. 'default' => '1',
  137. 'desc' => '请选择状态',
  138. 'match' => 'is_numeric',
  139. ),
  140. 'cdate' => array
  141. (
  142. 'type' => 'int-11',
  143. 'name' => '录入时间',
  144. 'match' => array('is_numeric', time()),
  145. 'desc' => '',
  146. # 只有insert时才生效
  147. 'insert' => true,
  148. ),
  149. ),
  150. # 管理功能
  151. 'manage' => array
  152. (
  153. ),
  154. # request 请求接口定义
  155. 'request' => array
  156. (
  157. 'getAll' => array
  158. (
  159. # 匹配的正则或函数 选填项
  160. 'option' => array
  161. (
  162. 'info_id' => 'yes',
  163. 'content_id' => 'yes',
  164. 'state' => 1,
  165. ),
  166. 'type' => 'all',
  167. 'order' => array('reorder' => 'desc', 'id' => 'desc'),
  168. 'col' => '*',
  169. ),
  170. ),
  171. );