system.php 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. <?php
  2. return array
  3. (
  4. # 表名
  5. 'name' => 'system',
  6. # 显示给用户看的名称
  7. 'lang' => '项目管理',
  8. # 后台菜单排序
  9. 'order' => 1,
  10. 'end' => array
  11. (
  12. 'insert' => array
  13. (
  14. 'manage/top.sync',
  15. ),
  16. 'update' => array
  17. (
  18. 'manage/top.sync',
  19. ),
  20. ),
  21. # 数据结构
  22. 'struct' => array
  23. (
  24. 'id' => array
  25. (
  26. 'type' => 'int-11',
  27. 'name' => 'ID',
  28. 'default' => '',
  29. 'desc' => '',
  30. 'match' => 'is_numeric',
  31. 'search' => 'order',
  32. 'list' => true,
  33. 'order' => 'desc',
  34. ),
  35. 'name' => array
  36. (
  37. 'type' => 'varchar-32',
  38. 'name' => '项目名称',
  39. 'default' => '',
  40. 'desc' => '项目名称',
  41. 'match' => 'is_string',
  42. 'update' => 'text',
  43. 'search' => 'fulltext',
  44. 'list' => true,
  45. ),
  46. 'reorder' => array
  47. (
  48. 'type' => 'int-11',
  49. 'name' => '排序(数值越大越靠前)',
  50. 'default' => '1',
  51. 'desc' => '请输入排序',
  52. 'match' => 'option',
  53. 'update' => 'text',
  54. 'search' => 'order',
  55. 'list' => true,
  56. 'order' => 'desc',
  57. 'edit' => true,
  58. ),
  59. 'state' => array
  60. (
  61. 'type' => 'tinyint-1',
  62. 'name' => '状态',
  63. 'default' => '1',
  64. 'desc' => '请选择状态',
  65. 'match' => 'is_numeric',
  66. ),
  67. 'cdate' => array
  68. (
  69. 'type' => 'int-11',
  70. 'name' => '录入时间',
  71. 'match' => array('is_numeric', time()),
  72. 'desc' => '',
  73. # 只有insert时才生效
  74. 'insert' => true,
  75. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  76. ),
  77. ),
  78. # 默认值
  79. 'default' => array
  80. (
  81. 'col' => 'name,state,cdate',
  82. 'value' => array
  83. (
  84. '"默认项目",1,' . time(),
  85. ),
  86. ),
  87. 'manage' => array
  88. (
  89. 'insert' => false,
  90. 'edit' => false,
  91. # 自定义快捷新增和编辑
  92. 'button' => array
  93. (
  94. '新增' => array('fast'),
  95. ),
  96. # 快捷更新
  97. 'list_button' => array
  98. (
  99. 'edit' => array('编辑'),
  100. ),
  101. ),
  102. 'top' => array
  103. (
  104. # 数据来源
  105. 'data' => 'state',
  106. # 菜单名
  107. 'name' => '项目选择',
  108. # 默认值
  109. 'value' => 1,
  110. # 对应的字段值,设置这个之后,所有设置等于这个值的字段,都要遵循这个权限的控制
  111. 'key' => Dever::config('base')->top,
  112. # 本表中代表名称的字段
  113. 'col' => 'name',
  114. ),
  115. 'request' => array
  116. (
  117. 'getAll' => array
  118. (
  119. # 匹配的正则或函数 选填项
  120. 'option' => array
  121. (
  122. 'state' => 1,
  123. ),
  124. 'type' => 'all',
  125. 'order' => array('reorder' => 'desc','id' => 'desc'),
  126. 'col' => '*',
  127. ),
  128. ),
  129. );