tester.php 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. <?php
  2. /**
  3. * tester
  4. */
  5. $user = function()
  6. {
  7. $array = array();
  8. $info = Dever::load('wechat_component/user-state');
  9. if($info)
  10. {
  11. $array += $info;
  12. }
  13. return $array;
  14. };
  15. return array
  16. (
  17. # 表名
  18. 'name' => 'tester',
  19. # 显示给用户看的名称
  20. 'lang' => '设置体验者',
  21. 'order' => 98,
  22. 'end' => array
  23. (
  24. 'insert' => array
  25. (
  26. 'wechat_component_applet/tester.update',
  27. ),
  28. 'update' => array
  29. (
  30. 'wechat_component_applet/tester.update',
  31. ),
  32. ),
  33. # 数据结构
  34. 'struct' => array
  35. (
  36. 'id' => array
  37. (
  38. 'type' => 'int-11',
  39. 'name' => 'ID',
  40. 'default' => '',
  41. 'desc' => '',
  42. 'match' => 'is_numeric',
  43. 'search' => 'order',
  44. 'list' => true,
  45. ),
  46. 'project_id' => array
  47. (
  48. 'type' => 'int-11',
  49. 'name' => '项目',
  50. 'default' => '',
  51. 'desc' => '请输入项目',
  52. 'match' => 'is_numeric',
  53. ),
  54. 'user' => array
  55. (
  56. 'type' => 'varchar-255',
  57. 'name' => '用户-不选择则获取所有用户',
  58. 'default' => '',
  59. 'desc' => '用户',
  60. 'match' => 'option',
  61. //'search' => 'order,fulltext',
  62. //'update' => 'checkbox',
  63. 'option' => $user,
  64. //'list' => true,
  65. ),
  66. 'name' => array
  67. (
  68. 'type' => 'varchar-60',
  69. 'name' => '微信昵称',
  70. 'default' => '',
  71. 'desc' => '微信昵称',
  72. 'match' => 'is_string',
  73. 'update' => 'text',
  74. 'list' => true,
  75. ),
  76. 'value' => array
  77. (
  78. 'type' => 'varchar-255',
  79. 'name' => '微信号',
  80. 'default' => '',
  81. 'desc' => '域名',
  82. 'match' => 'is_string',
  83. 'update' => 'text',
  84. 'list' => true,
  85. ),
  86. 'state' => array
  87. (
  88. 'type' => 'tinyint-1',
  89. 'name' => '状态',
  90. 'default' => '1',
  91. 'desc' => '请选择状态',
  92. 'match' => 'is_numeric',
  93. ),
  94. 'cdate' => array
  95. (
  96. 'type' => 'int-11',
  97. 'name' => '录入时间',
  98. 'match' => array('is_numeric', time()),
  99. 'desc' => '',
  100. # 只有insert时才生效
  101. 'insert' => true,
  102. ),
  103. ),
  104. 'top' => Dever::config('base', 'component')->top,
  105. 'manage' => array
  106. (
  107. ),
  108. );