cart.php 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. <?php
  2. $status = array
  3. (
  4. 1 => '默认选中',
  5. 2 => '未选中',
  6. );
  7. return array
  8. (
  9. # 表名
  10. 'name' => 'cart',
  11. # 显示给用户看的名称
  12. 'lang' => '购物车',
  13. 'menu' => false,
  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. 'update' => 'hidden',
  26. //'list' => true,
  27. ),
  28. 'uid' => array
  29. (
  30. 'type' => 'int-11',
  31. 'name' => '用户名',
  32. 'default' => '0',
  33. 'desc' => '请选择用户',
  34. 'match' => 'is_numeric',
  35. 'update' => 'text',
  36. //'search' => 'select',
  37. 'search' => array
  38. (
  39. 'api' => 'passport/user-all',
  40. 'col' => 'username',
  41. 'result' => 'id',
  42. ),
  43. 'list' => '{uid} > 0 ? Dever::load("passport/user-find#username", {uid}) : "匿名用户"',
  44. ),
  45. 'shop_id' => array
  46. (
  47. 'type' => 'int-11',
  48. 'name' => '所属门店',
  49. 'default' => '',
  50. 'desc' => '所属门店',
  51. 'match' => 'is_numeric',
  52. 'list' => 'Dever::load("shop/info-find#name", {shop_id})',
  53. ),
  54. 'goods_id' => array
  55. (
  56. 'type' => 'int-11',
  57. 'name' => '商品名称',
  58. 'default' => '',
  59. 'desc' => '商品名称',
  60. 'match' => 'is_numeric',
  61. 'list' => 'Dever::load("goods/info-find#name", {goods_id})',
  62. ),
  63. 'sku_id' => array
  64. (
  65. 'type' => 'int-11',
  66. 'name' => 'sku',
  67. 'default' => '',
  68. 'desc' => 'sku',
  69. 'match' => 'is_numeric',
  70. ),
  71. 'num' => array
  72. (
  73. 'type' => 'int-11',
  74. 'name' => '购买数量',
  75. 'default' => '',
  76. 'desc' => '购买数量',
  77. 'match' => 'is_numeric',
  78. 'search' => 'select',
  79. 'list' => true,
  80. ),
  81. 'status' => array
  82. (
  83. 'type' => 'int-11',
  84. 'name' => '状态',
  85. 'default' => '1',
  86. 'desc' => '状态',
  87. 'match' => 'is_numeric',
  88. //'update' => 'select',
  89. 'option' => $status,
  90. 'search' => 'select',
  91. 'list' => true,
  92. 'edit' => true,
  93. ),
  94. 'state' => array
  95. (
  96. 'type' => 'tinyint-1',
  97. 'name' => '状态',
  98. 'default' => '1',
  99. 'desc' => '请选择状态',
  100. 'match' => 'is_numeric',
  101. ),
  102. 'cdate' => array
  103. (
  104. 'type' => 'int-11',
  105. 'name' => '创建时间',
  106. 'match' => array('is_numeric', time()),
  107. 'desc' => '',
  108. # 只有insert时才生效
  109. //'insert' => true,
  110. 'search' => 'date',
  111. 'list' => 'date("Y-m-d H:i:s", {cdate})',
  112. ),
  113. ),
  114. 'manage' => array
  115. (
  116. ),
  117. 'request' => array
  118. (
  119. ),
  120. );