user.php 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  1. <?php
  2. /**
  3. * user
  4. */
  5. $type = array
  6. (
  7. 1 => '小程序',
  8. 2 => '订阅号',
  9. 3 => '服务号',
  10. );
  11. return array
  12. (
  13. # 表名
  14. 'name' => 'user',
  15. # 显示给用户看的名称
  16. 'lang' => '用户管理',
  17. 'order' => 100,
  18. 'desc' => '请将wechat_component/auth.cron放到cron中,定时获取access token',
  19. # 数据结构
  20. 'struct' => array
  21. (
  22. 'id' => array
  23. (
  24. 'type' => 'int-11',
  25. 'name' => 'ID',
  26. 'default' => '',
  27. 'desc' => '',
  28. 'match' => 'is_numeric',
  29. 'search' => 'order',
  30. 'list' => true,
  31. ),
  32. 'project_id' => array
  33. (
  34. 'type' => 'int-11',
  35. 'name' => '项目',
  36. 'default' => '',
  37. 'desc' => '请输入项目',
  38. 'match' => 'is_numeric',
  39. ),
  40. 'oauth_id' => array
  41. (
  42. 'type' => 'int-11',
  43. 'name' => 'oauth',
  44. 'default' => '',
  45. 'desc' => 'oauth',
  46. 'match' => 'is_numeric',
  47. ),
  48. 'name' => array
  49. (
  50. 'type' => 'varchar-120',
  51. 'name' => '昵称',
  52. 'default' => '',
  53. 'desc' => '昵称',
  54. 'match' => 'is_string',
  55. 'search' => 'fulltext',
  56. //'update' => 'text',
  57. 'list' => true,
  58. ),
  59. 'principal_name' => array
  60. (
  61. 'type' => 'varchar-120',
  62. 'name' => '主体信息',
  63. 'default' => '',
  64. 'desc' => '主体信息',
  65. 'match' => 'is_string',
  66. 'search' => 'fulltext',
  67. //'update' => 'text',
  68. 'list' => true,
  69. ),
  70. 'pic' => array
  71. (
  72. 'type' => 'varchar-250',
  73. 'name' => '头像',
  74. 'default' => '',
  75. 'desc' => '头像',
  76. 'match' => 'is_string',
  77. //'search' => 'fulltext',
  78. //'update' => 'text',
  79. 'list_name' => 'logo及二维码列表',
  80. //'list' => '"<img src=\"{pic}\" width=\"100\"> <img src=\"{qrcode}\" width=\"100\">"',
  81. 'list' => 'Dever::load("component/user.logo", {id})',
  82. 'modal' => '点此查看',
  83. ),
  84. 'username' => array
  85. (
  86. 'type' => 'varchar-120',
  87. 'name' => '用户名',
  88. 'default' => '',
  89. 'desc' => '用户名',
  90. 'match' => 'is_string',
  91. //'search' => 'fulltext',
  92. //'update' => 'text',
  93. //'list' => true,
  94. ),
  95. 'qrcode' => array
  96. (
  97. 'type' => 'varchar-250',
  98. 'name' => '二维码',
  99. 'default' => '',
  100. 'desc' => '二维码',
  101. 'match' => 'is_string',
  102. //'search' => 'fulltext',
  103. //'update' => 'text',
  104. //'list' => true,
  105. ),
  106. 'type' => array
  107. (
  108. 'type' => 'tinyint-11',
  109. 'name' => '类型',
  110. 'default' => '1',
  111. 'desc' => '类型',
  112. 'match' => 'is_numeric',
  113. //'update' => 'select',
  114. 'option' => $type,
  115. //'list' => true,
  116. ),
  117. 'desc' => array
  118. (
  119. 'type' => 'varchar-120',
  120. 'name' => '小程序id',
  121. 'default' => '',
  122. 'desc' => '小程序id',
  123. 'match' => 'is_string',
  124. 'search' => 'fulltext',
  125. 'update' => 'text',
  126. 'list' => true,
  127. 'edit' => true,
  128. ),
  129. 'tag' => array
  130. (
  131. 'type' => 'varchar-500',
  132. 'name' => '标签',
  133. 'default' => '',
  134. 'desc' => '标签',
  135. 'match' => 'is_string',
  136. 'search' => 'fulltext',
  137. 'update' => 'text',
  138. 'list' => true,
  139. 'edit' => true,
  140. ),
  141. 'mdate' => array
  142. (
  143. 'type' => 'int-11',
  144. 'name' => '更新时间',
  145. 'match' => array('is_numeric', time()),
  146. 'desc' => '',
  147. 'list' => 'date("Y-m-d H:i:s", {mdate})',
  148. ),
  149. 'state' => array
  150. (
  151. 'type' => 'tinyint-1',
  152. 'name' => '状态',
  153. 'default' => '1',
  154. 'desc' => '请选择状态',
  155. 'match' => 'is_numeric',
  156. ),
  157. 'cdate' => array
  158. (
  159. 'type' => 'int-11',
  160. 'name' => '录入时间',
  161. 'match' => array('is_numeric', time()),
  162. 'desc' => '',
  163. # 只有insert时才生效
  164. 'insert' => true,
  165. ),
  166. ),
  167. 'top' => Dever::config('base', 'component')->top,
  168. 'manage' => array
  169. (
  170. //'delete' => false,
  171. 'insert' => false,
  172. 'edit' => false,
  173. ),
  174. );