store.php 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. <?php
  2. $type = array
  3. (
  4. 1 => '数值',
  5. 2 => '百分比',
  6. );
  7. return array
  8. (
  9. # 表名
  10. 'name' => 'store',
  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. 'name' => array
  28. (
  29. 'type' => 'varchar-150',
  30. 'name' => '自提点名称',
  31. 'default' => '',
  32. 'desc' => '自提点名称',
  33. 'match' => 'is_string',
  34. 'update' => 'text',
  35. 'search' => 'fulltext',
  36. 'list' => true,
  37. 'edit' => true,
  38. ),
  39. 'category' => 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', 'category'),
  49. 'list' => 'Dever::load("category/api.string", "{category}")',
  50. ),
  51. 'area' => array
  52. (
  53. 'type' => 'varchar-500',
  54. 'name' => '地区',
  55. 'default' => '',
  56. 'desc' => '地区',
  57. 'match' => 'is_string',
  58. 'search' => 'linkage',
  59. 'update' => 'linkage',
  60. 'option' => Dever::url('api.get', 'area'),
  61. 'list' => 'Dever::load("area/api.string", "{area}")',
  62. ),
  63. 'address' => array
  64. (
  65. 'type' => 'varchar-800',
  66. 'name' => '地址',
  67. 'default' => '',
  68. 'desc' => '地址',
  69. 'match' => 'is_string',
  70. 'update' => 'text',
  71. 'search' => 'fulltext',
  72. 'list' => true,
  73. ),
  74. 'state' => array
  75. (
  76. 'type' => 'tinyint-1',
  77. 'name' => '状态',
  78. 'default' => '1',
  79. 'desc' => '请选择状态',
  80. 'match' => 'is_numeric',
  81. ),
  82. 'cdate' => array
  83. (
  84. 'type' => 'int-11',
  85. 'name' => '录入时间',
  86. 'match' => array('is_numeric', DEVER_TIME),
  87. 'desc' => '',
  88. # 只有insert时才生效
  89. 'insert' => true,
  90. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  91. ),
  92. ),
  93. 'manage' => array
  94. (
  95. //'delete' => false,
  96. //'edit' => false,
  97. //'insert' => false,
  98. ),
  99. 'request' => array
  100. (
  101. # 列表
  102. 'getAll' => array
  103. (
  104. # 匹配的正则或函数 选填项
  105. 'option' => array
  106. (
  107. 'category' => 'yes',
  108. 'area' => 'yes',
  109. 'state' => 1,
  110. ),
  111. 'type' => 'all',
  112. 'order' => array('id' => 'desc'),
  113. 'limit' => '0,10',
  114. 'col' => '*',
  115. ),
  116. )
  117. );