info_field_value.php 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. <?php
  2. $id = Dever::input('search_option_field_id');
  3. $active_id = Dever::input('search_option_active_id');
  4. return array
  5. (
  6. # 表名
  7. 'name' => 'info_field_value',
  8. # 显示给用户看的名称
  9. 'lang' => '属性值设置',
  10. # 是否显示在后台菜单
  11. 'order' => 9,
  12. 'menu' => false,
  13. # 数据结构
  14. 'struct' => array
  15. (
  16. 'id' => array
  17. (
  18. 'type' => 'int-11',
  19. 'name' => 'ID',
  20. 'default' => '',
  21. 'desc' => '',
  22. 'match' => 'is_numeric',
  23. 'list' => true,
  24. ),
  25. 'field_id' => array
  26. (
  27. 'type' => 'int-11',
  28. 'name' => '字段属性id',
  29. 'default' => '1',
  30. 'desc' => '字段属性id',
  31. 'match' => 'is_numeric',
  32. 'update' => 'hidden',
  33. 'search' => 'hidden',
  34. 'value' => $id,
  35. ),
  36. 'active_id' => array
  37. (
  38. 'type' => 'int-11',
  39. 'name' => '活动id',
  40. 'default' => '1',
  41. 'desc' => '活动id',
  42. 'match' => 'is_numeric',
  43. 'update' => 'hidden',
  44. 'search' => 'hidden',
  45. 'value' => $active_id,
  46. 'list' => "Dever::load('active/lib/manage.active#active_name',{active_id})",
  47. ),
  48. 'name' => array
  49. (
  50. 'type' => 'varchar-1000',
  51. 'name' => '属性值名称-如绿色',
  52. 'default' => '',
  53. 'desc' => '属性值名称',
  54. 'match' => 'is_string',
  55. 'update' => 'text',
  56. 'search' => 'fulltext',
  57. 'list' => true,
  58. 'edit' => true,
  59. ),
  60. 'value' => array
  61. (
  62. 'type' => 'varchar-1000',
  63. 'name' => '属性具体值-如上述名称为绿色,这里可以是绿色的色值,选填项,可以为空',
  64. 'default' => '',
  65. 'desc' => '属性具体值',
  66. 'match' => 'option',
  67. // 'update' => 'text',
  68. // 'search' => 'fulltext',
  69. ),
  70. 'reorder' => array
  71. (
  72. 'type' => 'int-11',
  73. 'name' => '排序(数值越大越靠前)',
  74. 'default' => '1',
  75. 'desc' => '请输入排序',
  76. 'match' => 'option',
  77. 'update' => 'text',
  78. 'search' => 'order',
  79. 'list_name' => '排序',
  80. 'list' => true,
  81. 'order' => 'desc',
  82. 'edit' => true,
  83. ),
  84. 'state' => array
  85. (
  86. 'type' => 'tinyint-1',
  87. 'name' => '状态',
  88. 'default' => '1',
  89. 'desc' => '请选择状态',
  90. 'match' => 'is_numeric',
  91. ),
  92. 'cdate' => array
  93. (
  94. 'type' => 'int-11',
  95. 'name' => '录入时间',
  96. 'match' => array('is_numeric', time()),
  97. 'desc' => '',
  98. # 只有insert时才生效
  99. 'insert' => true,
  100. 'search' => 'date',
  101. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  102. ),
  103. ),
  104. 'manage' => array
  105. (
  106. ),
  107. 'request' => array
  108. (
  109. 'getList' => array
  110. (
  111. # 匹配的正则或函数 选填项
  112. 'option' => array
  113. (
  114. 'active_id' => 'yes',
  115. 'field_id' => 'yes',
  116. 'state' => 1,
  117. ),
  118. 'type' => 'all',
  119. 'order' => array('reorder' => 'desc', 'id' => 'desc'),
  120. 'col' => 'id,active_id,field_id,name',
  121. ),
  122. )
  123. );