webview.php 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. <?php
  2. $status = Dever::config('base')->status;
  3. return array
  4. (
  5. # 表名
  6. 'name' => 'webview',
  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. 'desc' => array
  57. (
  58. 'type' => 'varchar-500',
  59. 'name' => '摘要-不填不显示',
  60. 'default' => '',
  61. 'desc' => '摘要',
  62. 'match' => 'option',
  63. 'update' => 'textarea',
  64. ),
  65. 'link' => array
  66. (
  67. 'type' => 'varchar-800',
  68. 'name' => '链接地址',
  69. 'default' => '',
  70. 'desc' => '链接地址',
  71. 'match' => 'is_string',
  72. 'update' => 'textarea',
  73. 'key' => '1',
  74. ),
  75. 'udate' => array
  76. (
  77. 'type' => 'int-11',
  78. 'name' => '更新时间',
  79. 'match' => array('is_numeric', time()),
  80. 'desc' => '',
  81. ),
  82. 'status' => array
  83. (
  84. 'type' => 'int-11',
  85. 'name' => '发布状态',
  86. 'default' => '1',
  87. 'desc' => '发布状态',
  88. 'match' => 'is_numeric',
  89. //'update' => 'select',
  90. 'option' => $status,
  91. 'search' => 'select',
  92. 'list' => true,
  93. 'edit' => true,
  94. ),
  95. 'reorder' => array
  96. (
  97. 'type' => 'int-11',
  98. 'name' => '排序(数值越大越靠前)',
  99. 'default' => '1',
  100. 'desc' => '请输入排序',
  101. 'match' => 'option',
  102. //'update' => 'text',
  103. 'search' => 'order',
  104. 'list' => true,
  105. 'order' => 'desc',
  106. 'edit' => true,
  107. ),
  108. 'state' => array
  109. (
  110. 'type' => 'tinyint-1',
  111. 'name' => '状态',
  112. 'default' => '1',
  113. 'desc' => '请选择状态',
  114. 'match' => 'is_numeric',
  115. ),
  116. 'cdate' => array
  117. (
  118. 'type' => 'int-11',
  119. 'name' => '录入时间',
  120. 'match' => array('is_numeric', time()),
  121. 'desc' => '',
  122. # 只有insert时才生效
  123. 'insert' => true,
  124. ),
  125. ),
  126. # 管理功能
  127. 'manage' => array
  128. (
  129. ),
  130. # request 请求接口定义
  131. 'request' => array
  132. (
  133. ),
  134. );