admin_group.php 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. <?php
  2. /*
  3. |--------------------------------------------------------------------------
  4. | admin.php 管理员表
  5. |--------------------------------------------------------------------------
  6. */
  7. $type = array
  8. (
  9. 1 => '普通员工',
  10. 2 => '部门主管',
  11. );
  12. return array
  13. (
  14. # 表名
  15. 'name' => 'admin_group',
  16. # 显示给用户看的名称
  17. 'lang' => '管理员部门关联表',
  18. 'menu' => false,
  19. 'end' => array
  20. (
  21. 'insert' => 'manage/group.update',
  22. 'update' => 'manage/group.update',
  23. ),
  24. # 数据结构
  25. 'struct' => array
  26. (
  27. 'id' => array
  28. (
  29. 'type' => 'int-11',
  30. 'name' => 'ID',
  31. 'default' => '',
  32. 'desc' => '',
  33. 'match' => 'is_numeric',
  34. 'search' => 'order',
  35. 'list' => true,
  36. ),
  37. 'admin_id' => array
  38. (
  39. 'type' => 'int-11',
  40. 'name' => '管理员ID',
  41. 'default' => '',
  42. 'desc' => '管理员ID',
  43. 'match' => 'is_numeric',
  44. 'update' => 'hidden',
  45. //'list' => true,
  46. 'value' => Dever::input('search_option_admin_id'),
  47. ),
  48. 'company' => array
  49. (
  50. 'type' => 'varchar-800',
  51. 'name' => '公司与部门',
  52. 'default' => '',
  53. 'desc' => '公司与部门',
  54. 'match' => 'is_numeric',
  55. 'search' => 'linkage',
  56. 'update' => 'linkage',
  57. 'option' => Dever::url('group.get', 'manage'),
  58. ),
  59. 'company_id' => array
  60. (
  61. 'type' => 'int-11',
  62. 'name' => '公司',
  63. 'default' => '',
  64. 'desc' => '公司',
  65. 'match' => 'is_numeric',
  66. ),
  67. 'group_id' => array
  68. (
  69. 'type' => 'int-11',
  70. 'name' => '部门',
  71. 'default' => '',
  72. 'desc' => '部门',
  73. 'match' => 'is_numeric',
  74. ),
  75. 'type' => array
  76. (
  77. 'type' => 'int-11',
  78. 'name' => '类型',
  79. 'default' => '1',
  80. 'desc' => '类型',
  81. 'match' => 'is_numeric',
  82. 'option' => $type,
  83. 'update' => 'radio',
  84. //'list' => true,
  85. ),
  86. 'state' => array
  87. (
  88. 'type' => 'tinyint-1',
  89. 'name' => '状态',
  90. 'default' => '1',
  91. 'desc' => '请选择状态',
  92. 'match' => 'option',
  93. ),
  94. 'cdate' => array
  95. (
  96. 'type' => 'int-11',
  97. 'name' => '录入时间',
  98. 'match' => array('is_numeric', DEVER_TIME),
  99. 'desc' => '',
  100. # 只有insert时才生效
  101. 'insert' => true,
  102. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  103. ),
  104. ),
  105. # request 请求接口定义
  106. 'request' => array
  107. (
  108. 'getAll' => array
  109. (
  110. # 匹配的正则或函数 选填项
  111. 'option' => array
  112. (
  113. 'group_id' => 'yes',
  114. 'admin_id' => array('yes', '!='),
  115. ),
  116. 'type' => 'all',
  117. 'col' => '*|admin_id',
  118. ),
  119. )
  120. );