user_group_member.php 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. <?php
  2. $status = array
  3. (
  4. 1 => '审核中',
  5. 2 => '已审核',
  6. 3 => '未审核',
  7. );
  8. return array
  9. (
  10. # 表名
  11. 'name' => 'user_group_member',
  12. # 显示给用户看的名称
  13. 'lang' => '战队队员',
  14. 'menu' => false,
  15. 'order' => 17,
  16. # 数据结构
  17. 'struct' => array
  18. (
  19. 'id' => array
  20. (
  21. 'type' => 'int-11',
  22. 'name' => 'ID',
  23. 'default' => '',
  24. 'desc' => '',
  25. 'match' => 'is_numeric',
  26. //'search' => 'order',
  27. 'order' => 'desc',
  28. 'list' => true,
  29. ),
  30. 'uid' => array
  31. (
  32. 'type' => 'int-11',
  33. 'name' => '用户名',
  34. 'default' => '',
  35. 'desc' => '用户名',
  36. 'match' => 'is_numeric',
  37. //'update' => 'text',
  38. 'search' => array
  39. (
  40. 'api' => 'passport/user-all',
  41. 'col' => 'username',
  42. 'result' => 'id',
  43. ),
  44. 'list' => 'Dever::load("passport/user-one#username", {uid})',
  45. ),
  46. 'group_id' => array
  47. (
  48. 'type' => 'int-11',
  49. 'name' => '战队名',
  50. 'default' => '',
  51. 'desc' => '战队名',
  52. 'match' => 'is_numeric',
  53. //'update' => 'text',
  54. 'search' => array
  55. (
  56. 'api' => 'task/user_group-all',
  57. 'col' => 'name',
  58. 'result' => 'id',
  59. ),
  60. 'list' => 'Dever::load("task/user_group-one#name", {group_id})',
  61. ),
  62. 'status' => array
  63. (
  64. 'type' => 'tinyint-1',
  65. 'name' => '审核状态',
  66. 'default' => '2',
  67. 'desc' => '审核状态',
  68. 'match' => 'is_numeric',
  69. 'update' => 'select',
  70. 'option' => $status,
  71. 'search' => 'select',
  72. 'list' => true,
  73. 'edit' => true,
  74. ),
  75. 'state' => array
  76. (
  77. 'type' => 'tinyint-1',
  78. 'name' => '状态',
  79. 'default' => '1',
  80. 'desc' => '请选择状态',
  81. 'match' => 'is_numeric',
  82. ),
  83. 'cdate' => array
  84. (
  85. 'type' => 'int-11',
  86. 'name' => '录入时间',
  87. 'match' => array('is_numeric', time()),
  88. 'desc' => '',
  89. # 只有insert时才生效
  90. 'insert' => true,
  91. 'search' => 'date',
  92. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  93. ),
  94. ),
  95. 'manage' => array
  96. (
  97. 'insert' => false,
  98. 'edit' => false,
  99. 'delete' => false,
  100. ),
  101. 'request' => array
  102. (
  103. 'getAll' => array
  104. (
  105. # 匹配的正则或函数 选填项
  106. 'option' => array
  107. (
  108. 'group_id' => 'yes',
  109. 'status' => 2,
  110. 'state' => 1,
  111. ),
  112. 'type' => 'all',
  113. 'order' => array('cdate' => 'desc'),
  114. 'page' => array(15, 'list'),
  115. 'col' => '*',
  116. ),
  117. )
  118. );