video.php 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  1. <?php
  2. $status = Dever::config('base')->status;
  3. return array
  4. (
  5. # 表名
  6. 'name' => 'video',
  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' => 'option',
  50. 'update' => 'text',
  51. 'list' => true,
  52. 'search' => 'fulltext',
  53. //增加预览
  54. 'preview' => true,
  55. ),
  56. 'pic' => array
  57. (
  58. 'type' => 'varchar-150',
  59. 'name' => '封面图-图片尺寸750*1386px或等比尺寸,上传大小不能超过2M,支持JPG、PNG、GIF格式,建议上传JPG格式',
  60. 'default' => '',
  61. 'desc' => '封面图',
  62. 'match' => 'option',
  63. 'update' => 'image',
  64. 'key' => '1',
  65. 'place' => '750*1386',
  66. ),
  67. 'video' => array
  68. (
  69. 'type' => 'varchar-800',
  70. 'name' => '上传视频-视频格式mp4,上传大小不能超过4G',
  71. 'default' => '',
  72. 'desc' => '上传点播视频',
  73. 'match' => 'is_string',
  74. 'update' => 'upload',
  75. 'key' => '3',
  76. 'place' => '150',
  77. 'upload' => 'qiniu',
  78. 'large' => true,
  79. //不覆盖原文件,生成新文件
  80. 'cover' => 2,
  81. ),
  82. 'video_info' => array
  83. (
  84. 'type' => 'text-255',
  85. 'name' => '视频信息',
  86. 'default' => '',
  87. 'desc' => '视频信息',
  88. 'match' => 'is_string',
  89. ),
  90. 'udate' => array
  91. (
  92. 'type' => 'int-11',
  93. 'name' => '更新时间',
  94. 'match' => array('is_numeric', time()),
  95. 'desc' => '',
  96. ),
  97. 'status' => array
  98. (
  99. 'type' => 'int-11',
  100. 'name' => '发布状态',
  101. 'default' => '1',
  102. 'desc' => '发布状态',
  103. 'match' => 'is_numeric',
  104. //'update' => 'select',
  105. 'option' => $status,
  106. 'search' => 'select',
  107. 'list' => true,
  108. 'edit' => true,
  109. ),
  110. 'reorder' => array
  111. (
  112. 'type' => 'int-11',
  113. 'name' => '排序(数值越大越靠前)',
  114. 'default' => '1',
  115. 'desc' => '请输入排序',
  116. 'match' => 'option',
  117. //'update' => 'text',
  118. 'search' => 'order',
  119. 'list' => true,
  120. 'order' => 'desc',
  121. 'edit' => true,
  122. ),
  123. 'state' => array
  124. (
  125. 'type' => 'tinyint-1',
  126. 'name' => '状态',
  127. 'default' => '1',
  128. 'desc' => '请选择状态',
  129. 'match' => 'is_numeric',
  130. ),
  131. 'cdate' => array
  132. (
  133. 'type' => 'int-11',
  134. 'name' => '录入时间',
  135. 'match' => array('is_numeric', time()),
  136. 'desc' => '',
  137. # 只有insert时才生效
  138. 'insert' => true,
  139. ),
  140. ),
  141. # 管理功能
  142. 'manage' => array
  143. (
  144. ),
  145. # request 请求接口定义
  146. 'request' => array
  147. (
  148. 'getAll' => array
  149. (
  150. # 匹配的正则或函数 选填项
  151. 'option' => array
  152. (
  153. 'info_id' => 'yes',
  154. 'content_id' => 'yes',
  155. 'state' => 1,
  156. ),
  157. 'type' => 'all',
  158. 'order' => array('reorder' => 'desc', 'id' => 'desc'),
  159. 'col' => '*',
  160. ),
  161. ),
  162. );