video.php 4.5 KB

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