freight.php 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. <?php
  2. $type = array
  3. (
  4. 1 => '数值',
  5. 2 => '百分比',
  6. );
  7. return array
  8. (
  9. # 表名
  10. 'name' => 'freight',
  11. # 显示给用户看的名称
  12. 'lang' => '运费设置',
  13. 'order' => 1,
  14. # 数据结构
  15. 'struct' => array
  16. (
  17. 'id' => array
  18. (
  19. 'type' => 'int-11',
  20. 'name' => 'ID',
  21. 'default' => '',
  22. 'desc' => '',
  23. 'match' => 'is_numeric',
  24. 'search' => 'order',
  25. //'list' => true,
  26. ),
  27. 'category' => array
  28. (
  29. 'type' => 'varchar-500',
  30. 'name' => '分类',
  31. 'default' => '',
  32. 'desc' => '分类',
  33. 'match' => 'is_string',
  34. 'search' => 'linkage',
  35. 'update' => 'linkage',
  36. 'option' => Dever::url('api.get', 'category'),
  37. 'list' => 'Dever::load("category/api.string", "{category}")',
  38. ),
  39. 'area' => array
  40. (
  41. 'type' => 'varchar-500',
  42. 'name' => '地区',
  43. 'default' => '',
  44. 'desc' => '地区',
  45. 'match' => 'is_string',
  46. 'search' => 'linkage',
  47. 'update' => 'linkage',
  48. 'option' => Dever::url('api.get', 'area'),
  49. 'list' => 'Dever::load("area/api.string", "{area}")',
  50. ),
  51. 'type' => array
  52. (
  53. 'type' => 'tinyint-1',
  54. 'name' => '运费类型',
  55. 'default' => '1',
  56. 'desc' => '运费类型',
  57. 'match' => 'option',
  58. 'update' => 'radio',
  59. 'option' => $type,
  60. 'list' => true,
  61. 'search' => 'select',
  62. ),
  63. 'price' => array
  64. (
  65. 'type' => 'int-11',
  66. 'name' => '运费价格-如果是百分比类型,这里如果填的是10,那就是总价的10%',
  67. 'default' => '',
  68. 'desc' => '运费价格',
  69. 'match' => 'is_numeric',
  70. 'update' => 'text',
  71. 'list' => true,
  72. ),
  73. 'free' => array
  74. (
  75. 'type' => 'int-11',
  76. 'name' => '总价满多少减免运费',
  77. 'default' => '',
  78. 'desc' => '满多少减免运费',
  79. 'match' => 'is_numeric',
  80. 'update' => 'text',
  81. //'list' => true,
  82. ),
  83. 'state' => array
  84. (
  85. 'type' => 'tinyint-1',
  86. 'name' => '状态',
  87. 'default' => '1',
  88. 'desc' => '请选择状态',
  89. 'match' => 'is_numeric',
  90. ),
  91. 'cdate' => array
  92. (
  93. 'type' => 'int-11',
  94. 'name' => '录入时间',
  95. 'match' => array('is_numeric', DEVER_TIME),
  96. 'desc' => '',
  97. # 只有insert时才生效
  98. 'insert' => true,
  99. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  100. ),
  101. ),
  102. 'manage' => array
  103. (
  104. //'delete' => false,
  105. //'edit' => false,
  106. //'insert' => false,
  107. ),
  108. 'request' => array
  109. (
  110. )
  111. );