cate.php 1.9 KB

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