value.php 3.6 KB

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