user.php 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  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. # 数据结构
  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. ),
  31. 'project_id' => array
  32. (
  33. 'type' => 'int-11',
  34. 'name' => '项目',
  35. 'default' => '',
  36. 'desc' => '请输入项目',
  37. 'match' => 'is_numeric',
  38. ),
  39. 'oauth_id' => array
  40. (
  41. 'type' => 'int-11',
  42. 'name' => 'oauth',
  43. 'default' => '',
  44. 'desc' => 'oauth',
  45. 'match' => 'is_numeric',
  46. ),
  47. 'name' => array
  48. (
  49. 'type' => 'varchar-120',
  50. 'name' => '昵称',
  51. 'default' => '',
  52. 'desc' => '昵称',
  53. 'match' => 'is_string',
  54. 'search' => 'fulltext',
  55. //'update' => 'text',
  56. 'list' => true,
  57. ),
  58. 'principal_name' => array
  59. (
  60. 'type' => 'varchar-120',
  61. 'name' => '主体信息',
  62. 'default' => '',
  63. 'desc' => '主体信息',
  64. 'match' => 'is_string',
  65. 'search' => 'fulltext',
  66. //'update' => 'text',
  67. 'list' => true,
  68. ),
  69. 'pic' => array
  70. (
  71. 'type' => 'varchar-250',
  72. 'name' => '头像',
  73. 'default' => '',
  74. 'desc' => '头像',
  75. 'match' => 'is_string',
  76. //'search' => 'fulltext',
  77. //'update' => 'text',
  78. 'list_name' => 'logo及二维码列表',
  79. //'list' => '"<img src=\"{pic}\" width=\"100\"> <img src=\"{qrcode}\" width=\"100\">"',
  80. 'list' => 'Dever::load("component/user.logo", {id})',
  81. 'modal' => '点此查看',
  82. ),
  83. 'username' => array
  84. (
  85. 'type' => 'varchar-120',
  86. 'name' => '用户名',
  87. 'default' => '',
  88. 'desc' => '用户名',
  89. 'match' => 'is_string',
  90. //'search' => 'fulltext',
  91. //'update' => 'text',
  92. //'list' => true,
  93. ),
  94. 'qrcode' => array
  95. (
  96. 'type' => 'varchar-250',
  97. 'name' => '二维码',
  98. 'default' => '',
  99. 'desc' => '二维码',
  100. 'match' => 'is_string',
  101. //'search' => 'fulltext',
  102. //'update' => 'text',
  103. //'list' => true,
  104. ),
  105. 'type' => array
  106. (
  107. 'type' => 'tinyint-11',
  108. 'name' => '类型',
  109. 'default' => '1',
  110. 'desc' => '类型',
  111. 'match' => 'is_numeric',
  112. //'update' => 'select',
  113. 'option' => $type,
  114. //'list' => true,
  115. ),
  116. 'desc' => array
  117. (
  118. 'type' => 'varchar-120',
  119. 'name' => '小程序id',
  120. 'default' => '',
  121. 'desc' => '小程序id',
  122. 'match' => 'is_string',
  123. 'search' => 'fulltext',
  124. 'update' => 'text',
  125. 'list' => true,
  126. 'edit' => true,
  127. ),
  128. 'tag' => array
  129. (
  130. 'type' => 'varchar-500',
  131. 'name' => '标签',
  132. 'default' => '',
  133. 'desc' => '标签',
  134. 'match' => 'is_string',
  135. 'search' => 'fulltext',
  136. 'update' => 'text',
  137. 'list' => true,
  138. 'edit' => true,
  139. ),
  140. 'mdate' => array
  141. (
  142. 'type' => 'int-11',
  143. 'name' => '更新时间',
  144. 'match' => array('is_numeric', time()),
  145. 'desc' => '',
  146. 'list' => 'date("Y-m-d H:i:s", {mdate})',
  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. ),
  165. ),
  166. 'top' => Dever::config('base')->top,
  167. 'manage' => array
  168. (
  169. 'delete' => false,
  170. 'insert' => false,
  171. 'edit' => false,
  172. ),
  173. );