info.php 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  1. <?php
  2. $sex = array
  3. (
  4. 1 => '男',
  5. 2 => '女',
  6. 3 => '未知',
  7. );
  8. return array
  9. (
  10. # 表名
  11. 'name' => 'info',
  12. # 显示给用户看的名称
  13. 'lang' => '用户扩展信息表',
  14. 'menu' => false,
  15. # 数据结构
  16. 'struct' => array
  17. (
  18. 'id' => array
  19. (
  20. 'type' => 'int-11',
  21. 'name' => 'ID',
  22. 'default' => '',
  23. 'desc' => '',
  24. 'match' => 'is_numeric',
  25. 'search' => 'order',
  26. 'update' => 'hidden',
  27. //'list' => true,
  28. ),
  29. 'uid' => array
  30. (
  31. 'type' => 'int-11',
  32. 'name' => '用户名',
  33. 'default' => '0',
  34. 'desc' => '请选择用户',
  35. 'match' => 'is_numeric',
  36. 'update' => 'text',
  37. //'search' => 'select',
  38. 'search' => array
  39. (
  40. 'api' => 'passport/user-all',
  41. 'col' => 'username',
  42. 'result' => 'id',
  43. ),
  44. 'list' => '{uid} > 0 ? Dever::load("passport/user-one#username", {uid}) : "匿名用户"',
  45. ),
  46. 'info_id' => array
  47. (
  48. 'type' => 'int-11',
  49. 'name' => '合集',
  50. 'default' => '',
  51. 'desc' => '合集',
  52. 'match' => 'is_numeric',
  53. 'update' => 'text',
  54. ),
  55. 'role_id' => array
  56. (
  57. 'type' => 'int-11',
  58. 'name' => '角色',
  59. 'default' => '-1',
  60. 'desc' => '角色',
  61. 'match' => 'is_numeric',
  62. 'update' => 'text',
  63. ),
  64. 'username' => array
  65. (
  66. 'type' => 'varchar-50',
  67. 'name' => '用户名',
  68. 'default' => '',
  69. 'desc' => '请输入用户名',
  70. 'match' => 'is_string',
  71. 'update' => 'text',
  72. 'search' => 'fulltext',
  73. 'list' => true,
  74. ),
  75. 'avatar' => array
  76. (
  77. 'type' => 'varchar-150',
  78. 'name' => '头像',
  79. 'default' => '',
  80. 'desc' => '请选择头像',
  81. 'match' => 'option',
  82. 'update' => 'image',
  83. 'key' => '1',
  84. 'place' => '150',
  85. 'list_name' => '详细信息',
  86. //'list' => '"{avatar}" ? "<img src=\'{avatar}\' width=\'150\'>": ""',
  87. 'list' => 'Dever::load("passport/lib/manage.show", {id})',
  88. ),
  89. 'sex' => array
  90. (
  91. 'type' => 'tinyint-1',
  92. 'name' => '用户性别',
  93. 'default' => '3',
  94. 'desc' => '用户性别',
  95. 'match' => 'is_numeric',
  96. 'option' => $sex,
  97. 'update' => 'radio',
  98. //'list' => true,
  99. ),
  100. 'title' => array
  101. (
  102. 'type' => 'varchar-800',
  103. 'name' => '头衔',
  104. 'default' => '',
  105. 'desc' => '请输入头衔',
  106. 'match' => 'is_string',
  107. 'update' => 'text',
  108. 'search' => 'fulltext',
  109. 'list' => true,
  110. ),
  111. 'info' => array
  112. (
  113. 'type' => 'varchar-800',
  114. 'name' => '签名-描述',
  115. 'default' => '',
  116. 'desc' => '签名',
  117. 'match' => 'is_string',
  118. 'update' => 'text',
  119. 'search' => 'fulltext',
  120. 'list' => true,
  121. ),
  122. 'state' => array
  123. (
  124. 'type' => 'tinyint-1',
  125. 'name' => '状态',
  126. 'default' => '1',
  127. 'desc' => '请选择状态',
  128. 'match' => 'is_numeric',
  129. ),
  130. 'cdate' => array
  131. (
  132. 'type' => 'int-11',
  133. 'name' => '操作时间',
  134. 'match' => array('is_numeric', time()),
  135. 'desc' => '',
  136. # 只有insert时才生效
  137. //'insert' => true,
  138. 'search' => 'date',
  139. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  140. ),
  141. ),
  142. 'manage' => array
  143. (
  144. ),
  145. 'request' => array
  146. (
  147. ),
  148. );