cate.php 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. <?php
  2. return array
  3. (
  4. # 表名
  5. 'name' => 'cate',
  6. # 显示给用户看的名称
  7. 'lang' => '资源分类',
  8. 'order' => 99,
  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. ),
  22. 'name' => array
  23. (
  24. 'type' => 'varchar-300',
  25. 'name' => '分类名称',
  26. 'default' => '',
  27. 'desc' => '分类名称',
  28. 'match' => 'option',
  29. 'update' => 'text',
  30. 'list' => true,
  31. ),
  32. 'state' => array
  33. (
  34. 'type' => 'tinyint-1',
  35. 'name' => '状态',
  36. 'default' => '1',
  37. 'desc' => '请选择状态',
  38. 'match' => 'is_numeric',
  39. ),
  40. 'cdate' => array
  41. (
  42. 'type' => 'int-11',
  43. 'name' => '创建时间',
  44. 'match' => array('is_numeric', time()),
  45. 'desc' => '',
  46. # 只有insert时才生效
  47. 'insert' => true,
  48. //'search' => 'date',
  49. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  50. ),
  51. ),
  52. 'manage' => array
  53. (
  54. //'excel' => true,
  55. //'delete' => false,
  56. //'edit' => false,
  57. //'insert' => false,
  58. ),
  59. # 默认值
  60. 'default' => array
  61. (
  62. 'col' => 'name,state,cdate',
  63. 'value' => array
  64. (
  65. '"默认分类",1,' . time(),
  66. ),
  67. ),
  68. );