cate.php 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. <?php
  2. return array
  3. (
  4. # 表名
  5. 'name' => 'cate',
  6. # 显示给用户看的名称
  7. 'lang' => '采集源',
  8. # 后台菜单排序
  9. 'order' => 9,
  10. # 数据结构
  11. 'struct' => array
  12. (
  13. 'id' => array
  14. (
  15. 'type' => 'int-11',
  16. 'name' => 'ID',
  17. 'default' => '',
  18. 'desc' => '',
  19. 'match' => 'is_numeric',
  20. 'search' => 'order',
  21. 'list' => true,
  22. 'order' => 'desc',
  23. ),
  24. 'name' => array
  25. (
  26. 'type' => 'varchar-32',
  27. 'name' => '采集源名称',
  28. 'default' => '',
  29. 'desc' => '请输入名称',
  30. 'match' => 'is_string',
  31. 'update' => 'text',
  32. 'search' => 'fulltext',
  33. 'list' => true,
  34. ),
  35. 'site' => array
  36. (
  37. 'type' => 'text-255',
  38. 'name' => '采集源网址',
  39. 'default' => '',
  40. 'desc' => '采集源网址',
  41. 'match' => 'is_string',
  42. 'update' => 'text',
  43. //'list' => true,
  44. //'edit' => 'textarea',
  45. ),
  46. 'collect_rule' => array
  47. (
  48. 'type' => 'varchar-500',
  49. 'name' => '采集列表链接-采集列表页面链接规则,为空则不采集列表页面链接,第二行可以输入链接中要包含的字符',
  50. 'default' => '',
  51. 'desc' => '采集规则',
  52. 'match' => 'option',
  53. 'update' => 'textarea',
  54. //'edit' => true,
  55. //'list' => true,
  56. ),
  57. 'reorder' => array
  58. (
  59. 'type' => 'int-11',
  60. 'name' => '排序(数值越大越靠前)',
  61. 'default' => '1',
  62. 'desc' => '请输入排序',
  63. 'match' => 'option',
  64. 'update' => 'text',
  65. 'search' => 'order',
  66. 'list' => true,
  67. 'order' => 'desc',
  68. 'edit' => true,
  69. ),
  70. 'state' => array
  71. (
  72. 'type' => 'tinyint-1',
  73. 'name' => '状态',
  74. 'default' => '1',
  75. 'desc' => '请选择状态',
  76. 'match' => 'is_numeric',
  77. ),
  78. 'cdate' => array
  79. (
  80. 'type' => 'int-11',
  81. 'name' => '录入时间',
  82. 'match' => array('is_numeric', time()),
  83. 'desc' => '',
  84. # 只有insert时才生效
  85. 'insert' => true,
  86. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  87. ),
  88. ),
  89. # 默认值
  90. 'default' => array
  91. (
  92. 'col' => 'name,reorder,cdate',
  93. 'value' => array
  94. (
  95. '"默认分类",100,' . time(),
  96. ),
  97. ),
  98. 'manage' => array
  99. (
  100. 'insert' => false,
  101. 'edit' => false,
  102. # 自定义快捷新增和编辑
  103. 'button' => array
  104. (
  105. '新增' => array('fast'),
  106. ),
  107. # 快捷更新
  108. 'list_button' => array
  109. (
  110. 'edit' => array('编辑'),
  111. ),
  112. ),
  113. 'request' => array
  114. (
  115. 'getAll' => array
  116. (
  117. # 匹配的正则或函数 选填项
  118. 'option' => array
  119. (
  120. 'state' => 1,
  121. ),
  122. 'type' => 'all',
  123. 'order' => array('reorder' => 'desc','id' => 'desc'),
  124. 'col' => '*',
  125. ),
  126. ),
  127. );