tag.php 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. <?php
  2. return array
  3. (
  4. # 表名
  5. 'name' => 'tag',
  6. # 显示给用户看的名称
  7. 'lang' => '标签管理',
  8. 'order' => 1,
  9. 'menu' => false,
  10. # 数据结构
  11. 'struct' => array
  12. (
  13. 'id' => array
  14. (
  15. 'type' => 'int-11',
  16. 'name' => 'ID',
  17. 'default' => '',
  18. 'desc' => '',
  19. 'match' => 'is_numeric',
  20. 'search' => 'order',
  21. //'list' => true,
  22. ),
  23. 'name' => array
  24. (
  25. 'type' => 'varchar-300',
  26. 'name' => '名称',
  27. 'default' => '',
  28. 'desc' => '名称',
  29. 'match' => 'option',
  30. 'update' => 'text',
  31. 'list' => true,
  32. ),
  33. 'state' => array
  34. (
  35. 'type' => 'tinyint-1',
  36. 'name' => '状态',
  37. 'default' => '1',
  38. 'desc' => '请选择状态',
  39. 'match' => 'is_numeric',
  40. ),
  41. 'cdate' => array
  42. (
  43. 'type' => 'int-11',
  44. 'name' => '创建时间',
  45. 'match' => array('is_numeric', time()),
  46. 'desc' => '',
  47. # 只有insert时才生效
  48. 'insert' => true,
  49. //'search' => 'date',
  50. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  51. ),
  52. ),
  53. 'manage' => array
  54. (
  55. //'excel' => true,
  56. //'delete' => false,
  57. //'edit' => false,
  58. //'insert' => false,
  59. ),
  60. 'request' => array
  61. (
  62. 'getDataByIds' => array
  63. (
  64. # 匹配的正则或函数 选填项
  65. 'option' => array
  66. (
  67. 'id' => array('yes', 'in'),
  68. 'state' => 1,
  69. ),
  70. 'type' => 'all',
  71. 'order' => array('id' => 'desc'),
  72. 'col' => '*',
  73. ),
  74. 'search' => array
  75. (
  76. # 匹配的正则或函数 选填项
  77. 'option' => array
  78. (
  79. 'name' => array('yes', 'like'),
  80. 'id' => array('yes', 'in'),
  81. 'state' => 1,
  82. ),
  83. 'type' => 'all',
  84. 'order' => array('id', 'desc'),
  85. 'col' => '*,name as value,name as label|id',//这里为了做autocomplete进行测试,必须输出value和label
  86. ),
  87. )
  88. );