user.php 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207
  1. <?php
  2. return array
  3. (
  4. # 表名
  5. 'name' => 'user',
  6. # 显示给用户看的名称
  7. 'lang' => '活动用户列表',
  8. # 后台菜单排序
  9. 'order' => 2,
  10. 'menu' => false,
  11. # 数据结构
  12. 'struct' => array
  13. (
  14. 'id' => array
  15. (
  16. 'type' => 'int-11',
  17. 'name' => 'ID',
  18. 'default' => '',
  19. 'desc' => '',
  20. 'match' => 'is_numeric',
  21. 'search' => 'order',
  22. 'list' => true,
  23. 'order' => 'desc',
  24. ),
  25. 'mid' => array
  26. (
  27. 'type' => 'int-11',
  28. 'name' => '代理商姓名/手机号',
  29. 'default' => '-1',
  30. 'desc' => '代理商',
  31. 'match' => 'is_string',
  32. // 'update' => 'text',
  33. 'search' => array
  34. (
  35. 'api' => 'agent/member-getSearch',
  36. 'col' => 'col',
  37. 'result' => 'id',
  38. 'search' => 'mid',
  39. ),
  40. 'list_name' => '代理商信息',
  41. 'list' => 'Dever::load("agent/lib/member.getOne", {mid}, "agent/member", true)',
  42. ),
  43. 'name' => array
  44. (
  45. 'type' => 'varchar-200',
  46. 'name' => '名称',
  47. 'default' => '',
  48. 'desc' => '名称',
  49. 'match' => 'is_string',
  50. //'update' => 'text',
  51. 'search' => 'fulltext',
  52. 'list' => true,
  53. ),
  54. 'mobile' => array
  55. (
  56. 'type' => 'bigint-11',
  57. 'name' => '手机号',
  58. 'default' => '',
  59. 'desc' => '请输入手机号',
  60. 'match' => Dever::rule('mobile'),
  61. //'update' => 'text',
  62. //'search' => 'fulltext',
  63. 'list' => true,
  64. ),
  65. 'idcard' => array
  66. (
  67. 'type' => 'varchar-32',
  68. 'name' => '身份证号码',
  69. 'default' => '',
  70. 'desc' => '身份证号码',
  71. 'match' => Dever::rule('idcard'),
  72. // 'update' => 'text',
  73. ),
  74. 'username' => array
  75. (
  76. 'type' => 'varchar-200',
  77. 'name' => '昵称',
  78. 'default' => '',
  79. 'desc' => '昵称',
  80. 'match' => 'is_string',
  81. //'update' => 'text',
  82. 'search' => 'fulltext',
  83. 'list' => true,
  84. ),
  85. 'birthday' => array
  86. (
  87. 'type' => 'int-11',
  88. 'name' => '生日',
  89. 'default' => '',
  90. 'match' => 'option',
  91. 'desc' => '生日',
  92. //'update' => 'time',
  93. 'callback' => 'maketime',
  94. ),
  95. 'pass' => array
  96. (
  97. 'type' => 'varchar-200',
  98. 'name' => '登录密码',
  99. 'default' => '',
  100. 'desc' => '登录密码',
  101. 'match' => 'is_string',
  102. 'update' => 'password',
  103. // 'search' => 'fulltext',
  104. 'callback' => 'sha1',
  105. ),
  106. 'old_pwd' => array
  107. (
  108. 'type' => 'varchar-32',
  109. 'name' => 'pwd',
  110. 'default' => '',
  111. 'desc' => 'pwd',
  112. 'match' => 'is_string',
  113. //'update' => 'text',
  114. ),
  115. 'old_salt' => array
  116. (
  117. 'type' => 'varchar-32',
  118. 'name' => 'salt',
  119. 'default' => '',
  120. 'desc' => 'salt',
  121. 'match' => 'is_string',
  122. //'update' => 'text',
  123. ),
  124. 'avatar' => array
  125. (
  126. 'type' => 'varchar-150',
  127. 'name' => '头像',
  128. 'default' => '',
  129. 'desc' => '请选择头像',
  130. 'match' => 'option',
  131. //'update' => 'image',
  132. 'key' => '1',
  133. //'place' => '150',
  134. ),
  135. 'reorder' => array
  136. (
  137. 'type' => 'int-11',
  138. 'name' => '排序-数值越大越靠前',
  139. 'default' => '1',
  140. 'desc' => '请输入排序',
  141. 'match' => 'option',
  142. //'update' => 'text',
  143. 'search' => 'order',
  144. 'list' => true,
  145. 'order' => 'desc',
  146. 'edit' => true,
  147. ),
  148. 'state' => array
  149. (
  150. 'type' => 'tinyint-1',
  151. 'name' => '状态',
  152. 'default' => '1',
  153. 'desc' => '请选择状态',
  154. 'match' => 'is_numeric',
  155. ),
  156. 'cdate' => array
  157. (
  158. 'type' => 'int-11',
  159. 'name' => '创建时间',
  160. 'match' => array('is_numeric', time()),
  161. 'desc' => '',
  162. # 只有insert时才生效
  163. 'insert' => true,
  164. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  165. ),
  166. ),
  167. 'manage' => array
  168. (
  169. 'insert' => false,
  170. 'delete' => false,
  171. //'edit' => false,
  172. // 'list_button' => array
  173. // (
  174. // 'list1' => array('属性值设置', '"info_field_value&project=active&search_option_field_id={id}&oper_table=info_field&oper_project=active&top_table=info&search_option_actives_id={actives_id}"' , '{type} > 1'),
  175. // ),
  176. ),
  177. 'request' => array
  178. (
  179. 'getSearch' => array
  180. (
  181. # 匹配的正则或函数 选填项
  182. 'option' => array
  183. (
  184. 'col' => array('yes-mobile,name', 'like'),
  185. ),
  186. 'type' => 'all',
  187. 'col' => '*|id',
  188. ),
  189. ),
  190. );