search.php 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. <?php
  2. return array
  3. (
  4. # 表名
  5. 'name' => 'search',
  6. # 显示给用户看的名称
  7. 'lang' => '搜索值设置',
  8. # 是否显示在后台菜单
  9. 'order' => 9,
  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' => '属性id',
  27. 'default' => '1',
  28. 'desc' => '属性id',
  29. 'match' => 'is_numeric',
  30. 'update' => 'hidden',
  31. 'value' => Dever::input('search_option_info_id'),
  32. ),
  33. 'name' => array
  34. (
  35. 'type' => 'varchar-1000',
  36. 'name' => '搜索名称-如设置为100万以下',
  37. 'default' => '',
  38. 'desc' => '搜索名称',
  39. 'match' => 'is_string',
  40. 'update' => 'text',
  41. 'search' => 'fulltext',
  42. 'list' => true,
  43. 'edit' => true,
  44. ),
  45. 'value' => array
  46. (
  47. 'type' => 'varchar-1000',
  48. 'name' => '搜索值-可以设置为{v}<=100,{v}为当前值,如果是区间输入框,则{s}为区间最小值,{e}为区间最大值',
  49. 'default' => '',
  50. 'desc' => '搜索值',
  51. 'match' => 'is_string',
  52. 'update' => 'textarea',
  53. 'search' => 'fulltext',
  54. 'list' => true,
  55. 'edit' => 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_name' => '排序',
  67. 'list' => true,
  68. 'order' => 'desc',
  69. 'edit' => true,
  70. ),
  71. 'state' => array
  72. (
  73. 'type' => 'tinyint-1',
  74. 'name' => '状态',
  75. 'default' => '1',
  76. 'desc' => '请选择状态',
  77. 'match' => 'is_numeric',
  78. ),
  79. 'cdate' => array
  80. (
  81. 'type' => 'int-11',
  82. 'name' => '录入时间',
  83. 'match' => array('is_numeric', time()),
  84. 'desc' => '',
  85. # 只有insert时才生效
  86. 'insert' => true,
  87. 'search' => 'date',
  88. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  89. ),
  90. ),
  91. 'manage' => array
  92. (
  93. ),
  94. 'request' => array
  95. (
  96. 'getData' => array
  97. (
  98. # 匹配的正则或函数 选填项
  99. 'option' => array
  100. (
  101. 'info_id' => 'yes',
  102. 'ids' => array('yes-id', 'in'),
  103. 'state' => 1,
  104. ),
  105. 'type' => 'all',
  106. 'order' => array('reorder' => 'desc', 'id' => 'desc'),
  107. 'col' => '*',
  108. ),
  109. )
  110. );