wechat.php 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. <?php
  2. return array
  3. (
  4. # 表名
  5. 'name' => 'wechat',
  6. # 显示给用户看的名称
  7. 'lang' => '微信绑定列表',
  8. 'order' => 10,
  9. # 数据结构
  10. 'struct' => array
  11. (
  12. 'id' => array
  13. (
  14. 'type' => 'int-11',
  15. 'name' => 'ID',
  16. 'default' => '',
  17. 'desc' => '',
  18. 'match' => 'is_numeric',
  19. //'search' => 'order',
  20. 'order' => 'desc',
  21. 'list' => true,
  22. ),
  23. 'info_id' => array
  24. (
  25. 'type' => 'int-11',
  26. 'name' => '所属小程序',
  27. 'default' => '1',
  28. 'desc' => '请选择所属小程序',
  29. 'match' => 'is_numeric',
  30. 'update' => 'select',
  31. 'option' => $info,
  32. 'search' => 'select',
  33. 'list' => '{info_id} > 0 ? Dever::load("set/info-one#name", {info_id}) : "未知"',
  34. ),
  35. 'uid' => array
  36. (
  37. 'type' => 'int-11',
  38. 'name' => '用户id',
  39. 'default' => '',
  40. 'desc' => '',
  41. 'match' => 'is_numeric',
  42. //'update' => 'select',
  43. //'search' => 'order,select',
  44. 'list' => '{uid} > 0 ? Dever::load("passport/user-one#name", {uid}) : "未知用户"',
  45. ),
  46. 'openid' => array
  47. (
  48. 'type' => 'varchar-50',
  49. 'name' => 'openid-微信的唯一用户id',
  50. 'default' => '',
  51. 'desc' => 'openid',
  52. 'match' => 'is_string',
  53. //'update' => 'text',
  54. ),
  55. 'unionid' => array
  56. (
  57. 'type' => 'varchar-50',
  58. 'name' => 'unionid-微信的唯一用户id',
  59. 'default' => '',
  60. 'desc' => 'unionid',
  61. 'match' => 'is_string',
  62. //'update' => 'text',
  63. ),
  64. 'session_key' => array
  65. (
  66. 'type' => 'varchar-50',
  67. 'name' => 'session_key',
  68. 'default' => '',
  69. 'desc' => 'session_key',
  70. 'match' => 'is_string',
  71. //'update' => 'text',
  72. ),
  73. 'state' => array
  74. (
  75. 'type' => 'tinyint-1',
  76. 'name' => '状态',
  77. 'default' => '1',
  78. 'desc' => '请选择状态',
  79. 'match' => 'is_numeric',
  80. ),
  81. 'cdate' => array
  82. (
  83. 'type' => 'int-11',
  84. 'name' => '录入时间',
  85. 'match' => array('is_numeric', time()),
  86. 'desc' => '',
  87. # 只有insert时才生效
  88. 'insert' => true,
  89. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  90. ),
  91. ),
  92. 'manage' => array
  93. (
  94. 'insert' => false,
  95. ),
  96. # request 请求接口定义
  97. 'request' => array
  98. (
  99. ),
  100. );