province.php 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. <?php
  2. $info = Dever::load('manage/project.get');
  3. $path = $info['area']['setup'];
  4. $status = array
  5. (
  6. 1 => '可以售卖',
  7. 2 => '不可售卖',
  8. );
  9. return array
  10. (
  11. # 表名
  12. 'name' => 'province',
  13. # 显示给用户看的名称
  14. 'lang' => '省份',
  15. # 是否显示在后台菜单
  16. 'order' => 90,
  17. 'desc' => '导入数据请访问:' . Dever::url('area/import.load') . '<br />或者在服务器执行(推荐):php '.$path.'daemon/import.php <br />数据来源:' . Dever::load('area/import')->getUrl(),
  18. # 数据结构
  19. 'struct' => array
  20. (
  21. 'id' => array
  22. (
  23. 'type' => 'int-11',
  24. 'name' => 'ID',
  25. 'default' => '',
  26. 'desc' => '',
  27. 'match' => 'is_numeric',
  28. 'order' => 'asc',
  29. 'list' => true,
  30. ),
  31. 'name' => array
  32. (
  33. 'type' => 'varchar-150',
  34. 'name' => '省份名称',
  35. 'default' => '',
  36. 'desc' => '省份名称',
  37. 'match' => 'is_string',
  38. 'update' => 'text',
  39. 'search' => 'fulltext',
  40. 'list' => true,
  41. ),
  42. 'pinyin' => array
  43. (
  44. 'type' => 'varchar-300',
  45. 'name' => '拼音',
  46. 'default' => '',
  47. 'desc' => '拼音',
  48. 'match' => 'option',
  49. 'update' => 'text',
  50. 'search' => 'fulltext',
  51. 'list' => true,
  52. ),
  53. 'pinyin_first' => array
  54. (
  55. 'type' => 'varchar-30',
  56. 'name' => '拼音首字母',
  57. 'default' => '',
  58. 'desc' => '拼音首字母',
  59. 'match' => 'option',
  60. 'update' => 'text',
  61. 'search' => 'fulltext',
  62. 'list' => true,
  63. ),
  64. 'reorder' => array
  65. (
  66. 'type' => 'int-11',
  67. 'name' => '排序(数值越大越靠前)',
  68. 'default' => '1',
  69. 'desc' => '请输入排序',
  70. 'match' => 'option',
  71. 'update' => 'text',
  72. 'search' => 'order',
  73. 'list_name' => '排序',
  74. 'list' => true,
  75. 'order' => 'desc',
  76. 'edit' => true,
  77. ),
  78. 'status' => array
  79. (
  80. 'type' => 'tinyint-1',
  81. 'name' => '状态',
  82. 'default' => '1',
  83. 'desc' => '请选择状态',
  84. 'match' => 'is_numeric',
  85. 'list' => true,
  86. 'edit' => true,
  87. 'search' => 'select',
  88. 'option' => $status,
  89. ),
  90. 'state' => array
  91. (
  92. 'type' => 'tinyint-1',
  93. 'name' => '状态',
  94. 'default' => '1',
  95. 'desc' => '请选择状态',
  96. 'match' => 'is_numeric',
  97. ),
  98. 'cdate' => array
  99. (
  100. 'type' => 'int-11',
  101. 'name' => '录入时间',
  102. 'match' => array('is_numeric', time()),
  103. 'desc' => '',
  104. # 只有insert时才生效
  105. 'insert' => true,
  106. 'search' => 'date',
  107. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  108. ),
  109. ),
  110. 'manage' => array
  111. (
  112. 'excel' => array
  113. (
  114. array('数据导出', '省份列表', 'area/lib/manage.outProvince'),
  115. ),
  116. ),
  117. 'request' => array
  118. (
  119. 'getAll' => array
  120. (
  121. # 匹配的正则或函数 选填项
  122. 'option' => array
  123. (
  124. 'ids' => array('yes-id', 'in'),
  125. 'noid' => array('yes-id', 'not in'),
  126. 'status' => 'yes',
  127. 'state' => 1,
  128. ),
  129. 'type' => 'all',
  130. 'order' => array('pinyin_first' => 'asc', 'reorder' => 'desc', 'id' => 'asc'),
  131. 'col' => 'id,id as value, name, pinyin, pinyin_first',
  132. ),
  133. 'getData' => array
  134. (
  135. # 匹配的正则或函数 选填项
  136. 'option' => array
  137. (
  138. 'ids' => array('yes-id', 'in'),
  139. 'noid' => array('yes-id', 'not in'),
  140. 'state' => 1,
  141. ),
  142. 'type' => 'all',
  143. 'order' => array('pinyin_first' => 'asc', 'reorder' => 'desc', 'id' => 'asc'),
  144. 'col' => 'id, name, pinyin, pinyin_first',
  145. ),
  146. 'getLike' => array
  147. (
  148. # 匹配的正则或函数 选填项
  149. 'option' => array
  150. (
  151. 'name' => array('yes', 'like'),
  152. 'state' => 1,
  153. ),
  154. 'type' => 'one',
  155. 'col' => '*',
  156. ),
  157. )
  158. );