video.php 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. <?php
  2. # 定义几个常用的选项
  3. $status = array
  4. (
  5. 1 => '在线',
  6. 2 => '下线',
  7. );
  8. return array
  9. (
  10. # 表名
  11. 'name' => 'video',
  12. # 显示给用户看的名称
  13. 'lang' => '视频管理',
  14. 'order' => 80,
  15. 'menu' => 'main',
  16. 'end' => array
  17. (
  18. //'update' => 'service/lib/manage.video',
  19. //'insert' => 'service/lib/manage.video',
  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. 'search' => 'order',
  32. //'list' => true,
  33. ),
  34. 'name' => array
  35. (
  36. 'type' => 'varchar-800',
  37. 'name' => '视频名称',
  38. 'default' => '',
  39. 'desc' => '视频名称',
  40. 'match' => 'is_string',
  41. 'update' => 'text',
  42. 'search' => 'fulltext',
  43. 'list' => true,
  44. ),
  45. 'pic' => array
  46. (
  47. 'type' => 'varchar-255',
  48. 'name' => '封面-图片大小:750px*425px',
  49. 'default' => '',
  50. 'desc' => '封面',
  51. 'match' => 'is_string',
  52. 'update' => 'image',
  53. 'key' => '1',
  54. 'place' => '150',
  55. ),
  56. 'link' => array
  57. (
  58. 'type' => 'varchar-800',
  59. 'name' => '视频地址-腾讯视频直接输入网址即可,如https://v.qq.com/x/page/j0515xuxz37.html',
  60. 'default' => '',
  61. 'desc' => '请输入视频地址',
  62. 'match' => 'is_string',
  63. 'update' => 'textarea',
  64. ),
  65. 'video' => array
  66. (
  67. 'type' => 'varchar-800',
  68. 'name' => '视频真实地址',
  69. 'default' => '',
  70. 'desc' => '视频真实地址',
  71. 'match' => 'is_string',
  72. //'update' => 'textarea',
  73. ),
  74. 'reorder' => array
  75. (
  76. 'type' => 'int-11',
  77. 'name' => '排序(数值越大越靠前)',
  78. 'default' => '1',
  79. 'desc' => '请输入排序',
  80. 'match' => 'option',
  81. 'update' => 'text',
  82. 'search' => 'order',
  83. 'list_name' => '排序',
  84. 'list' => true,
  85. 'order' => 'desc',
  86. 'edit' => true,
  87. ),
  88. 'state' => array
  89. (
  90. 'type' => 'tinyint-1',
  91. 'name' => '状态',
  92. 'default' => '1',
  93. 'desc' => '请选择状态',
  94. 'match' => 'is_numeric',
  95. ),
  96. 'cdate' => array
  97. (
  98. 'type' => 'int-11',
  99. 'name' => '申请时间',
  100. 'match' => array('is_numeric', time()),
  101. 'desc' => '',
  102. # 只有insert时才生效
  103. 'insert' => true,
  104. 'search' => 'date',
  105. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  106. ),
  107. ),
  108. 'alter' => array
  109. (
  110. 2 => array
  111. (
  112. array('update', 'name', 'name', 'varchar-800 视频名称'),
  113. //array('add', 'config', 'config', 'int-11 1 配置'),
  114. ),
  115. 'version' => 2,
  116. ),
  117. 'request' => array
  118. (
  119. 'getAll' => array
  120. (
  121. # 匹配的正则或函数 选填项
  122. 'option' => array
  123. (
  124. 'state' => 1,
  125. ),
  126. 'type' => 'all',
  127. 'order' => array('reorder' => 'desc', 'cdate' => 'desc'),
  128. 'page' => array(3, 'list'),
  129. 'col' => '*',
  130. ),
  131. ),
  132. );