tag.php 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. <?php
  2. return array
  3. (
  4. # 表名
  5. 'name' => 'tag',
  6. # 显示给用户看的名称
  7. 'lang' => '标签管理',
  8. # 是否显示在后台菜单
  9. 'order' => 10,
  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. 'order' => 'asc',
  21. 'list' => true,
  22. ),
  23. 'name' => array
  24. (
  25. 'type' => 'varchar-150',
  26. 'name' => '标签名称',
  27. 'default' => '',
  28. 'desc' => '标签名称',
  29. 'match' => 'is_string',
  30. 'update' => 'text',
  31. 'search' => 'fulltext',
  32. 'list' => true,
  33. 'edit' => true,
  34. ),
  35. 'color' => array
  36. (
  37. 'type' => 'varchar-10',
  38. 'name' => '颜色-请填写颜色代码',
  39. 'default' => '',
  40. 'desc' => '颜色',
  41. 'match' => 'option',
  42. 'update' => 'color',
  43. ),
  44. 'reorder' => array
  45. (
  46. 'type' => 'int-11',
  47. 'name' => '排序(数值越大越靠前)',
  48. 'default' => '1',
  49. 'desc' => '请输入排序',
  50. 'match' => 'option',
  51. 'update' => 'text',
  52. 'search' => 'order',
  53. 'list_name' => '排序',
  54. 'list' => true,
  55. 'order' => 'desc',
  56. 'edit' => true,
  57. ),
  58. 'state' => array
  59. (
  60. 'type' => 'tinyint-1',
  61. 'name' => '状态',
  62. 'default' => '1',
  63. 'desc' => '请选择状态',
  64. 'match' => 'is_numeric',
  65. ),
  66. 'cdate' => array
  67. (
  68. 'type' => 'int-11',
  69. 'name' => '录入时间',
  70. 'match' => array('is_numeric', time()),
  71. 'desc' => '',
  72. # 只有insert时才生效
  73. 'insert' => true,
  74. 'search' => 'date',
  75. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  76. ),
  77. ),
  78. 'manage' => array
  79. (
  80. ),
  81. 'request' => array
  82. (
  83. 'getAllByIds' => array
  84. (
  85. # 匹配的正则或函数 选填项
  86. 'option' => array
  87. (
  88. 'ids' => array('yes-id', 'in'),
  89. 'state' => 1,
  90. ),
  91. 'type' => 'all',
  92. 'order' => array('reorder' => 'desc', 'id' => 'desc'),
  93. 'col' => '*',
  94. ),
  95. )
  96. );