user.php 6.8 KB

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