link.php 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180
  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. '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. 'desc' => array
  62. (
  63. 'type' => 'varchar-500',
  64. 'name' => '摘要-不填不显示',
  65. 'default' => '',
  66. 'desc' => '摘要',
  67. 'match' => 'option',
  68. 'update' => 'textarea',
  69. ),
  70. 'pic' => array
  71. (
  72. 'type' => 'varchar-150',
  73. 'name' => 'LOGO图-图片尺寸150*150px或等比尺寸,上传大小不能超过2M,支持JPG、PNG、GIF格式,建议上传JPG格式',
  74. 'default' => '',
  75. 'desc' => 'LOGO图',
  76. 'match' => 'option',
  77. 'update' => 'image',
  78. 'key' => '1',
  79. 'place' => '380',
  80. ),
  81. 'link' => array
  82. (
  83. 'type' => 'varchar-800',
  84. 'name' => '链接地址',
  85. 'default' => '',
  86. 'desc' => '链接地址',
  87. 'match' => 'is_string',
  88. 'update' => 'textarea',
  89. 'key' => '1',
  90. ),
  91. 'content' => array
  92. (
  93. 'type' => 'text-255',
  94. 'name' => '内容介绍',
  95. 'default' => '',
  96. 'desc' => '请输入内容',
  97. 'match' => 'is_string',
  98. 'update' => 'editor',
  99. 'key' => '1',
  100. ),
  101. 'udate' => array
  102. (
  103. 'type' => 'int-11',
  104. 'name' => '更新时间',
  105. 'match' => array('is_numeric', time()),
  106. 'desc' => '',
  107. ),
  108. 'status' => array
  109. (
  110. 'type' => 'int-11',
  111. 'name' => '发布状态',
  112. 'default' => '1',
  113. 'desc' => '发布状态',
  114. 'match' => 'is_numeric',
  115. //'update' => 'select',
  116. 'option' => $status,
  117. 'search' => 'select',
  118. 'list' => true,
  119. 'edit' => true,
  120. ),
  121. 'reorder' => array
  122. (
  123. 'type' => 'int-11',
  124. 'name' => '排序(数值越大越靠前)',
  125. 'default' => '1',
  126. 'desc' => '请输入排序',
  127. 'match' => 'option',
  128. //'update' => 'text',
  129. 'search' => 'order',
  130. 'list' => true,
  131. 'order' => 'desc',
  132. 'edit' => true,
  133. ),
  134. 'state' => array
  135. (
  136. 'type' => 'tinyint-1',
  137. 'name' => '状态',
  138. 'default' => '1',
  139. 'desc' => '请选择状态',
  140. 'match' => 'is_numeric',
  141. ),
  142. 'cdate' => array
  143. (
  144. 'type' => 'int-11',
  145. 'name' => '录入时间',
  146. 'match' => array('is_numeric', time()),
  147. 'desc' => '',
  148. # 只有insert时才生效
  149. 'insert' => true,
  150. ),
  151. ),
  152. # 管理功能
  153. 'manage' => array
  154. (
  155. ),
  156. # request 请求接口定义
  157. 'request' => array
  158. (
  159. ),
  160. );