wechat.php 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. <?php
  2. return array
  3. (
  4. # 表名
  5. 'name' => 'wechat',
  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. 'openid' => array
  38. (
  39. 'type' => 'varchar-50',
  40. 'name' => 'openid-微信的唯一用户id',
  41. 'default' => '',
  42. 'desc' => 'openid',
  43. 'match' => 'is_string',
  44. //'update' => 'text',
  45. 'search' => 'fulltext',
  46. 'list' => true,
  47. ),
  48. 'unionid' => array
  49. (
  50. 'type' => 'varchar-50',
  51. 'name' => 'unionid-微信的唯一用户id',
  52. 'default' => '',
  53. 'desc' => 'unionid',
  54. 'match' => 'is_string',
  55. //'update' => 'text',
  56. 'search' => 'fulltext',
  57. 'list' => true,
  58. ),
  59. 'session_key' => array
  60. (
  61. 'type' => 'varchar-50',
  62. 'name' => 'session_key',
  63. 'default' => '',
  64. 'desc' => 'session_key',
  65. 'match' => 'is_string',
  66. //'update' => 'text',
  67. ),
  68. 'state' => array
  69. (
  70. 'type' => 'tinyint-1',
  71. 'name' => '状态',
  72. 'default' => '1',
  73. 'desc' => '请选择状态',
  74. 'match' => 'is_numeric',
  75. ),
  76. 'cdate' => array
  77. (
  78. 'type' => 'int-11',
  79. 'name' => '录入时间',
  80. 'match' => array('is_numeric', time()),
  81. 'desc' => '',
  82. # 只有insert时才生效
  83. 'search' => 'date',
  84. 'insert' => true,
  85. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  86. ),
  87. ),
  88. 'manage' => array
  89. (
  90. 'insert' => false,
  91. 'edit' => false,
  92. 'delete' => false,
  93. ),
  94. # request 请求接口定义
  95. 'request' => array
  96. (
  97. ),
  98. );