project.php 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. <?php
  2. return array
  3. (
  4. # 表名
  5. 'name' => 'project',
  6. # 显示给用户看的名称
  7. 'lang' => '项目管理',
  8. # 是否显示在后台菜单
  9. 'order' => 9,
  10. 'menu' => false,
  11. # 数据结构
  12. 'struct' => array
  13. (
  14. 'id' => array
  15. (
  16. 'type' => 'int-11',
  17. 'name' => 'ID',
  18. 'default' => '',
  19. 'desc' => '',
  20. 'match' => 'is_numeric',
  21. 'order' => 'asc',
  22. 'list' => true,
  23. ),
  24. 'name' => array
  25. (
  26. 'type' => 'varchar-150',
  27. 'name' => '项目名称',
  28. 'default' => '',
  29. 'desc' => '项目名称',
  30. 'match' => 'is_string',
  31. 'update' => 'text',
  32. 'search' => 'fulltext',
  33. 'list' => true,
  34. 'edit' => true,
  35. ),
  36. 'reorder' => array
  37. (
  38. 'type' => 'int-11',
  39. 'name' => '排序(数值越大越靠前)',
  40. 'default' => '1',
  41. 'desc' => '请输入排序',
  42. 'match' => 'option',
  43. 'update' => 'text',
  44. 'search' => 'order',
  45. 'list_name' => '排序',
  46. 'list' => true,
  47. 'order' => 'desc',
  48. 'edit' => true,
  49. ),
  50. 'state' => array
  51. (
  52. 'type' => 'tinyint-1',
  53. 'name' => '状态',
  54. 'default' => '1',
  55. 'desc' => '请选择状态',
  56. 'match' => 'is_numeric',
  57. ),
  58. 'cdate' => array
  59. (
  60. 'type' => 'int-11',
  61. 'name' => '录入时间',
  62. 'match' => array('is_numeric', time()),
  63. 'desc' => '',
  64. # 只有insert时才生效
  65. 'insert' => true,
  66. 'search' => 'date',
  67. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  68. ),
  69. ),
  70. 'manage' => array
  71. (
  72. ),
  73. # 默认值
  74. 'default' => array
  75. (
  76. 'col' => 'name,state,cdate',
  77. 'value' => array
  78. (
  79. '"默认项目",1,' . time(),
  80. ),
  81. ),
  82. 'request' => array
  83. (
  84. )
  85. );