video.php 4.6 KB

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