user_level.php 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. <?php
  2. $status = array
  3. (
  4. 1 => '审核中',
  5. 2 => '已认证',
  6. 3 => '未认证',
  7. );
  8. return array
  9. (
  10. # 表名
  11. 'name' => 'user_level',
  12. # 显示给用户看的名称
  13. 'lang' => '等级设置',
  14. 'menu' => 'main',
  15. 'order' => 20,
  16. 'fast' => 10,
  17. # 数据结构
  18. 'struct' => array
  19. (
  20. 'id' => array
  21. (
  22. 'type' => 'int-11',
  23. 'name' => 'ID',
  24. 'default' => '',
  25. 'desc' => '',
  26. 'match' => 'is_numeric',
  27. //'search' => 'order',
  28. 'order' => 'desc',
  29. 'list' => true,
  30. ),
  31. 'name' => array
  32. (
  33. 'type' => 'varchar-80',
  34. 'name' => '等级名称',
  35. 'default' => '',
  36. 'desc' => '等级名称',
  37. 'match' => 'is_string',
  38. 'update' => 'text',
  39. 'search' => 'fulltext',
  40. 'list' => true,
  41. ),
  42. 'score' => array
  43. (
  44. 'type' => 'varchar-11',
  45. 'name' => '等级所需积分',
  46. 'default' => '0',
  47. 'desc' => '等级所需积分',
  48. 'match' => 'is_numeric',
  49. 'update' => 'text',
  50. 'list' => true,
  51. 'edit' => true,
  52. ),
  53. 'member' => array
  54. (
  55. 'type' => 'int-11',
  56. 'name' => '等级所需成员数',
  57. 'default' => '0',
  58. 'desc' => '等级所需成员数',
  59. 'match' => 'is_numeric',
  60. 'update' => 'text',
  61. 'list' => true,
  62. 'edit' => true,
  63. ),
  64. 'reorder' => array
  65. (
  66. 'type' => 'int-11',
  67. 'name' => '级别数字(数值越大越高)',
  68. 'default' => '1',
  69. 'desc' => '请输入级别',
  70. 'match' => 'option',
  71. 'update' => 'text',
  72. 'search' => 'order',
  73. 'list_name' => '级别数字',
  74. 'list' => true,
  75. 'order' => 'desc',
  76. 'edit' => true,
  77. ),
  78. 'state' => array
  79. (
  80. 'type' => 'tinyint-1',
  81. 'name' => '状态',
  82. 'default' => '1',
  83. 'desc' => '请选择状态',
  84. 'match' => 'is_numeric',
  85. ),
  86. 'cdate' => array
  87. (
  88. 'type' => 'int-11',
  89. 'name' => '录入时间',
  90. 'match' => array('is_numeric', time()),
  91. 'desc' => '',
  92. # 只有insert时才生效
  93. 'insert' => true,
  94. 'search' => 'date',
  95. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  96. ),
  97. ),
  98. # 更新表结构
  99. 'alter' => array
  100. (
  101. 1 => array
  102. (
  103. array('update', 'score', 'score', 'varchar-11 0 积分'),
  104. ),
  105. 'version' => 1,
  106. ),
  107. 'manage' => array
  108. (
  109. ),
  110. 'default' => array
  111. (
  112. 'col' => 'name,score,member,state, reorder,cdate',
  113. 'value' => array
  114. (
  115. '"小队成员","0", "0", 1, 1,' . DEVER_TIME,
  116. '"小队长","200", "5", 1, 2,' . DEVER_TIME,
  117. '"中队长","1000", "0", 1, 3,' . DEVER_TIME,
  118. '"大队长","3000", "0", 1, 4,' . DEVER_TIME,
  119. '"大队委员","6000", "0", 1, 5,' . DEVER_TIME,
  120. '"合伙人","15000", "0", 1, 6,' . DEVER_TIME,
  121. ),
  122. ),
  123. );