link.php 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. <?php
  2. $status = Dever::config('base')->status;
  3. return array
  4. (
  5. # 表名
  6. 'name' => 'link',
  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. 'pic' => array
  66. (
  67. 'type' => 'varchar-150',
  68. 'name' => 'LOGO图-图片尺寸150*150px或等比尺寸,上传大小不能超过2M,支持JPG、PNG、GIF格式,建议上传JPG格式',
  69. 'default' => '',
  70. 'desc' => 'LOGO图',
  71. 'match' => 'option',
  72. 'update' => 'image',
  73. 'key' => '1',
  74. 'place' => '380',
  75. ),
  76. 'link' => array
  77. (
  78. 'type' => 'varchar-800',
  79. 'name' => '链接地址',
  80. 'default' => '',
  81. 'desc' => '链接地址',
  82. 'match' => 'is_string',
  83. 'update' => 'textarea',
  84. 'key' => '1',
  85. ),
  86. 'content' => array
  87. (
  88. 'type' => 'text-255',
  89. 'name' => '内容介绍',
  90. 'default' => '',
  91. 'desc' => '请输入内容',
  92. 'match' => 'is_string',
  93. 'update' => 'editor',
  94. 'key' => '1',
  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. ),
  155. );