category_attr_value.php 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. <?php
  2. return array
  3. (
  4. # 表名
  5. 'name' => 'category_attr_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. 'category_id' => array
  24. (
  25. 'type' => 'int-11',
  26. 'name' => '分类',
  27. 'default' => '-1',
  28. 'desc' => '分类',
  29. 'match' => 'is_numeric',
  30. 'update' => 'hidden',
  31. 'value' => Dever::input('search_option_category_id'),
  32. ),
  33. 'attr_id' => array
  34. (
  35. 'type' => 'int-11',
  36. 'name' => '属性id',
  37. 'default' => '1',
  38. 'desc' => '属性id',
  39. 'match' => 'is_numeric',
  40. 'update' => 'hidden',
  41. 'value' => Dever::input('search_option_attr_id'),
  42. ),
  43. 'name' => array
  44. (
  45. 'type' => 'varchar-1000',
  46. 'name' => '属性值名称-如绿色',
  47. 'default' => '',
  48. 'desc' => '属性值名称',
  49. 'match' => 'is_string',
  50. 'update' => 'text',
  51. 'search' => 'fulltext',
  52. 'list' => true,
  53. 'edit' => true,
  54. ),
  55. 'value' => array
  56. (
  57. 'type' => 'varchar-1000',
  58. 'name' => '属性具体值-如上述名称为绿色,这里可以是绿色的色值,选填项,可以为空',
  59. 'default' => '',
  60. 'desc' => '属性具体值',
  61. 'match' => 'option',
  62. 'update' => 'text',
  63. 'search' => 'fulltext',
  64. ),
  65. 'icon' => array
  66. (
  67. 'type' => 'varchar-150',
  68. 'name' => '图标-选填项',
  69. 'default' => '',
  70. 'desc' => '图标',
  71. 'match' => 'option',
  72. 'update' => 'image',
  73. 'key' => 1,
  74. ),
  75. 'reorder' => array
  76. (
  77. 'type' => 'int-11',
  78. 'name' => '排序(数值越大越靠前)',
  79. 'default' => '1',
  80. 'desc' => '请输入排序',
  81. 'match' => 'option',
  82. //'update' => 'text',
  83. 'search' => 'order',
  84. 'list_name' => '排序',
  85. 'list' => true,
  86. 'order' => 'desc',
  87. 'edit' => true,
  88. ),
  89. 'state' => array
  90. (
  91. 'type' => 'tinyint-1',
  92. 'name' => '状态',
  93. 'default' => '1',
  94. 'desc' => '请选择状态',
  95. 'match' => 'is_numeric',
  96. ),
  97. 'cdate' => array
  98. (
  99. 'type' => 'int-11',
  100. 'name' => '录入时间',
  101. 'match' => array('is_numeric', time()),
  102. 'desc' => '',
  103. # 只有insert时才生效
  104. 'insert' => true,
  105. 'search' => 'date',
  106. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  107. ),
  108. ),
  109. 'manage' => array
  110. (
  111. 'lang' => 'name',
  112. 'insert' => false,
  113. 'edit' => false,
  114. 'button' => array
  115. (
  116. '新增' => array('fast'),
  117. ),
  118. # 列表
  119. 'list_button' => array
  120. (
  121. 'fast' => array('编辑'),
  122. ),
  123. ),
  124. 'request' => array
  125. (
  126. 'getData' => array
  127. (
  128. # 匹配的正则或函数 选填项
  129. 'option' => array
  130. (
  131. 'attr_id' => 'yes',
  132. 'ids' => array('yes-id', 'in'),
  133. 'state' => 1,
  134. ),
  135. 'type' => 'all',
  136. 'order' => array('reorder' => 'desc', 'id' => 'desc'),
  137. 'col' => 'id,attr_id,name,value,icon,concat(attr_id, "-", id) as price_key|id',
  138. ),
  139. )
  140. );