wechat_oauth.php 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. <?php
  2. return array
  3. (
  4. # 表名
  5. 'name' => 'wechat_oauth',
  6. # 显示给用户看的名称
  7. 'lang' => '微信授权绑定列表',
  8. 'order' => 10,
  9. 'menu' => false,
  10. # 数据结构
  11. 'struct' => array
  12. (
  13. 'id' => array
  14. (
  15. 'type' => 'int-11',
  16. 'name' => 'ID',
  17. 'default' => '',
  18. 'desc' => '',
  19. 'match' => 'is_numeric',
  20. //'search' => 'order',
  21. 'order' => 'desc',
  22. 'list' => true,
  23. ),
  24. 'uid' => array
  25. (
  26. 'type' => 'int-11',
  27. 'name' => '用户',
  28. 'default' => '',
  29. 'desc' => '',
  30. 'match' => 'is_numeric',
  31. //'update' => 'select',
  32. 'search' => 'fulltext',
  33. 'list' => '{uid} > 0 ? Dever::load("passport/user-one#username", {uid}) : "未知用户"',
  34. //'list' => true,
  35. //'edit' => true,
  36. ),
  37. 'account_id' => array
  38. (
  39. 'type' => 'varchar-50',
  40. 'name' => 'account_id',
  41. 'default' => '',
  42. 'desc' => 'account_id',
  43. 'match' => 'is_string',
  44. //'update' => 'text',
  45. 'search' => 'fulltext',
  46. 'list' => true,
  47. ),
  48. 'openid' => array
  49. (
  50. 'type' => 'varchar-50',
  51. 'name' => 'openid-微信的唯一用户id',
  52. 'default' => '',
  53. 'desc' => 'openid',
  54. 'match' => 'is_string',
  55. //'update' => 'text',
  56. 'search' => 'fulltext',
  57. 'list' => true,
  58. ),
  59. 'unionid' => array
  60. (
  61. 'type' => 'varchar-50',
  62. 'name' => 'unionid-微信的唯一用户id',
  63. 'default' => '',
  64. 'desc' => 'unionid',
  65. 'match' => 'is_string',
  66. //'update' => 'text',
  67. 'search' => 'fulltext',
  68. 'list' => true,
  69. ),
  70. 'access_token' => array
  71. (
  72. 'type' => 'varchar-200',
  73. 'name' => 'access_token',
  74. 'default' => '',
  75. 'desc' => 'access_token',
  76. 'match' => 'is_string',
  77. //'update' => 'text',
  78. ),
  79. 'refresh_token' => array
  80. (
  81. 'type' => 'varchar-200',
  82. 'name' => 'refresh_token',
  83. 'default' => '',
  84. 'desc' => 'refresh_token',
  85. 'match' => 'is_string',
  86. //'update' => 'text',
  87. ),
  88. 'expires_in' => array
  89. (
  90. 'type' => 'varchar-100',
  91. 'name' => 'expires_in',
  92. 'default' => '',
  93. 'desc' => 'expires_in',
  94. 'match' => 'is_string',
  95. //'update' => 'text',
  96. ),
  97. 'state' => array
  98. (
  99. 'type' => 'tinyint-1',
  100. 'name' => '状态',
  101. 'default' => '1',
  102. 'desc' => '请选择状态',
  103. 'match' => 'is_numeric',
  104. ),
  105. 'cdate' => array
  106. (
  107. 'type' => 'int-11',
  108. 'name' => '录入时间',
  109. 'match' => array('is_numeric', time()),
  110. 'desc' => '',
  111. # 只有insert时才生效
  112. 'search' => 'date',
  113. 'insert' => true,
  114. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  115. ),
  116. ),
  117. 'manage' => array
  118. (
  119. 'insert' => false,
  120. 'edit' => false,
  121. 'delete' => false,
  122. ),
  123. # request 请求接口定义
  124. 'request' => array
  125. (
  126. ),
  127. );