col_option.php 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. <?php
  2. return array
  3. (
  4. # 表名
  5. 'name' => 'col_option',
  6. # 显示给用户看的名称
  7. 'lang' => '字段选项',
  8. 'menu' => false,
  9. # 数据结构
  10. 'struct' => array
  11. (
  12. 'id' => array
  13. (
  14. 'type' => 'int-11',
  15. 'name' => 'ID',
  16. 'default' => '',
  17. 'desc' => '',
  18. 'match' => 'is_numeric',
  19. 'search' => 'order',
  20. 'list' => true,
  21. 'order' => 'desc',
  22. ),
  23. 'col_id' => array
  24. (
  25. 'type' => 'int-11',
  26. 'name' => '字段id',
  27. 'default' => '',
  28. 'desc' => '字段id',
  29. 'match' => 'is_numeric',
  30. 'update' => 'hidden',
  31. 'value' => Dever::input('search_option_col_id'),
  32. ),
  33. 'name' => array
  34. (
  35. 'type' => 'varchar-32',
  36. 'name' => '选项名称',
  37. 'default' => '',
  38. 'desc' => '选项名称',
  39. 'match' => 'is_string',
  40. 'update' => 'text',
  41. 'search' => 'fulltext',
  42. 'list' => true,
  43. ),
  44. 'value' => array
  45. (
  46. 'type' => 'varchar-100',
  47. 'name' => '选项值',
  48. 'default' => '',
  49. 'desc' => '选项值',
  50. 'match' => 'is_string',
  51. 'update' => 'text',
  52. 'search' => 'fulltext',
  53. 'list' => true,
  54. ),
  55. 'reorder' => array
  56. (
  57. 'type' => 'int-11',
  58. 'name' => '排序-数值越小越靠前',
  59. 'default' => '1',
  60. 'desc' => '请输入排序',
  61. 'match' => 'option',
  62. 'update' => 'text',
  63. 'search' => 'order',
  64. 'list' => true,
  65. 'order' => 'asc',
  66. 'edit' => true,
  67. ),
  68. 'state' => array
  69. (
  70. 'type' => 'tinyint-1',
  71. 'name' => '状态',
  72. 'default' => '1',
  73. 'desc' => '请选择状态',
  74. 'match' => 'is_numeric',
  75. ),
  76. 'cdate' => array
  77. (
  78. 'type' => 'int-11',
  79. 'name' => '录入时间',
  80. 'match' => array('is_numeric', time()),
  81. 'desc' => '',
  82. # 只有insert时才生效
  83. 'insert' => true,
  84. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  85. ),
  86. ),
  87. 'request' => array
  88. (
  89. 'getAll' => array
  90. (
  91. # 匹配的正则或函数 选填项
  92. 'option' => array
  93. (
  94. 'col_id' => 'yes',
  95. 'state' => 1,
  96. ),
  97. 'type' => 'all',
  98. 'order' => array('reorder' => 'asc','id' => 'asc'),
  99. 'col' => 'value as id, name|id',
  100. ),
  101. ),
  102. );