wechat.php 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. <?php
  2. return array
  3. (
  4. # 表名
  5. 'name' => 'wechat',
  6. # 显示给用户看的名称
  7. 'lang' => '微信openid',
  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. 'account_id' => array
  25. (
  26. 'type' => 'int-11',
  27. 'name' => '所属账户',
  28. 'default' => '1',
  29. 'desc' => '所属账户',
  30. 'match' => 'is_numeric',
  31. 'update' => 'select',
  32. 'list' => '{account_id} > 0 ? Dever::load("oauth/account-one#name", {account_id}) : "未知"',
  33. ),
  34. 'uid' => array
  35. (
  36. 'type' => 'int-11',
  37. 'name' => '用户',
  38. 'default' => '',
  39. 'desc' => '',
  40. 'match' => 'is_numeric',
  41. ),
  42. 'user_id' => array
  43. (
  44. 'type' => 'int-11',
  45. 'name' => '用户',
  46. 'default' => '',
  47. 'desc' => '',
  48. 'match' => 'is_numeric',
  49. ),
  50. 'openid' => array
  51. (
  52. 'type' => 'varchar-50',
  53. 'name' => 'openid-微信的唯一用户id',
  54. 'default' => '',
  55. 'desc' => 'openid',
  56. 'match' => 'is_string',
  57. //'update' => 'text',
  58. 'search' => 'fulltext',
  59. 'list' => true,
  60. ),
  61. 'session_key' => array
  62. (
  63. 'type' => 'varchar-50',
  64. 'name' => 'session_key',
  65. 'default' => '',
  66. 'desc' => 'session_key',
  67. 'match' => 'is_string',
  68. //'update' => 'text',
  69. ),
  70. 'state' => array
  71. (
  72. 'type' => 'tinyint-1',
  73. 'name' => '状态',
  74. 'default' => '1',
  75. 'desc' => '请选择状态',
  76. 'match' => 'is_numeric',
  77. ),
  78. 'cdate' => array
  79. (
  80. 'type' => 'int-11',
  81. 'name' => '录入时间',
  82. 'match' => array('is_numeric', time()),
  83. 'desc' => '',
  84. # 只有insert时才生效
  85. 'search' => 'date',
  86. 'insert' => true,
  87. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  88. ),
  89. ),
  90. 'manage' => array
  91. (
  92. 'insert' => false,
  93. 'edit' => false,
  94. 'delete' => false,
  95. ),
  96. # request 请求接口定义
  97. 'request' => array
  98. (
  99. ),
  100. );