service.php 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. <?php
  2. # 配送服务商类型
  3. $type = array
  4. (
  5. 1 => '物流',
  6. 2 => '外卖',
  7. );
  8. return array
  9. (
  10. # 表名
  11. 'name' => 'service',
  12. # 显示给用户看的名称
  13. 'lang' => '配送服务商',
  14. # 后台菜单排序
  15. 'order' => -1,
  16. # 数据结构
  17. 'struct' => array
  18. (
  19. 'id' => array
  20. (
  21. 'type' => 'int-11',
  22. 'name' => 'ID',
  23. 'default' => '',
  24. 'desc' => '',
  25. 'match' => 'is_numeric',
  26. 'search' => 'order',
  27. 'list' => true,
  28. 'order' => 'desc',
  29. ),
  30. 'name' => array
  31. (
  32. 'type' => 'varchar-200',
  33. 'name' => '配送服务商名称',
  34. 'default' => '',
  35. 'desc' => '配送服务商名称',
  36. 'match' => 'is_string',
  37. 'update' => 'text',
  38. 'search' => 'fulltext',
  39. 'list' => true,
  40. ),
  41. 'number' => array
  42. (
  43. 'type' => 'varchar-100',
  44. 'name' => '服务商代号-用来根据接口获取物流信息',
  45. 'default' => '',
  46. 'desc' => '服务商代号',
  47. 'match' => 'option',
  48. 'update' => 'text',
  49. 'search' => 'fulltext',
  50. 'list' => true,
  51. ),
  52. 'type' => array
  53. (
  54. 'type' => 'int-11',
  55. 'name' => '服务商类型',
  56. 'default' => '1',
  57. 'desc' => '服务商类型',
  58. 'match' => 'is_numeric',
  59. 'update' => 'select',
  60. 'option' => $type,
  61. 'search' => 'select',
  62. 'list' => true,
  63. 'edit' => true,
  64. ),
  65. 'state' => array
  66. (
  67. 'type' => 'tinyint-1',
  68. 'name' => '状态',
  69. 'default' => '1',
  70. 'desc' => '请选择状态',
  71. 'match' => 'is_numeric',
  72. ),
  73. 'cdate' => array
  74. (
  75. 'type' => 'int-11',
  76. 'name' => '创建时间',
  77. 'match' => array('is_numeric', time()),
  78. 'desc' => '',
  79. # 只有insert时才生效
  80. 'insert' => true,
  81. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  82. ),
  83. ),
  84. 'manage' => array
  85. (
  86. ),
  87. 'request' => array
  88. (
  89. 'getOne' => array
  90. (
  91. 'option' => array
  92. (
  93. 'name' => 'yes',
  94. 'state' => 1,
  95. ),
  96. 'type' => 'one',
  97. 'order' => array('id' => 'asc'),
  98. 'col' => '*',
  99. ),
  100. ),
  101. );