version.php 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  1. <?php
  2. $up = array
  3. (
  4. 1 => '是',
  5. 2 => '否',
  6. );
  7. $source_type = array (
  8. 'ios' => 'ios',
  9. 'android' => 'android',
  10. );
  11. $vip = array
  12. (
  13. 1 => '显示',
  14. 2 => '不显示',
  15. );
  16. return array
  17. (
  18. # 表名
  19. 'name' => 'version',
  20. # 显示给用户看的名称
  21. 'lang' => '版本管理',
  22. # 后台菜单排序
  23. 'order' => 9,
  24. # 数据结构
  25. 'struct' => array
  26. (
  27. 'id' => array
  28. (
  29. 'type' => 'int-11',
  30. 'name' => 'ID',
  31. 'default' => '',
  32. 'desc' => '',
  33. 'match' => 'is_numeric',
  34. 'search' => 'order',
  35. //'list' => true,
  36. 'order' => 'desc',
  37. ),
  38. 'source_type' => array
  39. (
  40. 'type' => 'varchar-32',
  41. 'name' => '平台',
  42. 'default' => '1',
  43. 'desc' => '平台',
  44. 'match' => 'is_string',
  45. 'update' => 'select',
  46. 'search' => 'select',
  47. 'option' => $source_type,
  48. 'list' => true,
  49. ),
  50. 'appname' => array
  51. (
  52. 'type' => 'varchar-50',
  53. 'name' => 'app名称',
  54. 'default' => '',
  55. 'desc' => 'app名称',
  56. 'match' => 'is_string',
  57. 'update' => 'text',
  58. //'list' => true,
  59. ),
  60. 'name' => array
  61. (
  62. 'type' => 'varchar-32',
  63. 'name' => '版本名称',
  64. 'default' => '',
  65. 'desc' => '请输入名称',
  66. 'match' => 'is_string',
  67. 'update' => 'text',
  68. 'search' => 'fulltext',
  69. 'list' => true,
  70. ),
  71. 'code' => array
  72. (
  73. 'type' => 'int-11',
  74. 'name' => '版本号-只能填写数字',
  75. 'default' => '',
  76. 'desc' => '版本号',
  77. 'match' => 'is_numeric',
  78. 'update' => 'text',
  79. 'search' => 'fulltext',
  80. 'order' => 'desc',
  81. 'list' => true,
  82. ),
  83. 'desc' => array
  84. (
  85. 'type' => 'varchar-500',
  86. 'name' => '版本描述',
  87. 'default' => '',
  88. 'desc' => '版本描述',
  89. 'match' => 'is_string',
  90. 'update' => 'textarea',
  91. ),
  92. 'up' => array
  93. (
  94. 'type' => 'int-11',
  95. 'name' => '是否强制升级',
  96. 'default' => '2',
  97. 'desc' => '是否强制升级',
  98. 'match' => 'is_numeric',
  99. 'update' => 'select',
  100. 'option' => $up,
  101. ),
  102. 'link' => array
  103. (
  104. 'type' => 'varchar-400',
  105. 'name' => '下载链接',
  106. 'default' => '',
  107. 'desc' => '下载链接',
  108. 'match' => 'is_string',
  109. 'update' => 'text',
  110. ),
  111. 'file' => array
  112. (
  113. 'type' => 'varchar-150',
  114. 'name' => '上传APP文件',
  115. 'default' => '',
  116. 'desc' => '上传APP文件',
  117. 'match' => 'option',
  118. 'update' => 'upload',
  119. 'key' => '7',
  120. 'upload' => 'qiniu',
  121. 'large' => true,
  122. //不覆盖原文件,生成新文件
  123. 'cover' => 2,
  124. ),
  125. 'vip' => array
  126. (
  127. 'type' => 'int-11',
  128. 'name' => '会员-是否显示会员信息和会员按钮',
  129. 'default' => '2',
  130. 'desc' => '会员',
  131. 'match' => 'is_numeric',
  132. 'update' => 'radio',
  133. 'option' => $vip,
  134. ),
  135. 'state' => array
  136. (
  137. 'type' => 'tinyint-1',
  138. 'name' => '状态',
  139. 'default' => '1',
  140. 'desc' => '请选择状态',
  141. 'match' => 'is_numeric',
  142. ),
  143. 'cdate' => array
  144. (
  145. 'type' => 'int-11',
  146. 'name' => '录入时间',
  147. 'match' => array('is_numeric', time()),
  148. 'desc' => '',
  149. # 只有insert时才生效
  150. 'insert' => true,
  151. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  152. ),
  153. ),
  154. 'request' => array
  155. (
  156. 'getOne' => array
  157. (
  158. # 匹配的正则或函数 选填项
  159. 'option' => array
  160. (
  161. 'source_type' => 'yes',
  162. 'code' => 'yes',
  163. 'name' => 'yes',
  164. 'state' => 1,
  165. ),
  166. 'type' => 'one',
  167. 'order' => array('code' => 'desc', 'cdate' => 'desc'),
  168. 'col' => '*',
  169. ),
  170. ),
  171. );