value.php 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. <?php
  2. return array
  3. (
  4. # 表名
  5. 'name' => 'value',
  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' => '属性值名称-如绿色',
  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' => '属性值-如#000000,可以为空',
  49. 'default' => '',
  50. 'desc' => '属性值',
  51. 'match' => 'option',
  52. 'update' => 'text',
  53. 'search' => 'fulltext',
  54. 'list' => true,
  55. 'edit' => true,
  56. ),
  57. 'icon' => array
  58. (
  59. 'type' => 'varchar-150',
  60. 'name' => '图标',
  61. 'default' => '',
  62. 'desc' => '图标',
  63. 'match' => 'option',
  64. 'update' => 'image',
  65. 'key' => 1,
  66. ),
  67. 'reorder' => array
  68. (
  69. 'type' => 'int-11',
  70. 'name' => '排序(数值越大越靠前)',
  71. 'default' => '1',
  72. 'desc' => '请输入排序',
  73. 'match' => 'option',
  74. 'update' => 'text',
  75. 'search' => 'order',
  76. 'list_name' => '排序',
  77. 'list' => true,
  78. 'order' => 'desc',
  79. 'edit' => true,
  80. ),
  81. 'state' => array
  82. (
  83. 'type' => 'tinyint-1',
  84. 'name' => '状态',
  85. 'default' => '1',
  86. 'desc' => '请选择状态',
  87. 'match' => 'is_numeric',
  88. ),
  89. 'cdate' => array
  90. (
  91. 'type' => 'int-11',
  92. 'name' => '录入时间',
  93. 'match' => array('is_numeric', time()),
  94. 'desc' => '',
  95. # 只有insert时才生效
  96. 'insert' => true,
  97. 'search' => 'date',
  98. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  99. ),
  100. ),
  101. 'manage' => array
  102. (
  103. ),
  104. 'request' => array
  105. (
  106. 'getData' => array
  107. (
  108. # 匹配的正则或函数 选填项
  109. 'option' => array
  110. (
  111. 'info_id' => 'yes',
  112. 'ids' => array('yes-id', 'in'),
  113. 'state' => 1,
  114. ),
  115. 'type' => 'all',
  116. 'order' => array('reorder' => 'desc', 'id' => 'desc'),
  117. 'col' => '*',
  118. ),
  119. )
  120. );