province.php 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  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' => 10,
  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. 'state' => array
  74. (
  75. 'type' => 'tinyint-1',
  76. 'name' => '状态',
  77. 'default' => '1',
  78. 'desc' => '请选择状态',
  79. 'match' => 'is_numeric',
  80. ),
  81. 'cdate' => array
  82. (
  83. 'type' => 'int-11',
  84. 'name' => '录入时间',
  85. 'match' => array('is_numeric', time()),
  86. 'desc' => '',
  87. # 只有insert时才生效
  88. 'insert' => true,
  89. 'search' => 'date',
  90. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  91. ),
  92. ),
  93. 'manage' => array
  94. (
  95. ),
  96. 'request' => array
  97. (
  98. 'getAll' => array
  99. (
  100. # 匹配的正则或函数 选填项
  101. 'option' => array
  102. (
  103. 'state' => 1,
  104. ),
  105. 'type' => 'all',
  106. 'order' => array('pinyin_first' => 'asc', 'reorder' => 'desc', 'id' => 'asc'),
  107. 'col' => 'id,id as value, name, pinyin, pinyin_first',
  108. ),
  109. 'getData' => array
  110. (
  111. # 匹配的正则或函数 选填项
  112. 'option' => array
  113. (
  114. 'state' => 1,
  115. ),
  116. 'type' => 'all',
  117. 'order' => array('pinyin_first' => 'asc', 'reorder' => 'desc', 'id' => 'asc'),
  118. 'col' => 'id, name, pinyin, pinyin_first',
  119. ),
  120. )
  121. );