profession.php 2.4 KB

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