version_log.php 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. <?php
  2. /**
  3. * tester
  4. */
  5. $user = function()
  6. {
  7. $array = array();
  8. $info = Dever::load('component/user-state');
  9. if($info)
  10. {
  11. $array += $info;
  12. }
  13. return $array;
  14. };
  15. $template = function()
  16. {
  17. $array = array();
  18. $info = Dever::load('component/template-state');
  19. if($info)
  20. {
  21. $array += $info;
  22. }
  23. return $array;
  24. };
  25. $version = function()
  26. {
  27. $array = array();
  28. $info = Dever::load('component/version-state');
  29. if($info)
  30. {
  31. $array += $info;
  32. }
  33. return $array;
  34. };
  35. return array
  36. (
  37. # 表名
  38. 'name' => 'version_log',
  39. # 显示给用户看的名称
  40. 'lang' => '版本提交历史',
  41. 'menu' => false,
  42. # 数据结构
  43. 'struct' => array
  44. (
  45. 'id' => array
  46. (
  47. 'type' => 'int-11',
  48. 'name' => 'ID',
  49. 'default' => '',
  50. 'desc' => '',
  51. 'match' => 'is_numeric',
  52. 'search' => 'order',
  53. 'list' => true,
  54. ),
  55. 'project_id' => array
  56. (
  57. 'type' => 'int-11',
  58. 'name' => '项目',
  59. 'default' => '',
  60. 'desc' => '请输入项目',
  61. 'match' => 'is_numeric',
  62. 'list' => true,
  63. 'edit' => true,
  64. ),
  65. 'version_id' => array
  66. (
  67. 'type' => 'int-11',
  68. 'name' => '版本',
  69. 'default' => '',
  70. 'desc' => '版本',
  71. 'match' => 'is_numeric',
  72. //'search' => 'order,fulltext',
  73. 'update' => 'checkbox',
  74. 'option' => $version,
  75. //'list' => true,
  76. ),
  77. 'user_id' => array
  78. (
  79. 'type' => 'int-11',
  80. 'name' => '用户',
  81. 'default' => '',
  82. 'desc' => '用户',
  83. 'match' => 'is_numeric',
  84. //'search' => 'order,fulltext',
  85. 'update' => 'select',
  86. 'option' => $user,
  87. 'list' => true,
  88. ),
  89. 'name' => array
  90. (
  91. 'type' => 'varchar-60',
  92. 'name' => '版本号',
  93. 'default' => '',
  94. 'desc' => '版本号',
  95. 'match' => 'is_string',
  96. 'update' => 'text',
  97. 'search' => 'fulltext',
  98. 'list' => true,
  99. ),
  100. 'template_id' => array
  101. (
  102. 'type' => 'int-11',
  103. 'name' => '小程序模板',
  104. 'default' => '1',
  105. 'desc' => '小程序模板',
  106. 'match' => 'is_numeric',
  107. 'update' => 'select',
  108. 'option' => $template,
  109. 'list' => true,
  110. ),
  111. 'result' => array
  112. (
  113. 'type' => 'text-255',
  114. 'name' => '微信返回信息',
  115. 'default' => '',
  116. 'desc' => '微信返回信息',
  117. 'match' => 'option',
  118. 'update' => 'textarea',
  119. 'list' => 'Dever::load("component/user.qrcode", {user_id}, {id})',
  120. 'modal' => '查看详情',
  121. ),
  122. 'state' => array
  123. (
  124. 'type' => 'tinyint-1',
  125. 'name' => '状态',
  126. 'default' => '1',
  127. 'desc' => '请选择状态',
  128. 'match' => 'is_numeric',
  129. ),
  130. 'cdate' => array
  131. (
  132. 'type' => 'int-11',
  133. 'name' => '提交时间',
  134. 'match' => array('is_numeric', time()),
  135. 'desc' => '',
  136. # 只有insert时才生效
  137. 'insert' => true,
  138. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  139. ),
  140. ),
  141. 'top' => Dever::config('base', 'component')->top,
  142. 'manage' => array
  143. (
  144. 'edit' => false,
  145. 'delete' => false,
  146. 'insert' => false,
  147. ),
  148. );