province.php 3.0 KB

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