version.php 2.9 KB

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