province.php 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. <?php
  2. $info = Dever::load('manage/project.get');
  3. $path = $info['area']['path'];
  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-50',
  29. 'name' => '省份名称',
  30. 'default' => '',
  31. 'desc' => '省份名称',
  32. 'match' => 'is_string',
  33. 'update' => 'text',
  34. 'search' => 'fulltext',
  35. 'list' => true,
  36. ),
  37. 'reorder' => array
  38. (
  39. 'type' => 'int-11',
  40. 'name' => '排序(数值越大越靠前)',
  41. 'default' => '1',
  42. 'desc' => '请输入排序',
  43. 'match' => 'option',
  44. 'update' => 'text',
  45. 'search' => 'order',
  46. 'list_name' => '排序',
  47. 'list' => true,
  48. 'order' => 'desc',
  49. 'edit' => true,
  50. ),
  51. 'state' => array
  52. (
  53. 'type' => 'tinyint-1',
  54. 'name' => '状态',
  55. 'default' => '1',
  56. 'desc' => '请选择状态',
  57. 'match' => 'is_numeric',
  58. ),
  59. 'cdate' => array
  60. (
  61. 'type' => 'int-11',
  62. 'name' => '录入时间',
  63. 'match' => array('is_numeric', time()),
  64. 'desc' => '',
  65. # 只有insert时才生效
  66. 'insert' => true,
  67. 'search' => 'date',
  68. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  69. ),
  70. ),
  71. 'manage' => array
  72. (
  73. ),
  74. 'request' => array
  75. (
  76. 'getAll' => array
  77. (
  78. # 匹配的正则或函数 选填项
  79. 'option' => array
  80. (
  81. 'state' => 1,
  82. ),
  83. 'type' => 'all',
  84. 'order' => array('reorder' => 'desc', 'id' => 'asc'),
  85. 'col' => 'id as value, name',
  86. ),
  87. )
  88. );