user_group.php 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. <?php
  2. $status = array
  3. (
  4. 1 => '审核中',
  5. 2 => '已审核',
  6. 3 => '未审核',
  7. );
  8. return array
  9. (
  10. # 表名
  11. 'name' => 'user_group',
  12. # 显示给用户看的名称
  13. 'lang' => '用户战队',
  14. 'menu' => 'passport',
  15. 'order' => 18,
  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. 'name' => array
  47. (
  48. 'type' => 'varchar-180',
  49. 'name' => '战队名',
  50. 'default' => '',
  51. 'desc' => '战队名',
  52. 'match' => 'is_string',
  53. 'update' => 'text',
  54. 'search' => 'fulltext',
  55. //'list' => true,
  56. ),
  57. 'code' => array
  58. (
  59. 'type' => 'varchar-32',
  60. 'name' => '邀请码',
  61. 'default' => '',
  62. 'desc' => '邀请码',
  63. 'match' => 'is_string',
  64. 'update' => 'text',
  65. 'search' => 'fulltext',
  66. 'list' => true,
  67. ),
  68. 'status' => array
  69. (
  70. 'type' => 'tinyint-1',
  71. 'name' => '审核状态',
  72. 'default' => '2',
  73. 'desc' => '审核状态',
  74. 'match' => 'is_numeric',
  75. 'update' => 'select',
  76. 'option' => $status,
  77. 'search' => 'select',
  78. //'list' => true,
  79. //'edit' => true,
  80. ),
  81. 'state' => array
  82. (
  83. 'type' => 'tinyint-1',
  84. 'name' => '状态',
  85. 'default' => '1',
  86. 'desc' => '请选择状态',
  87. 'match' => 'is_numeric',
  88. ),
  89. 'cdate' => array
  90. (
  91. 'type' => 'int-11',
  92. 'name' => '注册时间',
  93. 'match' => array('is_numeric', time()),
  94. 'desc' => '',
  95. # 只有insert时才生效
  96. 'insert' => true,
  97. 'search' => 'date',
  98. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  99. ),
  100. ),
  101. 'manage' => array
  102. (
  103. 'insert' => false,
  104. 'edit' => false,
  105. 'delete' => false,
  106. # 列表
  107. 'list_button' => array
  108. (
  109. 'list' => array('战队成员', '"user_group_member&project=task&search_option_group_id={id}&oper_parent=user_group&oper_project=task"'),
  110. ),
  111. ),
  112. );