servicer.php 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. <?php
  2. $type = function()
  3. {
  4. $array = array();
  5. $data = Dever::load('role/servicer_type-state');
  6. if($data)
  7. {
  8. $array += $data;
  9. }
  10. return $array;
  11. };
  12. return array
  13. (
  14. # 表名
  15. 'name' => 'servicer',
  16. # 显示给用户看的名称
  17. 'lang' => '配送商',
  18. # 是否显示在后台菜单
  19. 'order' => 9,
  20. # 数据结构
  21. 'struct' => array
  22. (
  23. 'id' => array
  24. (
  25. 'type' => 'int-11',
  26. 'name' => 'ID',
  27. 'default' => '',
  28. 'desc' => '',
  29. 'match' => 'is_numeric',
  30. 'list' => true,
  31. 'order' => 'asc',
  32. ),
  33. 'name' => array
  34. (
  35. 'type' => 'varchar-150',
  36. 'name' => '配送商名称',
  37. 'default' => '',
  38. 'desc' => '配送商名称',
  39. 'match' => 'is_string',
  40. 'update' => 'text',
  41. 'search' => 'fulltext',
  42. 'list' => true,
  43. 'edit' => true,
  44. ),
  45. 'type_id' => array
  46. (
  47. 'type' => 'int-11',
  48. 'name' => '配送商类型',
  49. 'default' => '1',
  50. 'desc' => '配送商类型',
  51. 'match' => 'is_numeric',
  52. 'update' => 'radio',
  53. 'option' => $type,
  54. ),
  55. 'reorder' => array
  56. (
  57. 'type' => 'int-11',
  58. 'name' => '排序(数值越大越靠前)',
  59. 'default' => '1',
  60. 'desc' => '请输入排序',
  61. 'match' => 'option',
  62. //'update' => 'text',
  63. 'search' => 'order',
  64. 'list_name' => '排序',
  65. 'list' => true,
  66. 'order' => 'desc',
  67. 'edit' => true,
  68. ),
  69. 'state' => array
  70. (
  71. 'type' => 'tinyint-1',
  72. 'name' => '状态',
  73. 'default' => '1',
  74. 'desc' => '请选择状态',
  75. 'match' => 'is_numeric',
  76. ),
  77. 'cdate' => array
  78. (
  79. 'type' => 'int-11',
  80. 'name' => '录入时间',
  81. 'match' => array('is_numeric', time()),
  82. 'desc' => '',
  83. # 只有insert时才生效
  84. 'insert' => true,
  85. //'search' => 'date',
  86. //'list' => 'date("Y-m-d H:i:s", {cdate})',
  87. ),
  88. ),
  89. 'manage' => array
  90. (
  91. 'button' => array
  92. (
  93. '类型配置' => array('list', 'servicer_type&oper_parent=servicer'),
  94. ),
  95. ),
  96. 'default' => array
  97. (
  98. 'col' => 'name,type_id,state,cdate',
  99. 'value' => array
  100. (
  101. '"默认配送商", 1, 1,' . DEVER_TIME,
  102. ),
  103. ),
  104. 'request' => array
  105. (
  106. )
  107. );