cate.php 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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. 'search' => 'fulltext',
  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. # 默认值
  61. 'default' => array
  62. (
  63. 'col' => 'name,state,cdate',
  64. 'value' => array
  65. (
  66. '"默认分类",1,' . time(),
  67. '"裁剪图片",1,' . time(),
  68. ),
  69. ),
  70. );